GDCM 3.2.1

Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
gdcm::VR Class Reference

VR class. More...

`#include <gdcmVR.h>`

## Public Types
enum | VRType : long long { INVALID = 0 , AE = 1 , AS = 2 , AT = 4 , CS = 8 , DA = 16 , DS = 32 , DT = 64 , FD = 128 , FL = 256 , IS = 512 , LO = 1024 , LT = 2048 , OB = 4096 , OD = 134217728 , OF = 8192 , OL = 268435456 , OV = 2147483648 , OW = 16384 , PN = 32768 , SH = 65536 , SL = 131072 , SQ = 262144 , SS = 524288 , ST = 1048576 , SV = 4294967296 , TM = 2097152 , UC = 536870912 , UI = 4194304 , UL = 8388608 , UN = 16777216 , UR = 1073741824 , US = 33554432 , UT = 67108864 , UV = 8589934592 , OB_OW = OB | OW , US_SS = US | SS , US_SS_OW = US | SS | OW , US_OW = US | OW , VL16 = AE | AS | AT | CS | DA | DS | DT | FD | FL | IS | LO | LT | PN | SH | SL | SS | ST | TM | UI | UL | US , VL32 = OB | OW | OD | OF | OL | OV | SQ | SV | UC | UN | UR | UT | UV , VRASCII = AE | AS | CS | DA | DS | DT | IS | LO | LT | PN | SH | ST | TM | UC | UI | UR | UT , VRBINARY = AT | FL | FD | OB | OD | OF | OL | OV | OW | SL | SQ | SS | SV | UL | UN | US | UV , VR_VM1 = AS | LT | ST | UT | SQ | OF | OL | OV | OD | OW | OB | UN , VRALL = VRASCII | VRBINARY , VR_END = UV+1 }

## Public Member Functions
| VR (VRType vr=INVALID)
bool | Compatible (VR const &vr) const
int | GetLength () const
unsigned int | GetSize () const
unsigned int | GetSizeof () const
bool | IsDual () const
bool | IsVRFile () const
| operator VRType () const
std::istream & | Read (std::istream &is)
const std::ostream & | Write (std::ostream &os) const

## Static Public Member Functions
static bool | CanDisplay (VRType vr)
static uint32_t | GetLength (VRType vr)
static const char * | GetVRString (VRType vr)
static const char * | GetVRStringFromFile (VRType vr)
static VRType | GetVRType (const char *vr)
static VRType | GetVRTypeFromFile (const char *vr)
static bool | IsASCII (VRType vr)
static bool | IsASCII2 (VRType vr)
static bool | IsBinary (VRType vr)
static bool | IsBinary2 (VRType vr)
static bool | IsSwap (const char *vr)
static bool | IsValid (const char *vr)
static bool | IsValid (const char *vr1, VRType vr2)

## Friends
std::ostream & | operator<< (std::ostream &os, const VR &vr)

## Detailed Description

VR class.

This is adapted from DICOM standard The biggest difference is the INVALID VR and the composite one that differ from standard (more like an addition) This allow us to represent all the possible case express in the DICOMV3 dict

Note
  VALUE REPRESENTATION (VR) Specifies the data type and format of the Value(s) contained in the Value Field of a Data Element. VALUE REPRESENTATION FIELD: The field where the Value Representation of a Data Element is stored in the encoding of a Data Element structure with explicit VR.

Examples
  GenAllVR.cxx, GenFakeIdentifyFile.cxx, and SimplePrint.cs.

## Member Enumeration Documentation

## ◆ VRType

enum gdcm::VR::VRType : long long

Enumerator
INVALID |
AE |
AS |
AT |
CS |
DA |
DS |
DT |
FD |
FL |
IS |
LO |
LT |
OB |
OD |
OF |
OL |
OV |
OW |
PN |
SH |
SL |
SQ |
SS |
ST |
SV |
TM |
UC |
UI |
UL |
UN |
UR |
US |
UT |
UV |
OB_OW |
US_SS |
US_SS_OW |
US_OW |
VL16 |
VL32 |
VRASCII |
VRBINARY |
VR_VM1 |
VRALL |
VR_END |

Examples
  NewSequence.cs, and SimplePrint.cs.

## Constructor & Destructor Documentation

## ◆ VR()

gdcm::VR::VR | ( | VRType | vr = INVALID | ) |
| inline

References INVALID.

Referenced by Compatible(), and operator<<.

## Member Function Documentation

## ◆ CanDisplay()

bool gdcm::VR::CanDisplay | ( | VRType | vr | ) |
| static

## ◆ Compatible()

bool gdcm::VR::Compatible | ( | VR const & | vr | ) | const

Examples
  SimplePrint.cs.

References VR().

## ◆ GetLength() [1/2]

int gdcm::VR::GetLength | ( |  | ) | const
| inline

References GetLength().

Referenced by GetLength().

## ◆ GetLength() [2/2]

uint32_t gdcm::VR::GetLength | ( | VRType | vr | ) |
| inline static

References VL32.

## ◆ GetSize()

unsigned int gdcm::VR::GetSize | ( |  | ) | const
| inline

References AE, AS, AT, CS, DA, DS, DT, FD, FL, gdcm_assert, INVALID, IS, LO, LT, OB, OB_OW, OD, OF, OL, OV, OW, PN, SH, SL, SQ, SS, ST, SV, TM, UC, UI, UL, UN, UR, US, US_OW, US_SS, US_SS_OW, UT, UV, VL16, VL32, VR_END, VR_VM1, VRALL, VRASCII, VRBINARY, and VRTypeTemplateCase.

## ◆ GetSizeof()

unsigned int gdcm::VR::GetSizeof | ( |  | ) | const

## ◆ GetVRString()

const char * gdcm::VR::GetVRString | ( | VRType | vr | ) |
| static

Referenced by operator<<, and Write().

## ◆ GetVRStringFromFile()

const char * gdcm::VR::GetVRStringFromFile | ( | VRType | vr | ) |
| static

## ◆ GetVRType()

VRType gdcm::VR::GetVRType | ( | const char * | vr | ) |
| static

## ◆ GetVRTypeFromFile()

VRType gdcm::VR::GetVRTypeFromFile | ( | const char * | vr | ) |
| static

Referenced by Read().

## ◆ IsASCII()

bool gdcm::VR::IsASCII | ( | VRType | vr | ) |
| static

## ◆ IsASCII2()

bool gdcm::VR::IsASCII2 | ( | VRType | vr | ) |
| static

## ◆ IsBinary()

bool gdcm::VR::IsBinary | ( | VRType | vr | ) |
| static

## ◆ IsBinary2()

bool gdcm::VR::IsBinary2 | ( | VRType | vr | ) |
| static

## ◆ IsDual()

bool gdcm::VR::IsDual | ( |  | ) | const

Referenced by Write().

## ◆ IsSwap()

bool gdcm::VR::IsSwap | ( | const char * | vr | ) |
| static

## ◆ IsValid() [1/2]

bool gdcm::VR::IsValid | ( | const char * | vr | ) |
| static

## ◆ IsValid() [2/2]

bool gdcm::VR::IsValid | ( | const char * | vr1,
|  | VRType | vr2 )
| static

## ◆ IsVRFile()

bool gdcm::VR::IsVRFile | ( |  | ) | const

Referenced by gdcm::DataElement::SetVR().

## ◆ operator VRType()

gdcm::VR::operator VRType | ( |  | ) | const
| inline

## ◆ Read()

std::istream & gdcm::VR::Read | ( | std::istream & | is | ) |
| inline

References gdcm_assert, gdcmDebugMacro, GetVRTypeFromFile(), INVALID, VL32, and VR_END.

## ◆ Write()

const std::ostream & gdcm::VR::Write | ( | std::ostream & | os | ) | const
| inline

References gdcm_assert, gdcmAssertAlwaysMacro, GetVRString(), INVALID, IsDual(), and VL32.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | os,
|  | const VR & | vr )
| friend

References VR(), and GetVRString().

The documentation for this class was generated from the following file:

- gdcmVR.h