17 #include "vtkSystemIncludes.h" 
   18 #include "vtkDICOMModule.h"  
   77   vtkDICOMVR(
const char *vr) : Key(VRTable[static_cast<unsigned char>(vr[0])]
 
   78                                    [static_cast<unsigned char>(vr[1])]) {}
 
   81   vtkDICOMVR(
const unsigned char vr[2]) : Key(VRTable[vr[0]][vr[1]]) {}
 
   85   bool IsValid()
 const { 
return (this->Key != 0); }
 
   89   int GetType()
 const { 
return TypeTable[this->Key]; }
 
   92   const char *
GetText()
 const { 
return TextTable[this->Key]; }
 
   96   bool HasLongVL()
 const {
 
   98     return (((1ull << this->Key) & 0x1cb223e001ull) != 0); }
 
  102     return (((1ull << this->Key) & 0x828c1800ull) != 0); }
 
  106     return (((1ull << this->Key) & 0xa78c1cf6ull) != 0); }
 
  114     return (((1ull << this->Key) & 0x1848500740ull) != 0); }
 
  123     return (((1ull << this->Key) & 0x80801000ull) != 0); }
 
  127   bool operator==(
vtkDICOMVR a)
 const { 
return (this->Key == a.Key); }
 
  128   bool operator!=(
vtkDICOMVR a)
 const { 
return (this->Key != a.Key); }
 
  129   bool operator<=(
vtkDICOMVR a)
 const { 
return (this->Key <= a.Key); }
 
  130   bool operator>=(
vtkDICOMVR a)
 const { 
return (this->Key >= a.Key); }
 
  131   bool operator<(
vtkDICOMVR a)
 const { 
return (this->Key < a.Key); }
 
  132   bool operator>(
vtkDICOMVR a)
 const { 
return (this->Key > a.Key); }
 
  138   static const unsigned char *VRTable[256];
 
  139   static const unsigned char TypeTable[37];
 
  140   static const char TextTable[37][4];
 
  143 VTKDICOM_EXPORT ostream& operator<<(ostream& o, 
const vtkDICOMVR& a);
 
VRs (Value Representations)
Definition: vtkDICOMVR.h:22
vtkDICOMVR(EnumType vr)
Construct a VR from a VR enum constant.
Definition: vtkDICOMVR.h:74
bool HasSingleValue() const
The VRs ST, LT, and UT carry only one value.
Definition: vtkDICOMVR.h:122
EnumType
The VR enum constants.
Definition: vtkDICOMVR.h:29
vtkDICOMVR(const unsigned char vr[2])
Attempt to construct a VR from a two unsigned bytes.
Definition: vtkDICOMVR.h:81
bool HasSpecificCharacterSet() const
The VRs SH, LO, PN, ST, LT, UC, and UT use SpecificCharacterSet.
Definition: vtkDICOMVR.h:101
int GetType() const
Get the data type for this VR.
Definition: vtkDICOMVR.h:89
const char * GetText() const
Get the two-character text for this VR.
Definition: vtkDICOMVR.h:92
bool HasNumericValue() const
This is true for for all VRs that store numbers.
Definition: vtkDICOMVR.h:113
vtkDICOMVR(const char *vr)
Attempt to construct a VR from a two-byte string.
Definition: vtkDICOMVR.h:77
bool HasTextValue() const
This is true for all VRs whose value is stored as text.
Definition: vtkDICOMVR.h:105