GDCM 3.0.24
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
33{
34public:
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...
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
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
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
TSName
Definition gdcmUIDs.h:501
AbstractSyntax.
Definition gdcmAbstractSyntax.h:33
std::istream & Read(std::istream &is)
const std::ostream & Write(std::ostream &os) const
void SetName(const char *name)
Definition gdcmAbstractSyntax.h:39
void Print(std::ostream &os) const
DataElement GetAsDataElement() const
const char * GetName() const
Definition gdcmAbstractSyntax.h:40
bool operator==(const AbstractSyntax &as) const
Definition gdcmAbstractSyntax.h:52
void SetNameFromUID(UIDs::TSName tsname)
Definition gdcmASN1.h:21