#include <gdcmVR.h>
Inheritance diagram for gdcm::VR:
Public Member Functions | |
virtual void | Print (std::ostream &os=std::cout, std::string const &indent="") |
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 is 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::DictSet::BuildDictPath(), DICT_VR, gdcm::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 147 of file gdcmVR.cxx. Referenced by gdcm::Document::LoadEntryBinArea(), and gdcm::DataEntry::WriteContent(). 00148 { 00149 // Unsigned & signed short 00150 if( tested == "US" || tested == "SS" ) 00151 return 2; 00152 // Unsigned & signed long 00153 if( tested == "UL" || tested == "SL" ) 00154 return 4; 00155 // Float 00156 if( tested == "FL" ) 00157 return 4; 00158 // Double 00159 if( tested == "FD" ) 00160 return 8; 00161 // Word string 00162 if( tested == "OW" ) 00163 return 2; 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 57 of file gdcmRefCounter.h. 00058 { 00059 return RefCount; 00060 }
|
|
checks is a supposed-to-be VR is a 'legal' one.
Definition at line 67 of file gdcmVR.h. Referenced by gdcm::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 gdcm::DocEntrySet::GetEntryForcedAsciiValue(), gdcm::DataEntry::GetValue(), gdcm::DataEntry::GetValueCount(), IsVROfBinaryRepresentable(), gdcm::DataEntry::Print(), and gdcm::DataEntry::SetValue(). 00110 { 00111 //FIXME : either you consider than US, UL, SS, SL *are* string representable 00112 // and you have to add FD and FL 00113 // or you consider they are not, and you have to remove them 00114 // (I cannot guess your point, reading gdcmDataEntry code :-( ) JPR 00115 00116 return tested == "AE" || 00117 tested == "AS" || 00118 tested == "CS" || 00119 tested == "DA" || 00120 tested == "DS" || 00121 tested == "IS" || 00122 tested == "LO" || 00123 tested == "LT" || 00124 tested == "PN" || 00125 tested == "SH" || 00126 tested == "SL" || 00127 tested == "SS" || 00128 tested == "ST" || 00129 tested == "TM" || 00130 tested == "UI" || 00131 tested == "UL" || 00132 tested == "US" || 00133 tested == "UT"; 00134 00135 // Should be quicker --> But it doesn't work : revert to old code 00136 /* 00137 return tested != "FL" && 00138 tested != "FD" && 00139 tested != "OB" && 00140 tested != "OW" && 00141 tested != "AT" && // Attribute Tag ?!? 00142 tested != "UN" && // UN is an actual VR ! 00143 tested != "SQ" ; 00144 */ 00145 }
|
|
Definition at line 47 of file gdcmVR.h. Referenced by gdcm::Global::Global(). 00047 {return new VR();}
|
|
Print all.
Reimplemented from gdcm::Base. Definition at line 188 of file gdcmVR.cxx. References vr. 00189 { 00190 for (VRHT::iterator it = vr.begin(); it != vr.end(); ++it) 00191 { 00192 os << "VR : " << it->first << " = " << it->second << std::endl; 00193 } 00194 }
|
|
Register the object.
Definition at line 45 of file gdcmRefCounter.h. Referenced by gdcm::SQItem::AddEntry(), gdcm::ElementSet::AddEntry(), gdcm::Dict::AddEntry(), gdcm::SeqEntry::AddSQItem(), gdcm::DocEntry::DocEntry(), gdcm::FileHelper::FileHelper(), gdcm::DocEntrySet::GetDictEntry(), gdcm::DocEntryArchive::Push(), gdcm::Dict::ReplaceEntry(), and gdcm::SeqEntry::SetDelimitationItem(). 00045 { 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 49 of file gdcmRefCounter.h. Referenced by gdcm::SeqEntry::ClearSQItem(), gdcm::DocEntrySet::GetDictEntry(), 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(). |
|
|