GDCM: gdcmAbstractSyntax.h Source File

GDCM 3.0.26

gdcmAbstractSyntax.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMABSTRACTSYNTAX_H
15#define GDCMABSTRACTSYNTAX_H
16
17#include "gdcmTypes.h"
18#include "gdcmUIDs.h"
19#include "gdcmDataElement.h"
20
21namespace gdcm
22{
23
24namespace network
25{
26
32 class AbstractSyntax
33{
34public:
35 AbstractSyntax();
36 std::istream &Read(std::istream &is);
37 const std::ostream &Write(std::ostream &os) const;
38
39 void SetName( const char *name ) { UpdateName( name ); }
40 const char *GetName() const { return Name.c_str(); }
41
42 // accept a UIDs::TSType also...
43 void SetNameFromUID( UIDs::TSName tsname );
44 //now that the PresentationContext messes around with UIDs and returns a string
45 //use that string as well.
46 //void SetNameFromUIDString( const std::string& inUIDName );
47
48 size_t Size() const;
49
50 void Print(std::ostream &os) const;
51
52 bool operator==(const AbstractSyntax & as) const
53 {
54 return Name == as.Name;
55 }
56
57 DataElement GetAsDataElement() const;
58
59private:
60 void UpdateName( const char *name );
61 static const uint8_t ItemType;
62 static const uint8_t Reserved2;
63 uint16_t ItemLength; // len of
64 std::string /*AbstractSyntax*/ Name; // UID
65};
66
67} // end namespace network
68} // end namespace gdcm
69
70#endif //GDCMABSTRACTSYNTAX_H
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
gdcm::UIDs::TSName
TSName
Definition gdcmUIDs.h:501
gdcm::network::AbstractSyntax::AbstractSyntax
AbstractSyntax()
gdcm::network::AbstractSyntax::Read
std::istream & Read(std::istream &is)
gdcm::network::AbstractSyntax::Write
const std::ostream & Write(std::ostream &os) const
gdcm::network::AbstractSyntax::SetName
void SetName(const char *name)
Definition gdcmAbstractSyntax.h:39
gdcm::network::AbstractSyntax::Print
void Print(std::ostream &os) const
gdcm::network::AbstractSyntax::Size
size_t Size() const
gdcm::network::AbstractSyntax::GetAsDataElement
DataElement GetAsDataElement() const
gdcm::network::AbstractSyntax::GetName
const char * GetName() const
Definition gdcmAbstractSyntax.h:40
gdcm::network::AbstractSyntax::operator==
bool operator==(const AbstractSyntax &as) const
Definition gdcmAbstractSyntax.h:52
gdcm::network::AbstractSyntax::SetNameFromUID
void SetNameFromUID(UIDs::TSName tsname)
gdcmDataElement.h
gdcmTypes.h
gdcmUIDs.h
gdcm::network
Definition gdcmAAbortPDU.h:24
gdcm
Definition gdcmASN1.h:21