#include <gdcmVR.h>
Public Member Functions | |
VR (void) | |
Constructor. | |
~VR () | |
Destructor. | |
void | Print (std::ostream &os=std::cout) |
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 BinEntry . | |
bool | IsVROfStringRepresentable (VRKey const &tested) |
Simple predicate that checks whether the given argument corresponds to the Value Representation of a ValEntry but NOT a BinEntry. | |
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) |
Private Attributes | |
VRHT | vr |
Definition at line 41 of file gdcmVR.h.
|
Constructor.
Definition at line 37 of file gdcmVR.cxx. References DICT_VR, gdcm::FillDefaultVRDict(), gdcmWarningMacro, vr, gdcm::VRAtr, and gdcm::VRKey.
00038 { 00039 std::string filename = DictSet::BuildDictPath() + DICT_VR; 00040 std::ifstream from(filename.c_str()); 00041 if(!from) 00042 { 00043 gdcmWarningMacro("Can't open dictionary" << filename.c_str()); 00044 FillDefaultVRDict(vr); 00045 } 00046 else 00047 { 00048 char buff[1024]; 00049 VRKey key; 00050 VRAtr name; 00051 00052 while (!from.eof()) 00053 { 00054 from >> std::ws; 00055 from.getline(buff, 1024, ' '); 00056 key = buff; 00057 from >> std::ws; 00058 from.getline(buff, 1024, ';'); 00059 name = buff; 00060 00061 from >> std::ws; 00062 from.getline(buff, 1024, '\n'); 00063 00064 if(key != "") 00065 { 00066 vr[key] = name; 00067 } 00068 } 00069 from.close(); 00070 } 00071 } |
|
Destructor.
Definition at line 76 of file gdcmVR.cxx. References vr.
00077 { 00078 vr.clear(); 00079 } |
|
Get the count for an element.
Definition at line 87 of file gdcmVR.cxx. References vr, and gdcm::VRKey.
00088 { 00089 return vr.count(key); 00090 } |
|
Definition at line 149 of file gdcmVR.cxx. References vr, and gdcm::VRKey.
|
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a BinEntry .
Definition at line 97 of file gdcmVR.cxx. References gdcm::GDCM_UNKNOWN, IsVROfSequence(), IsVROfStringRepresentable(), and gdcm::VRKey.
00098 { 00099 if ( tested == GDCM_UNKNOWN) 00100 return true; 00101 00102 if ( IsVROfStringRepresentable(tested) ) 00103 return false; 00104 00105 if ( IsVROfSequence(tested) ) 00106 return false; 00107 00108 return true; 00109 } |
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a SeqEntry.
Definition at line 144 of file gdcmVR.cxx. References gdcm::VRKey. Referenced by IsVROfBinaryRepresentable().
00145 { 00146 return tested == "SQ"; 00147 } |
|
Simple predicate that checks whether the given argument corresponds to the Value Representation of a ValEntry but NOT a BinEntry.
Definition at line 117 of file gdcmVR.cxx. References gdcm::VRKey. Referenced by IsVROfBinaryRepresentable().
00118 { 00119 return tested == "AE" || 00120 tested == "AS" || 00121 tested == "CS" || 00122 tested == "DA" || 00123 tested == "DS" || 00124 tested == "IS" || 00125 tested == "LO" || 00126 tested == "LT" || 00127 tested == "PN" || 00128 tested == "SH" || 00129 tested == "SL" || 00130 tested == "SS" || 00131 tested == "ST" || 00132 tested == "TM" || 00133 tested == "UI" || 00134 tested == "UL" || 00135 tested == "UN" || 00136 tested == "US"; 00137 } |
|
Print all.
Definition at line 166 of file gdcmVR.cxx. References vr.
|
|
Definition at line 57 of file gdcmVR.h. Referenced by Count(), IsValidVR(), Print(), VR(), and ~VR(). |