#include <gdcmTS.h>
Inheritance diagram for gdcm::TS:
Public Types | |
enum | SpecialType { ImplicitVRLittleEndian = 0, ImplicitVRBigEndianPrivateGE, ExplicitVRLittleEndian, DeflatedExplicitVRLittleEndian, ExplicitVRBigEndian, JPEGBaselineProcess1, JPEGExtendedProcess2_4, JPEGExtendedProcess3_5, JPEGSpectralSelectionProcess6_8, JPEGFullProgressionProcess10_12, JPEGLosslessProcess14, JPEGLosslessProcess14_1, JPEGLSLossless, JPEGLSNearLossless, JPEG2000Lossless, JPEG2000, RLELossless, MPEG2MainProfile, UnknownTS } |
Public Member Functions | |
virtual void | Print (std::ostream &os=std::cout, std::string const &="") |
Print all. | |
int | Count (TSKey const &key) |
returns occurence number of the given key | |
TSAtr const & | GetValue (TSKey const &key) |
returns the human readable value of a Transfer Syntax string | |
bool | IsTransferSyntax (TSKey const &key) |
Determines if the key passed corresponds to a 'Transfer Syntax' as defined in DICOM (and stored in gdcm::TS class). | |
bool | IsRLELossless (TSKey const &key) |
Determines if the Transfer Syntax was already encountered and if it corresponds to a Run Length Encoding Lossless one. | |
bool | IsJPEGLossless (TSKey const &key) |
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossless one. | |
bool | IsJPEGLossy (TSKey const &key) |
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossy one. | |
bool | IsJPEG2000 (TSKey const &key) |
Determines if the Transfer Syntax was already encountered and if it corresponds to a JPEG2000 one. | |
bool | IsJPEG (TSKey const &key) |
Determines if the Transfer Syntax corresponds to 'classical' Jpeg Lossless or Jpeg lossy. | |
bool | IsJPEGLS (TSKey const &key) |
Determines if the Transfer Syntax corresponds to any form of Jpeg-LS encoded Pixel data. | |
bool | IsMPEG (TSKey const &key) |
Determines if the Transfer Syntax corresponds to any form of MPEG encoded Pixel data. | |
SpecialType | GetSpecialTransferSyntax (TSKey const &key) |
GetSpecialTransferSyntax ?? | |
const char * | GetSpecialTransferSyntax (SpecialType t) |
GetSpecialTransferSyntax ?? | |
void | Delete () |
Delete the object. | |
void | Register () |
Register the object. | |
void | Unregister () |
Unregister the object. | |
const unsigned long & | GetRefCount () const |
Get the reference counting. | |
void | SetPrintLevel (int level) |
Sets the print level for the Dicom Header Elements. | |
int | GetPrintLevel () |
Gets the print level for the Dicom Entries. | |
Static Public Member Functions | |
static TS * | New () |
Constructs a gdcmTS with a RefCounter. | |
Protected Member Functions | |
TS () | |
~TS () | |
Protected Attributes | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Member Functions | |
gdcmTypeMacro (TS) | |
Private Attributes | |
TSHT | TsMap |
Definition at line 41 of file gdcmTS.h.
|
Definition at line 46 of file gdcmTS.h. 00046 { 00047 ImplicitVRLittleEndian = 0, 00048 ImplicitVRBigEndianPrivateGE, 00049 ExplicitVRLittleEndian, 00050 DeflatedExplicitVRLittleEndian, 00051 ExplicitVRBigEndian, 00052 JPEGBaselineProcess1, 00053 JPEGExtendedProcess2_4, 00054 JPEGExtendedProcess3_5, 00055 JPEGSpectralSelectionProcess6_8, 00056 JPEGFullProgressionProcess10_12, 00057 JPEGLosslessProcess14, 00058 JPEGLosslessProcess14_1, 00059 JPEGLSLossless, 00060 JPEGLSNearLossless, 00061 JPEG2000Lossless, 00062 JPEG2000, 00063 RLELossless, 00064 MPEG2MainProfile, 00065 UnknownTS 00066 };
|
|
Definition at line 93 of file gdcmTS.cxx. References gdcm::DictSet::BuildDictPath(), DICT_TS, gdcm::FillDefaultTSDict(), gdcmWarningMacro, and TsMap. 00094 { 00095 std::string filename = DictSet::BuildDictPath() + DICT_TS; 00096 std::ifstream from(filename.c_str()); 00097 if ( !from ) 00098 { 00099 gdcmWarningMacro("Can't open dictionary" << filename.c_str()); 00100 FillDefaultTSDict( TsMap ); 00101 } 00102 else 00103 { 00104 TSKey key; 00105 TSAtr name; 00106 00107 while (!from.eof()) 00108 { 00109 from >> key; 00110 from >> std::ws; 00111 std::getline(from, name); 00112 00113 if (key != "") 00114 { 00115 TsMap[key] = name; 00116 } 00117 } 00118 from.close(); 00119 } 00120 }
|
|
Definition at line 122 of file gdcmTS.cxx. References TsMap. 00123 { 00124 TsMap.clear(); 00125 }
|
|
returns occurence number of the given key
Definition at line 131 of file gdcmTS.cxx. References TsMap. 00132 { 00133 return TsMap.count(key); 00134 }
|
|
|
|
|
Gets the print level for the Dicom Entries.
Definition at line 50 of file gdcmBase.h. 00050 { return PrintLevel; }
|
|
Get the reference counting.
Definition at line 56 of file gdcmRefCounter.h. 00057 { 00058 return RefCount; 00059 }
|
|
GetSpecialTransferSyntax ??
Definition at line 336 of file gdcmTS.cxx. References gdcm::SpecialStrings. 00337 { 00338 return SpecialStrings[t]; 00339 }
|
|
GetSpecialTransferSyntax ??
Definition at line 319 of file gdcmTS.cxx. References gdcm::SpecialStrings, and UnknownTS. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(). 00320 { 00321 for (int i = 0; SpecialStrings[i] != NULL; i++) 00322 { 00323 if ( SpecialStrings[i] == key ) 00324 { 00325 return SpecialType(i); 00326 } 00327 } 00328 return UnknownTS; 00329 }
|
|
returns the human readable value of a Transfer Syntax string
Definition at line 137 of file gdcmTS.cxx. References gdcm::GDCM_UNFOUND, and TsMap. Referenced by gdcm::Document::GetTransferSyntaxName(), and gdcm::DataEntry::Print(). 00138 { 00139 // First thing clean up the string 00140 // (sometimes the transfer syntax is padded with spaces) 00141 std::string copy = key; 00142 while ( copy.size() && !isdigit((unsigned char)copy[copy.size()-1]) ) 00143 { 00144 copy.erase(copy.size()-1, 1); 00145 } 00146 00147 TSHT::const_iterator it = TsMap.find(copy); 00148 if (it == TsMap.end()) 00149 { 00150 return GDCM_UNFOUND; 00151 } 00152 return it->second; 00153 }
|
|
Determines if the Transfer Syntax corresponds to 'classical' Jpeg Lossless or Jpeg lossy.
Definition at line 257 of file gdcmTS.cxx. References IsJPEG2000(), IsJPEGLossless(), IsJPEGLossy(), IsJPEGLS(), and IsTransferSyntax(). 00258 { 00259 bool r = false; 00260 // First check this is an actual transfer syntax 00261 if ( IsTransferSyntax(key) ) 00262 { 00263 if ( IsJPEGLossy( key ) 00264 || IsJPEGLossless( key ) 00265 || IsJPEG2000( key ) 00266 || IsJPEGLS( key ) 00267 ) 00268 { 00269 r = true; 00270 } 00271 } 00272 return r; 00273 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a JPEG2000 one.
Definition at line 237 of file gdcmTS.cxx. References IsTransferSyntax(), JPEG2000, JPEG2000Lossless, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(), and IsJPEG(). 00238 { 00239 bool r = false; 00240 // First check this is an actual transfer syntax 00241 if ( IsTransferSyntax(key) ) 00242 { 00243 if ( key == SpecialStrings[JPEG2000Lossless] 00244 || key == SpecialStrings[JPEG2000] ) 00245 { 00246 r = true; 00247 } 00248 } 00249 return r; 00250 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossless one.
Definition at line 192 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGFullProgressionProcess10_12, JPEGLosslessProcess14, JPEGLosslessProcess14_1, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(), and IsJPEG(). 00193 { 00194 bool r = false; 00195 // First check this is an actual transfer syntax 00196 if ( IsTransferSyntax(key) ) 00197 { 00198 if ( key == SpecialStrings[JPEGFullProgressionProcess10_12] 00199 || key == SpecialStrings[JPEGLosslessProcess14] 00200 || key == SpecialStrings[JPEGLosslessProcess14_1] ) 00201 { 00202 r = true; 00203 } 00204 } 00205 return r; 00206 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossy one.
Definition at line 214 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGBaselineProcess1, JPEGExtendedProcess2_4, JPEGExtendedProcess3_5, JPEGSpectralSelectionProcess6_8, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(), and IsJPEG(). 00215 { 00216 bool r = false; 00217 // First check this is an actual transfer syntax 00218 if ( IsTransferSyntax(key) ) 00219 { 00220 if ( key == SpecialStrings[JPEGBaselineProcess1] 00221 || key == SpecialStrings[JPEGExtendedProcess2_4] 00222 || key == SpecialStrings[JPEGExtendedProcess3_5] 00223 || key == SpecialStrings[JPEGSpectralSelectionProcess6_8] ) 00224 { 00225 r = true; 00226 } 00227 } 00228 return r; 00229 }
|
|
Determines if the Transfer Syntax corresponds to any form of Jpeg-LS encoded Pixel data.
Definition at line 280 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGLSLossless, JPEGLSNearLossless, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(), and IsJPEG(). 00281 { 00282 bool r = false; 00283 // First check this is an actual transfer syntax 00284 if ( IsTransferSyntax(key) ) 00285 { 00286 if ( key == SpecialStrings[JPEGLSLossless] 00287 || key == SpecialStrings[JPEGLSNearLossless] ) 00288 { 00289 r = true; 00290 } 00291 } 00292 return r; 00293 }
|
|
Determines if the Transfer Syntax corresponds to any form of MPEG encoded Pixel data.
Definition at line 300 of file gdcmTS.cxx. References IsTransferSyntax(), MPEG2MainProfile, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(). 00301 { 00302 bool r = false; 00303 // First check this is an actual transfer syntax 00304 if ( IsTransferSyntax(key) ) 00305 { 00306 if ( key == SpecialStrings[MPEG2MainProfile] ) 00307 { 00308 r = true; 00309 } 00310 } 00311 return r; 00312 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a Run Length Encoding Lossless one.
Definition at line 172 of file gdcmTS.cxx. References IsTransferSyntax(), RLELossless, and gdcm::SpecialStrings. Referenced by gdcm::PixelReadConvert::GrabInformationsFromFile(). 00173 { 00174 bool r = false; 00175 // First check this is an actual transfer syntax 00176 if ( IsTransferSyntax(key) ) 00177 { 00178 if ( key == SpecialStrings[RLELossless] ) 00179 { 00180 r = true; 00181 } 00182 } 00183 return r; 00184 }
|
|
Determines if the key passed corresponds to a 'Transfer Syntax' as defined in DICOM (and stored in gdcm::TS class).
Definition at line 160 of file gdcmTS.cxx. References TsMap. Referenced by IsJPEG(), IsJPEG2000(), IsJPEGLossless(), IsJPEGLossy(), IsJPEGLS(), IsMPEG(), and IsRLELossless().
|
|
Constructs a gdcmTS with a RefCounter.
Definition at line 70 of file gdcmTS.h. Referenced by gdcm::Global::Global(). 00070 {return new TS();}
|
|
Print all.
Reimplemented from gdcm::Base. Definition at line 353 of file gdcmTS.cxx. References TsMap. 00354 { 00355 std::ostringstream s; 00356 00357 for (TSHT::const_iterator it = TsMap.begin(); it != TsMap.end(); ++it) 00358 { 00359 s << "TS : " << it->first << " = " << it->second << std::endl; 00360 } 00361 os << s.str(); 00362 }
|
|
Register the object.
Definition at line 44 of file gdcmRefCounter.h. Referenced by gdcm::SQItem::AddEntry(), gdcm::ElementSet::AddEntry(), gdcm::Dict::AddEntry(), gdcm::SeqEntry::AddSQItem(), gdcm::SeqEntry::Copy(), gdcm::DicomDir::Copy(), gdcm::DocEntry::DocEntry(), gdcm::FileHelper::FileHelper(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntryArchive::Push(), gdcm::Dict::ReplaceEntry(), and gdcm::SeqEntry::SetDelimitationItem(). 00044 { RefCount++; }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print(). 00047 { PrintLevel = level; }
|
|
Unregister the object.
Definition at line 48 of file gdcmRefCounter.h. Referenced by gdcm::SeqEntry::ClearSQItem(), gdcm::DicomDir::Copy(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntrySet::NewDataEntry(), gdcm::DocEntrySet::NewSeqEntry(), gdcm::Document::ReadNextDocEntry(), gdcm::SQItem::RemoveEntry(), gdcm::ElementSet::RemoveEntry(), gdcm::SeqEntry::SetDelimitationItem(), gdcm::DocEntry::~DocEntry(), and gdcm::FileHelper::~FileHelper().
|
|
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.
Definition at line 55 of file gdcmBase.h. Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), gdcm::DocEntry::Print(), gdcm::DictEntry::Print(), gdcm::DicomDirStudy::Print(), gdcm::DicomDirSerie::Print(), gdcm::DicomDirPatient::Print(), gdcm::DicomDirMeta::Print(), gdcm::DicomDir::Print(), and gdcm::DataEntry::Print(). |
|
Definition at line 95 of file gdcmTS.h. Referenced by Count(), GetValue(), IsTransferSyntax(), Print(), TS(), and ~TS(). |