#include <gdcmVR.h>
Inheritance diagram for GDCM_NAME_SPACE::VR:
Public Member Functions | |
virtual void | Print (std::ostream &os=std::cout, std::string const &="") |
Print all. | |
int | Count (VRKey const &key) |
Get the count for an element. | |
bool | IsVROfBinaryRepresentable (VRKey const &tested) |
Simple predicate that checks whether the given argument corresponds to the Value Representation of a DataEntry . | |
bool | IsVROfStringRepresentable (VRKey const &tested) |
Simple predicate that checks whether the given argument corresponds to the Value Representation of a 'stdstring representable' value. | |
bool | IsVROfSequence (VRKey const &tested) |
Simple predicate that checks whether the given argument corresponds to the Value Representation of a SeqEntry. | |
bool | IsValidVR (VRKey const &key) |
checks if a supposed-to-be VR is a 'legal' one. | |
unsigned short | GetAtomicElementLength (VRKey const &tested) |
returns the length of a elementary elem whose VR is passed | |
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 VR * | New () |
Protected Member Functions | |
VR () | |
Constructor. | |
~VR () | |
Destructor. | |
Protected Attributes | |
int | PrintLevel |
Amount of printed details for each Dicom Entries : 0 : stands for the least detail level. | |
Private Member Functions | |
gdcmTypeMacro (VR) | |
Private Attributes | |
VRHT | vr |
Definition at line 42 of file gdcmVR.h.
|
Constructor.
Definition at line 40 of file gdcmVR.cxx. References GDCM_NAME_SPACE::DictSet::BuildDictPath(), DICT_VR, GDCM_NAME_SPACE::FillDefaultVRDict(), gdcmWarningMacro, and vr. 00041 { 00042 std::string filename = DictSet::BuildDictPath() + DICT_VR; 00043 std::ifstream from(filename.c_str()); 00044 if ( !from ) 00045 { 00046 gdcmWarningMacro("Can't open dictionary " << filename.c_str()); 00047 FillDefaultVRDict(vr); 00048 } 00049 else 00050 { 00051 char buff[1024]; 00052 VRKey key; 00053 VRAtr name; 00054 00055 while (!from.eof()) 00056 { 00057 from >> std::ws; 00058 from.getline(buff, 1024, ' '); 00059 if( strcmp(buff,"") == 0) 00060 continue; 00061 00062 key = buff; 00063 from >> std::ws; 00064 from.getline(buff, 1024, ';'); 00065 name = buff; 00066 00067 from >> std::ws; 00068 from.getline(buff, 1024, '\n'); 00069 00070 vr[key] = name; 00071 } 00072 from.close(); 00073 } 00074 }
|
|
Destructor.
Definition at line 79 of file gdcmVR.cxx. References vr. 00080 { 00081 vr.clear(); 00082 }
|
|
Get the count for an element.
Definition at line 53 of file gdcmVR.h. 00053 { return vr.count(key); };
|
|
|
|
|
returns the length of a elementary elem whose VR is passed
Definition at line 144 of file gdcmVR.cxx. Referenced by GDCM_NAME_SPACE::DataEntry::WriteContent(). 00145 { 00146 // Unsigned & signed short 00147 if( tested == "US" || tested == "SS" ) 00148 return 2; 00149 // Unsigned & signed long 00150 if( tested == "UL" || tested == "SL" ) 00151 return 4; 00152 // Float 00153 if( tested == "FL" ) 00154 return 4; 00155 // Double 00156 if( tested == "FD" ) 00157 return 8; 00158 // Word string 00159 if( tested == "OW" ) 00160 return 2; 00161 // Float string 00162 if( tested == "OF" ) 00163 return 4; 00164 return 1; 00165 }
|
|
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 }
|
|
checks if a supposed-to-be VR is a 'legal' one.
Definition at line 67 of file gdcmVR.h. Referenced by GDCM_NAME_SPACE::Document::CheckDocEntryVR().
|
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a DataEntry .
Definition at line 92 of file gdcmVR.cxx. References IsVROfSequence(), and IsVROfStringRepresentable(). 00093 { 00094 if ( IsVROfStringRepresentable(tested) ) 00095 return false; 00096 00097 if ( IsVROfSequence(tested) ) 00098 return false; 00099 00100 return true; 00101 }
|
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a SeqEntry.
Definition at line 60 of file gdcmVR.h. Referenced by IsVROfBinaryRepresentable().
|
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a 'stdstring representable' value.
Definition at line 109 of file gdcmVR.cxx. Referenced by IsVROfBinaryRepresentable(). 00110 { 00111 return tested == "AE" || 00112 tested == "AS" || 00113 tested == "CS" || 00114 tested == "DA" || 00115 tested == "DS" || 00116 tested == "FL" || 00117 tested == "FD" || 00118 tested == "IS" || 00119 tested == "LO" || 00120 tested == "LT" || 00121 tested == "PN" || 00122 tested == "SH" || 00123 tested == "SL" || 00124 tested == "SS" || 00125 tested == "ST" || 00126 tested == "TM" || 00127 tested == "UI" || 00128 tested == "UL" || 00129 tested == "US" || 00130 tested == "UT"; 00131 00132 // Should be quicker 00133 // --> will *never* work : any rotten value would be considered as OK ! 00134 /* 00135 return tested != "OB" && 00136 tested != "OW" && 00137 tested != "OF" && 00138 tested != "AT" && // Attribute Tag ?!? contain no printable character 00139 tested != "UN" && // UN is an actual VR ! 00140 tested != "SQ" ; 00141 */ 00142 }
|
|
Definition at line 47 of file gdcmVR.h. Referenced by GDCM_NAME_SPACE::Global::Global(). 00047 {return new VR();}
|
|
Print all.
Reimplemented from GDCM_NAME_SPACE::Base. Definition at line 205 of file gdcmVR.cxx. References vr. 00206 { 00207 for (VRHT::iterator it = vr.begin(); it != vr.end(); ++it) 00208 { 00209 os << "VR : " << it->first << " = " << it->second << std::endl; 00210 } 00211 }
|
|
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(). |
|
|