96 US_SS_OW = US | SS | OW,
99 VL16 = AE | AS | AT | CS | DA | DS | DT | FD | FL | IS |
LO | LT | PN | SH | SL | SS | ST | TM |
UI | UL | US,
100 VL32 = OB | OW | OD | OF | OL | OV | SQ | SV | UC | UN | UR | UT | UV,
101 VRASCII = AE | AS | CS | DA | DS | DT | IS |
LO | LT | PN | SH | ST | TM | UC |
UI | UR | UT,
102 VRBINARY = AT | FL | FD | OB | OD | OF | OL | OV | OW | SL | SQ | SS | SV | UL | UN | US | UV,
106 VR_VM1 = AS | LT | ST | UT | SQ | OF | OL | OV | OD | OW | OB | UN,
107 VRALL = VRASCII | VRBINARY,
131 return VR::GetLength(VRField);
156 std::istream &
Read(std::istream &is)
160 VRField = GetVRTypeFromFile(vr);
161 assert( VRField != VR::VR_END );
162 if( VRField == VR::INVALID )
179 is.seekg(2, std::ios::cur );
183 if( !(dumb[0] == 0 && dumb[1] == 0 ))
193 const std::ostream &
Write(std::ostream &os)
const
197 if( vrfield == VR::INVALID )
201 const char *vr = GetVRString(vrfield);
203 assert( vr[0] && vr[1] && vr[2] == 0 );
208 const char dumb[2] = {0, 0};
213 friend std::ostream &
operator<<(std::ostream &os,
const VR &vr);
215 operator VRType ()
const {
return VRField; }
217 unsigned int GetSize()
const;
227 static unsigned int GetIndex(
VRType vr);
245#define TYPETOENCODING(type,rep, rtype) \
246 template<> struct VRToEncoding<VR::type> \
247 { enum:long long { Mode = VR::rep }; }; \
248 template<> struct VRToType<VR::type> \
249 { typedef rtype Type; };
254 friend std::ostream&
operator<<(std::ostream &_os,
const UI &_val);
315#define VRTypeTemplateCase(type) \
317 return sizeof ( VRToType<VR::type>::Type );
372 assert( 0 &&
"should not" );
Exception.
Definition gdcmException.h:44
LO.
Definition gdcmLO.h:28
String.
Definition gdcmString.h:32
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
VR class.
Definition gdcmVR.h:55
static bool IsValid(const char *vr)
std::istream & Read(std::istream &is)
Definition gdcmVR.h:156
static bool IsASCII2(VRType vr)
static bool IsBinary2(VRType vr)
static uint32_t GetLength(VRType vr)
Definition gdcmVR.h:134
VR(VRType vr=INVALID)
Definition gdcmVR.h:154
static bool IsSwap(const char *vr)
static VRType GetVRTypeFromFile(const char *vr)
const std::ostream & Write(std::ostream &os) const
Definition gdcmVR.h:193
static bool CanDisplay(VRType vr)
unsigned int GetSizeof() const
bool Compatible(VR const &vr) const
static const char * GetVRStringFromFile(VRType vr)
static bool IsValid(const char *vr1, VRType vr2)
unsigned int GetSize() const
Definition gdcmVR.h:319
static bool IsBinary(VRType vr)
int GetLength() const
Definition gdcmVR.h:130
static VRType GetVRType(const char *vr)
VRType
Definition gdcmVR.h:57
@ UC
Definition gdcmVR.h:86
@ FL
Definition gdcmVR.h:68
@ UL
Definition gdcmVR.h:88
@ OL
Definition gdcmVR.h:75
@ FD
Definition gdcmVR.h:67
@ LT
Definition gdcmVR.h:71
@ SH
Definition gdcmVR.h:79
@ OB
Definition gdcmVR.h:72
@ DT
Definition gdcmVR.h:66
@ OW
Definition gdcmVR.h:77
@ UT
Definition gdcmVR.h:92
@ OF
Definition gdcmVR.h:74
@ US_SS_OW
Definition gdcmVR.h:96
@ UV
Definition gdcmVR.h:93
@ PN
Definition gdcmVR.h:78
@ INVALID
Definition gdcmVR.h:59
@ VL32
Definition gdcmVR.h:100
@ VL16
Definition gdcmVR.h:99
@ IS
Definition gdcmVR.h:69
@ SL
Definition gdcmVR.h:80
@ DS
Definition gdcmVR.h:65
@ VR_VM1
Definition gdcmVR.h:106
@ OV
Definition gdcmVR.h:76
@ SS
Definition gdcmVR.h:82
@ VRALL
Definition gdcmVR.h:107
@ UR
Definition gdcmVR.h:90
@ US_SS
Definition gdcmVR.h:95
@ OB_OW
Definition gdcmVR.h:94
@ ST
Definition gdcmVR.h:83
@ CS
Definition gdcmVR.h:63
@ SV
Definition gdcmVR.h:84
@ OD
Definition gdcmVR.h:73
@ AT
Definition gdcmVR.h:62
@ TM
Definition gdcmVR.h:85
@ AS
Definition gdcmVR.h:61
@ VRASCII
Definition gdcmVR.h:101
@ VRBINARY
Definition gdcmVR.h:102
@ US
Definition gdcmVR.h:91
@ SQ
Definition gdcmVR.h:81
@ DA
Definition gdcmVR.h:64
@ US_OW
Definition gdcmVR.h:97
@ VR_END
Definition gdcmVR.h:108
@ AE
Definition gdcmVR.h:60
@ UN
Definition gdcmVR.h:89
static bool IsASCII(VRType vr)
static const char * GetVRString(VRType vr)
#define gdcmAssertAlwaysMacro(arg)
AssertAlways.
Definition gdcmTrace.h:228
#define gdcmDebugMacro(msg)
Debug.
Definition gdcmTrace.h:119
#define VRTypeTemplateCase(type)
Definition gdcmVR.h:315
#define TYPETOENCODING(type, rep, rtype)
Definition gdcmVR.h:245
#define GDCM_EXPORT
Definition gdcmWin32.h:34
String<'\\', 64 > PNComp
Definition gdcmVR.h:269
String<'\\', 64 > LOComp
Definition gdcmVR.h:267
String<'\\', 64, 0 > UIComp
Definition gdcmVR.h:275
String<'\\', 16 > AEComp
Definition gdcmVR.h:262
String<'\\', 4294967294 > URComp
Definition gdcmVR.h:273
String<'\\', 64 > LTComp
Definition gdcmVR.h:268
String<'\\', 64 > DAComp
Definition gdcmVR.h:265
String<'\\', 64 > DTComp
Definition gdcmVR.h:266
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88
String<'\\', 4294967294 > UCComp
Definition gdcmVR.h:272
String<'\\', 16 > CSComp
Definition gdcmVR.h:264
String<'\\', 16 > TMComp
Definition gdcmVR.h:274
String<'\\', 64 > STComp
Definition gdcmVR.h:271
String<'\\', 64 > ASComp
Definition gdcmVR.h:263
String<'\\', 64 > UTComp
Definition gdcmVR.h:276
String<'\\', 64 > SHComp
Definition gdcmVR.h:270
char Internal[64+1]
Definition gdcmVR.h:253
friend std::ostream & operator<<(std::ostream &_os, const UI &_val)
Definition gdcmVR.h:256