GDCM
2.2.0
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMTRANSFERSYNTAXSUB_H 00015 #define GDCMTRANSFERSYNTAXSUB_H 00016 00017 #include "gdcmTypes.h" 00018 #include "gdcmTransferSyntax.h" 00019 #include "gdcmUIDs.h" 00020 00021 namespace gdcm 00022 { 00023 00024 namespace network 00025 { 00026 00037 class TransferSyntaxSub 00038 { 00039 public: 00040 TransferSyntaxSub(); 00041 void SetName( const char *name ); 00042 const char *GetName() const { return Name.c_str(); } 00043 00044 // accept a UIDs::TSType also... 00045 void SetNameFromUID( UIDs::TSName tsname ); 00046 00047 std::istream &Read(std::istream &is); 00048 const std::ostream &Write(std::ostream &os) const; 00049 size_t Size() const; 00050 void Print(std::ostream &os) const; 00051 00052 bool operator==(const TransferSyntaxSub & ts) const 00053 { 00054 return Name == ts.Name; 00055 } 00056 00057 private: 00058 void UpdateName( const char *name ); 00059 static const uint8_t ItemType; 00060 static const uint8_t Reserved2; 00061 uint16_t ItemLength; // len of 00062 std::string /*TransferSyntaxSub*/ Name; // UID 00063 }; 00064 00065 } // end namespace network 00066 00067 } // end namespace gdcm 00068 00069 #endif //GDCMTRANSFERSYNTAXSUB_H