GDCM  2.2.6
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 
21 namespace gdcm
22 {
23 
24 namespace network
25 {
26 
33 {
34 public:
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 
58 
59 private:
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
const std::ostream & Write(std::ostream &os) const
void SetName(const char *name)
Definition: gdcmAbstractSyntax.h:39
TSName
Definition: gdcmUIDs.h:337
Class to represent a Data Element either Implicit or Explicit.
Definition: gdcmDataElement.h:58
const char * GetName() const
Definition: gdcmAbstractSyntax.h:40
void Print(std::ostream &os) const
void SetNameFromUID(UIDs::TSName tsname)
AbstractSyntax Table 9-14 ABSTRACT SYNTAX SUB-ITEM FIELDS.
Definition: gdcmAbstractSyntax.h:32
bool operator==(const AbstractSyntax &as) const
Definition: gdcmAbstractSyntax.h:52
std::istream & Read(std::istream &is)
DataElement GetAsDataElement() const

Generated on Sat Dec 21 2013 05:56:16 for GDCM by doxygen 1.8.5
SourceForge.net Logo