90 US_SS_OW = US | SS | OW,
92 VL16 = AE | AS | AT | CS | DA | DS | DT | FD | FL | IS |
LO | LT | PN | SH | SL | SS | ST | TM |
UI | UL | US,
93 VL32 = OB | OW | OD | OF | SQ | UN | UT,
94 VRASCII = AE | AS | CS | DA | DS | DT | IS |
LO | LT | PN | SH | ST | TM |
UI | UT,
95 VRBINARY = AT | FL | FD | OB | OD | OF | OW | SL | SQ | SS | UL | UN | US,
99 VR_VM1 = AS | LT | ST | UT | SQ | OF | OD | OW | OB | UN,
104 static const char *GetVRString(VRType vr);
107 static VRType GetVRTypeFromFile(
const char *vr);
110 static VRType GetVRType(
const char *vr);
111 static const char *GetVRStringFromFile(VRType vr);
113 static bool IsValid(
const char *vr);
116 static bool IsValid(
const char *vr1, VRType vr2);
119 static bool IsSwap(
const char *vr);
126 unsigned int GetSizeof()
const;
138 static bool IsBinary(VRType vr);
139 static bool IsASCII(VRType vr);
141 static bool CanDisplay(VRType vr);
143 static bool IsBinary2(VRType vr);
145 static bool IsASCII2(VRType vr);
149 std::istream &
Read(std::istream &is)
153 VRField = GetVRTypeFromFile(vr);
161 is.seekg(2, std::ios::cur );
165 if( !(dum[0] == 0 && dum[1] == 0 ))
175 const std::ostream &
Write(std::ostream &os)
const
183 const char *vr = GetVRString(vrfield);
185 assert( vr[0] && vr[1] && vr[2] == 0 );
190 const char dum[2] = {0, 0};
195 friend std::ostream &
operator<<(std::ostream &os,
const VR &vr);
197 operator VRType ()
const {
return VRField; }
199 unsigned int GetSize()
const;
201 bool Compatible(
VR const &vr)
const;
203 bool IsVRFile()
const;
209 static int GetIndex(VRType vr);
227 #define TYPETOENCODING(type,rep, rtype) \
228 template<> struct VRToEncoding<VR::type> \
229 { enum { Mode = VR::rep }; }; \
230 template<> struct VRToType<VR::type> \
231 { typedef rtype Type; };
236 friend std::ostream&
operator<<(std::ostream &_os,
const UI &_val);
288 #define VRTypeTemplateCase(type) \
290 return sizeof ( VRToType<VR::type>::Type );
326 assert( 0 &&
"should not" );
String<'\\', 16 > AEComp
Definition: gdcmVR.h:244
VRType
Definition: gdcmVR.h:57
VRBINARY
Definition: gdcmVR.h:284
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
int GetLength() const
Definition: gdcmVR.h:123
static const char * GetVRString(VRType vr)
String<'\\', 64 > ASComp
Definition: gdcmVR.h:245
String<'\\', 64 > STComp
Definition: gdcmVR.h:253
#define gdcmDebugMacro(msg)
Debug.
Definition: gdcmTrace.h:119
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:88
#define gdcmAssertAlwaysMacro(arg)
AssertAlways.
Definition: gdcmTrace.h:223
String<'\\', 64 > LOComp
Definition: gdcmVR.h:249
unsigned int GetSize() const
Definition: gdcmVR.h:292
#define VRTypeTemplateCase(type)
Definition: gdcmVR.h:288
String<'\\', 64 > DTComp
Definition: gdcmVR.h:248
String<'\\', 16 > CSComp
Definition: gdcmVR.h:246
static uint32_t GetLength(VRType vr)
Definition: gdcmVR.h:127
std::istream & Read(std::istream &is)
Definition: gdcmVR.h:149
TYPETOENCODING(SQ, VRBINARY, unsigned char) TYPETOENCODING(UN
LO.
Definition: gdcmLO.h:27
friend std::ostream & operator<<(std::ostream &_os, const UI &_val)
Definition: gdcmVR.h:238
VR(VRType vr=INVALID)
Definition: gdcmVR.h:147
String<'\\', 16 > TMComp
Definition: gdcmVR.h:254
String.
Definition: gdcmString.h:31
String<'\\', 64 > SHComp
Definition: gdcmVR.h:252
String<'\\', 64 > LTComp
Definition: gdcmVR.h:250
String<'\\', 64, 0 > UIComp
Definition: gdcmVR.h:255
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element). Basically an uint32_t which...
Definition: gdcmTag.h:38
VR class This is adapted from DICOM standard The biggest difference is the INVALID VR and the composi...
Definition: gdcmVR.h:54
String<'\\', 64 > UTComp
Definition: gdcmVR.h:256
Definition: gdcmASN1.h:20
String<'\\', 64 > DAComp
Definition: gdcmVR.h:247
char Internal[64+1]
Definition: gdcmVR.h:235
Exception.
Definition: gdcmException.h:43
String<'\\', 64 > PNComp
Definition: gdcmVR.h:251
const std::ostream & Write(std::ostream &os) const
Definition: gdcmVR.h:175