#include <gdcmTS.h>
Inheritance diagram for GDCM_NAME_SPACE::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, UltrasoundImageStorage_Retired, 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 ?? | |
bool | IsUltrasoundImageStorage_Retired (TSKey const &key) |
Determines if the SOP id corresponds to any form of UltrasoundImageStorage_Retired. | |
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 00066 // The following are *not* Transfer Syntaxes, but SOP uid 00067 UltrasoundImageStorage_Retired, 00068 00069 UnknownTS 00070 };
|
|
Definition at line 98 of file gdcmTS.cxx. References GDCM_NAME_SPACE::DictSet::BuildDictPath(), DICT_TS, GDCM_NAME_SPACE::FillDefaultTSDict(), gdcmWarningMacro, and TsMap. 00099 { 00100 00101 std::string filename = DictSet::BuildDictPath() + DICT_TS; 00102 std::ifstream from(filename.c_str()); 00103 if ( !from ) 00104 { 00105 gdcmWarningMacro("Can't open dictionary" << filename.c_str()); 00106 FillDefaultTSDict( TsMap ); 00107 } 00108 else 00109 { 00110 TSKey key; 00111 TSAtr name; 00112 00113 while (!from.eof()) 00114 { 00115 from >> key; 00116 from >> std::ws; 00117 std::getline(from, name); 00118 00119 if (key != "") 00120 { 00121 TsMap[key] = name; 00122 } 00123 } 00124 00125 from.close(); 00126 } 00127 }
|
|
Definition at line 129 of file gdcmTS.cxx. References TsMap. 00130 { 00131 TsMap.clear(); 00132 }
|
|
returns occurence number of the given key
Definition at line 138 of file gdcmTS.cxx. References TsMap. 00139 { 00140 return TsMap.count(key); 00141 }
|
|
|
|
|
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 59 of file gdcmRefCounter.h. 00060 { 00061 return RefCount; 00062 }
|
|
GetSpecialTransferSyntax ??
Definition at line 361 of file gdcmTS.cxx. References GDCM_NAME_SPACE::SpecialStrings. 00362 { 00363 return SpecialStrings[t]; 00364 }
|
|
GetSpecialTransferSyntax ??
Definition at line 344 of file gdcmTS.cxx. References GDCM_NAME_SPACE::SpecialStrings. Referenced by GDCM_NAME_SPACE::Document::HandleOutOfGroup0002(). 00345 { 00346 for (int i = 0; SpecialStrings[i] != NULL; i++) 00347 { 00348 if ( SpecialStrings[i] == key ) 00349 { 00350 return SpecialType(i); 00351 } 00352 } 00353 return UnknownTS; 00354 }
|
|
returns the human readable value of a Transfer Syntax string
Definition at line 144 of file gdcmTS.cxx. References GDCM_NAME_SPACE::GDCM_UNFOUND, and TsMap. Referenced by GDCM_NAME_SPACE::File::GetRescaleSlopeIntercept(), GDCM_NAME_SPACE::File::GetSpacing(), and GDCM_NAME_SPACE::Document::GetTransferSyntaxName(). 00145 { 00146 // First thing clean up the string 00147 // (sometimes the transfer syntax is padded with spaces) 00148 std::string copy = key; 00149 while ( copy.size() && !isdigit((unsigned char)copy[copy.size()-1]) ) 00150 { 00151 copy.erase(copy.size()-1, 1); 00152 } 00153 00154 TSHT::const_iterator it = TsMap.find(copy); 00155 if (it == TsMap.end()) 00156 { 00157 return GDCM_UNFOUND; 00158 } 00159 return it->second; 00160 }
|
|
Determines if the Transfer Syntax corresponds to 'classical' Jpeg Lossless or Jpeg lossy.
Definition at line 264 of file gdcmTS.cxx. References IsJPEG2000(), IsJPEGLossless(), IsJPEGLossy(), IsJPEGLS(), and IsTransferSyntax(). 00265 { 00266 bool r = false; 00267 // First check this is an actual transfer syntax 00268 if ( IsTransferSyntax(key) ) 00269 { 00270 if ( IsJPEGLossy( key ) 00271 || IsJPEGLossless( key ) 00272 || IsJPEG2000( key ) 00273 || IsJPEGLS( key ) 00274 ) 00275 { 00276 r = true; 00277 } 00278 } 00279 return r; 00280 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a JPEG2000 one.
Definition at line 244 of file gdcmTS.cxx. References IsTransferSyntax(), JPEG2000, JPEG2000Lossless, and GDCM_NAME_SPACE::SpecialStrings. Referenced by IsJPEG(). 00245 { 00246 bool r = false; 00247 // First check this is an actual transfer syntax 00248 if ( IsTransferSyntax(key) ) 00249 { 00250 if ( key == SpecialStrings[JPEG2000Lossless] 00251 || key == SpecialStrings[JPEG2000] ) 00252 { 00253 r = true; 00254 } 00255 } 00256 return r; 00257 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossless one.
Definition at line 199 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGFullProgressionProcess10_12, JPEGLosslessProcess14, JPEGLosslessProcess14_1, and GDCM_NAME_SPACE::SpecialStrings. Referenced by IsJPEG(). 00200 { 00201 bool r = false; 00202 // First check this is an actual transfer syntax 00203 if ( IsTransferSyntax(key) ) 00204 { 00205 if ( key == SpecialStrings[JPEGFullProgressionProcess10_12] 00206 || key == SpecialStrings[JPEGLosslessProcess14] 00207 || key == SpecialStrings[JPEGLosslessProcess14_1] ) 00208 { 00209 r = true; 00210 } 00211 } 00212 return r; 00213 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a 'classical' JPEG Lossy one.
Definition at line 221 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGBaselineProcess1, JPEGExtendedProcess2_4, JPEGExtendedProcess3_5, JPEGSpectralSelectionProcess6_8, and GDCM_NAME_SPACE::SpecialStrings. Referenced by IsJPEG(). 00222 { 00223 bool r = false; 00224 // First check this is an actual transfer syntax 00225 if ( IsTransferSyntax(key) ) 00226 { 00227 if ( key == SpecialStrings[JPEGBaselineProcess1] 00228 || key == SpecialStrings[JPEGExtendedProcess2_4] 00229 || key == SpecialStrings[JPEGExtendedProcess3_5] 00230 || key == SpecialStrings[JPEGSpectralSelectionProcess6_8] ) 00231 { 00232 r = true; 00233 } 00234 } 00235 return r; 00236 }
|
|
Determines if the Transfer Syntax corresponds to any form of Jpeg-LS encoded Pixel data.
Definition at line 287 of file gdcmTS.cxx. References IsTransferSyntax(), JPEGLSLossless, JPEGLSNearLossless, and GDCM_NAME_SPACE::SpecialStrings. Referenced by IsJPEG(). 00288 { 00289 bool r = false; 00290 // First check this is an actual transfer syntax 00291 if ( IsTransferSyntax(key) ) 00292 { 00293 if ( key == SpecialStrings[JPEGLSLossless] 00294 || key == SpecialStrings[JPEGLSNearLossless] ) 00295 { 00296 r = true; 00297 } 00298 } 00299 return r; 00300 }
|
|
Determines if the Transfer Syntax corresponds to any form of MPEG encoded Pixel data.
Definition at line 307 of file gdcmTS.cxx. References IsTransferSyntax(), MPEG2MainProfile, and GDCM_NAME_SPACE::SpecialStrings. 00308 { 00309 bool r = false; 00310 // First check this is an actual transfer syntax 00311 if ( IsTransferSyntax(key) ) 00312 { 00313 if ( key == SpecialStrings[MPEG2MainProfile] ) 00314 { 00315 r = true; 00316 } 00317 } 00318 return r; 00319 }
|
|
Determines if the Transfer Syntax was already encountered and if it corresponds to a Run Length Encoding Lossless one.
Definition at line 179 of file gdcmTS.cxx. References IsTransferSyntax(), RLELossless, and GDCM_NAME_SPACE::SpecialStrings. 00180 { 00181 bool r = false; 00182 // First check this is an actual transfer syntax 00183 if ( IsTransferSyntax(key) ) 00184 { 00185 if ( key == SpecialStrings[RLELossless] ) 00186 { 00187 r = true; 00188 } 00189 } 00190 return r; 00191 }
|
|
Determines if the key passed corresponds to a 'Transfer Syntax' as defined in DICOM (and stored in gdcm::TS class).
Definition at line 167 of file gdcmTS.cxx. References TsMap. Referenced by IsJPEG(), IsJPEG2000(), IsJPEGLossless(), IsJPEGLossy(), IsJPEGLS(), IsMPEG(), IsRLELossless(), and IsUltrasoundImageStorage_Retired().
|
|
Determines if the SOP id corresponds to any form of UltrasoundImageStorage_Retired.
Definition at line 326 of file gdcmTS.cxx. References IsTransferSyntax(), GDCM_NAME_SPACE::SpecialStrings, and UltrasoundImageStorage_Retired. 00327 { 00328 bool r = false; 00329 // First check this is an actual SOP id 00330 if ( IsTransferSyntax(key) ) 00331 { 00332 if ( key == SpecialStrings[UltrasoundImageStorage_Retired] ) 00333 { 00334 r = true; 00335 } 00336 } 00337 return r; 00338 }
|
|
Constructs a gdcmTS with a RefCounter.
Definition at line 74 of file gdcmTS.h. Referenced by GDCM_NAME_SPACE::Global::Global(). 00074 {return new TS();}
|
|
Print all.
Reimplemented from GDCM_NAME_SPACE::Base. Definition at line 378 of file gdcmTS.cxx. References TsMap. 00379 { 00380 std::ostringstream s; 00381 00382 for (TSHT::const_iterator it = TsMap.begin(); it != TsMap.end(); ++it) 00383 { 00384 s << "TS : " << it->first << " = " << it->second << std::endl; 00385 } 00386 os << s.str(); 00387 }
|
|
Register the object.
Definition at line 46 of file gdcmRefCounter.h. Referenced by GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::SeqEntry::AddSQItem(), GDCM_NAME_SPACE::SeqEntry::Copy(), GDCM_NAME_SPACE::DicomDir::Copy(), GDCM_NAME_SPACE::FileHelper::FileHelper(), GDCM_NAME_SPACE::DocEntrySet::GetDictEntry(), GDCM_NAME_SPACE::DocEntry::GetName(), GDCM_NAME_SPACE::DocEntry::GetVM(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::CommandManager::InSetCommand(), GDCM_NAME_SPACE::DocEntryArchive::Push(), and GDCM_NAME_SPACE::SeqEntry::SetDelimitationItem(). 00046 { RefCount++; }
|
|
Sets the print level for the Dicom Header Elements.
Definition at line 47 of file gdcmBase.h. Referenced by GDCM_NAME_SPACE::FileHelper::Print(), and GDCM_NAME_SPACE::DicomDir::Print(). 00047 { PrintLevel = level; }
|
|
Unregister the object.
Definition at line 50 of file gdcmRefCounter.h. Referenced by GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::SQItem::RemoveEntry(), GDCM_NAME_SPACE::ElementSet::RemoveEntry(), and GDCM_NAME_SPACE::FileHelper::~FileHelper(). 00051 { 00052 //std::cout <<"================Unreg " << typeid(*this).name() << std::endl; 00053 RefCount--; 00054 if(RefCount<=0) 00055 delete this; 00056 }
|
|
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_NAME_SPACE::SeqEntry::Print(), GDCM_NAME_SPACE::FileHelper::Print(), GDCM_NAME_SPACE::ElementSet::Print(), GDCM_NAME_SPACE::DocEntry::Print(), GDCM_NAME_SPACE::DictEntry::Print(), GDCM_NAME_SPACE::DicomDirStudy::Print(), GDCM_NAME_SPACE::DicomDirSerie::Print(), GDCM_NAME_SPACE::DicomDirPatient::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDir::Print(), and GDCM_NAME_SPACE::DataEntry::Print(). |
|
Definition at line 102 of file gdcmTS.h. Referenced by Count(), GetValue(), IsTransferSyntax(), Print(), TS(), and ~TS(). |