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" );