89 US_SS_OW = US | SS | OW,
91 VL16 = AE | AS | AT | CS | DA | DS | DT | FD | FL | IS |
LO | LT | PN | SH | SL | SS | ST | TM |
UI | UL | US,
92 VL32 = OB | OW | OF | SQ | UN | UT,
93 VRASCII = AE | AS | CS | DA | DS | DT | IS |
LO | LT | PN | SH | ST | TM |
UI | UT,
94 VRBINARY = AT | FL | FD | OB | OF | OW | SL | SQ | SS | UL | UN | US,
98 VR_VM1 = AS | LT | ST | UT | SQ | OF | OW | OB | UN,
103 static const char *GetVRString(VRType vr);
106 static VRType GetVRTypeFromFile(
const char *vr);
109 static VRType GetVRType(
const char *vr);
110 static const char *GetVRStringFromFile(VRType vr);
112 static bool IsValid(
const char *vr);
115 static bool IsValid(
const char *vr1, VRType vr2);
118 static bool IsSwap(
const char *vr);
125 unsigned int GetSizeof()
const;
137 static bool IsBinary(VRType vr);
138 static bool IsASCII(VRType vr);
140 static bool CanDisplay(VRType vr);
142 static bool IsBinary2(VRType vr);
144 static bool IsASCII2(VRType vr);
148 std::istream &
Read(std::istream &is)
152 VRField = GetVRTypeFromFile(vr);
160 is.seekg(2, std::ios::cur );
164 if( !(dum[0] == 0 && dum[1] == 0 ))
174 const std::ostream &
Write(std::ostream &os)
const
182 const char *vr = GetVRString(vrfield);
184 assert( vr[0] && vr[1] && vr[2] == 0 );
189 const char dum[2] = {0, 0};
194 friend std::ostream &
operator<<(std::ostream &os,
const VR &vr);
196 operator VRType ()
const {
return VRField; }
198 unsigned int GetSize()
const;
200 bool Compatible(
VR const &vr)
const;
202 bool IsVRFile()
const;
208 static int GetIndex(VRType vr);
226 #define TYPETOENCODING(type,rep, rtype) \
227 template<> struct VRToEncoding<VR::type> \
228 { enum { Mode = VR::rep }; }; \
229 template<> struct VRToType<VR::type> \
230 { typedef rtype Type; };
235 friend std::ostream&
operator<<(std::ostream &_os,
const UI &_val);
287 #define VRTypeTemplateCase(type) \
289 return sizeof ( VRToType<VR::type>::Type );
325 assert( 0 &&
"should not" );
String<'\\', 16 > AEComp
Definition: gdcmVR.h:243
VRType
Definition: gdcmVR.h:57
VRBINARY
Definition: gdcmVR.h:283
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
int GetLength() const
Definition: gdcmVR.h:122
static const char * GetVRString(VRType vr)
String<'\\', 64 > ASComp
Definition: gdcmVR.h:244
String<'\\', 64 > STComp
Definition: gdcmVR.h:252
#define gdcmDebugMacro(msg)
Debug.
Definition: gdcmTrace.h:119
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:92
#define gdcmAssertAlwaysMacro(arg)
AssertAlways.
Definition: gdcmTrace.h:223
String<'\\', 64 > LOComp
Definition: gdcmVR.h:248
unsigned int GetSize() const
Definition: gdcmVR.h:291
#define VRTypeTemplateCase(type)
Definition: gdcmVR.h:287
String<'\\', 64 > DTComp
Definition: gdcmVR.h:247
String<'\\', 16 > CSComp
Definition: gdcmVR.h:245
static uint32_t GetLength(VRType vr)
Definition: gdcmVR.h:126
std::istream & Read(std::istream &is)
Definition: gdcmVR.h:148
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:237
VR(VRType vr=INVALID)
Definition: gdcmVR.h:146
String<'\\', 16 > TMComp
Definition: gdcmVR.h:253
String.
Definition: gdcmString.h:31
String<'\\', 64 > SHComp
Definition: gdcmVR.h:251
String<'\\', 64 > LTComp
Definition: gdcmVR.h:249
String<'\\', 64, 0 > UIComp
Definition: gdcmVR.h:254
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:255
String<'\\', 64 > DAComp
Definition: gdcmVR.h:246
char Internal[64+1]
Definition: gdcmVR.h:234
Exception.
Definition: gdcmException.h:33
String<'\\', 64 > PNComp
Definition: gdcmVR.h:250
const std::ostream & Write(std::ostream &os) const
Definition: gdcmVR.h:174