gdcm::ByteValue Class Reference

Class to represent binary value (array of bytes). More...

`#include <gdcmByteValue.h>`

Inheritance diagram for gdcm::ByteValue:
[legend]
Collaboration diagram for gdcm::ByteValue:
[legend]

## Public Member Functions

| ByteValue (const char *array=nullptr, VL const &vl=0)
| ByteValue (std::vector< char > &v)
| ~ByteValue () override
void | Append (ByteValue const &bv)
void | Clear () override
VL | ComputeLength () const
void | Fill (char c)
bool | GetBuffer (char *buffer, unsigned long length) const
VL | GetLength () const override
const char * | GetPointer () const
void * | GetVoidPointer ()
const void * | GetVoidPointer () const
bool | IsEmpty () const
bool | IsPrintable (VL length) const
| Checks whether a 'ByteValue' is printable or not (in order to avoid corrupting the terminal of invocation when printing) I don't think this function is working since it does not handle UNICODE or character set...
| operator const std::vector< char > & () const
ByteValue & | operator= (const ByteValue &val)
bool | operator== (const ByteValue &val) const
bool | operator== (const Value &val) const override
void | PrintASCII (std::ostream &os, VL maxlength) const
void | PrintASCIIXML (std::ostream &os) const
void | PrintGroupLength (std::ostream &os)
void | PrintHex (std::ostream &os, VL maxlength) const
void | PrintHexXML (std::ostream &os) const
void | PrintPNXML (std::ostream &os) const
template<typename TSwap>
std::istream & | Read (std::istream &is)
template<typename TSwap, typename TType>
std::istream & | Read (std::istream &is, bool readvalues=true)
void | SetLength (VL vl) override
template<typename TSwap>
std::ostream const & | Write (std::ostream &os) const
template<typename TSwap, typename TType>
std::ostream const & | Write (std::ostream &os) const
bool | WriteBuffer (std::ostream &os) const
Public Member Functions inherited from gdcm::Value
| Value ()=default
| ~Value () override=default
Public Member Functions inherited from gdcm::Object
| Object ()
| Object (const Object &)
| Special requirement for copy/cstor, assignment operator.
virtual | ~Object ()
void | operator= (const Object &)

## Protected Member Functions

void | Print (std::ostream &os) const override
void | SetLengthOnly (VL vl) override
Protected Member Functions inherited from gdcm::Object
void | Register ()
void | UnRegister ()

## Detailed Description

Class to represent binary value (array of bytes).

Examples
  DumpADAC.cxx, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DumpSiemensBase64.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, DuplicatePCDE.cxx, ELSCINT1WaveToText.cxx, ExtractEncapsulatedFile.cs, ExtractEncryptedContent.cxx, ExtractIconFromFile.cxx, FixBrokenJ2K.cxx, FixJAIBugJPEGLS.cxx, GetSubSequenceData.cxx, MrProtocol.cxx, PatchFile.cxx, ReadExplicitLengthSQIVR.cxx, pmsct_rgb1.cxx, and rle2img.cxx.

## Constructor & Destructor Documentation

## ByteValue() [1/2]

gdcm::ByteValue::ByteValue | ( | const char * | array = nullptr,
|  | VL const & | vl = 0 )

inline

Referenced by Append(), operator=(), operator==(), and operator==().

## ByteValue() [2/2]

gdcm::ByteValue::ByteValue | ( | std::vector< char > & | v | ) |

inline

Warning
  casting to uint32_t

## ~ByteValue()

gdcm::ByteValue::~ByteValue | ( |  | ) |

inline override

## Member Function Documentation

## Append()

void gdcm::ByteValue::Append | ( | ByteValue const & | bv | ) |

References ByteValue().

## Clear()

void gdcm::ByteValue::Clear | ( |  | ) |

inline override virtual

Implements gdcm::Value.

## ComputeLength()

VL gdcm::ByteValue::ComputeLength | ( |  | ) | const

inline

Referenced by gdcm::Fragment::Write().

## Fill()

void gdcm::ByteValue::Fill | ( | char | c | ) |

inline

Examples
  DuplicatePCDE.cxx.

## GetBuffer()

bool gdcm::ByteValue::GetBuffer | ( | char * | buffer,
|  | unsigned long | length ) const

Examples
  ExtractEncapsulatedFile.cs, and FixJAIBugJPEGLS.cxx.

## GetLength()

VL gdcm::ByteValue::GetLength | ( |  | ) | const

inline override virtual

Implements gdcm::Value.

Examples
  DumpADAC.cxx, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DumpSiemensBase64.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, ELSCINT1WaveToText.cxx, ExtractEncapsulatedFile.cs, ExtractEncryptedContent.cxx, ExtractIconFromFile.cxx, FixBrokenJ2K.cxx, FixJAIBugJPEGLS.cxx, GetSubSequenceData.cxx, MrProtocol.cxx, PatchFile.cxx, ReadExplicitLengthSQIVR.cxx, ReadGEMSSDO.cxx, pmsct_rgb1.cxx, and rle2img.cxx.

Referenced by gdcm::CSAElement::operator<<, gdcm::SequenceOfFragments::ReadValue(), gdcm::Element< TVR, TVM >::Set(), gdcm::Element< TVR, VM::VM1_n >::Set(), gdcm::Attribute< Group, Element, TVR, TVM >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, VM::VM1 >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, VM::VM1_n >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, TVM >::SetByteValueNoSwap(), gdcm::Attribute< Group, Element, TVR, VM::VM1 >::SetByteValueNoSwap(), gdcm::Element< TVR, TVM >::SetNoSwap(), gdcm::Element< TVR, VM::VM1_n >::SetNoSwap(), and gdcm::Fragment::Write().

## GetPointer()

const char * gdcm::ByteValue::GetPointer | ( |  | ) | const

inline

Examples
  DumpADAC.cxx, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DumpSiemensBase64.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, ELSCINT1WaveToText.cxx, ExtractEncryptedContent.cxx, ExtractIconFromFile.cxx, GetSubSequenceData.cxx, MrProtocol.cxx, ReadExplicitLengthSQIVR.cxx, ReadGEMSSDO.cxx, pmsct_rgb1.cxx, and rle2img.cxx.

Referenced by gdcm::CSAElement::operator<<, gdcm::SequenceOfFragments::ReadValue(), gdcm::Element< TVR, TVM >::Set(), gdcm::Element< TVR, VM::VM1_n >::Set(), gdcm::Attribute< Group, Element, TVR, TVM >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, VM::VM1 >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, VM::VM1_n >::SetByteValue(), gdcm::Attribute< Group, Element, TVR, TVM >::SetByteValueNoSwap(), gdcm::Attribute< Group, Element, TVR, VM::VM1 >::SetByteValueNoSwap(), gdcm::Element< TVR, TVM >::SetNoSwap(), and gdcm::Element< TVR, VM::VM1_n >::SetNoSwap().

## GetVoidPointer() [1/2]

void * gdcm::ByteValue::GetVoidPointer | ( |  | ) |

inline

## GetVoidPointer() [2/2]

const void * gdcm::ByteValue::GetVoidPointer | ( |  | ) | const

inline

Examples
  FixBrokenJ2K.cxx.

Referenced by Read(), and gdcm::Element< TVR, VM::VM1_n >::Set().

## IsEmpty()

bool gdcm::ByteValue::IsEmpty | ( |  | ) | const

inline

## IsPrintable()

bool gdcm::ByteValue::IsPrintable | ( | VL | length | ) | const

inline

Checks whether a 'ByteValue' is printable or not (in order to avoid corrupting the terminal of invocation when printing) I don't think this function is working since it does not handle UNICODE or character set...

Referenced by Print().

## operator const std::vector< char > &()

gdcm::ByteValue::operator const std::vector< char > & | ( |  | ) | const

inline

## operator=()

ByteValue & gdcm::ByteValue::operator= | ( | const ByteValue & | val | ) |

inline

References ByteValue().

## operator==() [1/2]

bool gdcm::ByteValue::operator== | ( | const ByteValue & | val | ) | const

inline

References ByteValue().

## operator==() [2/2]

bool gdcm::ByteValue::operator== | ( | const Value & | val | ) | const

inline override virtual

Implements gdcm::Value.

References ByteValue(), and gdcm::Value::Value().

## Print()

void gdcm::ByteValue::Print | ( | std::ostream & | os | ) | const

inline override protected virtual

Reimplemented from gdcm::Object.

References IsPrintable().

## PrintASCII()

void gdcm::ByteValue::PrintASCII | ( | std::ostream & | os,
|  | VL | maxlength ) const

## PrintASCIIXML()

void gdcm::ByteValue::PrintASCIIXML | ( | std::ostream & | os | ) | const

## PrintGroupLength()

void gdcm::ByteValue::PrintGroupLength | ( | std::ostream & | os | ) |

inline

## PrintHex()

void gdcm::ByteValue::PrintHex | ( | std::ostream & | os,
|  | VL | maxlength ) const

## PrintHexXML()

void gdcm::ByteValue::PrintHexXML | ( | std::ostream & | os | ) | const

## PrintPNXML()

void gdcm::ByteValue::PrintPNXML | ( | std::ostream & | os | ) | const

To Print Values in Native DICOM format

## Read() [1/2]

template<typename TSwap>

std::istream & gdcm::ByteValue::Read | ( | std::istream & | is | ) |

inline

References Read().

## Read() [2/2]

template<typename TSwap, typename TType>

std::istream & gdcm::ByteValue::Read | ( | std::istream & | is,
|  | bool | readvalues = true )

inline

References GetVoidPointer().

Referenced by Read().

## SetLength()

void gdcm::ByteValue::SetLength | ( | VL | vl | ) |

override virtual

Implements gdcm::Value.

## SetLengthOnly()

void gdcm::ByteValue::SetLengthOnly | ( | VL | vl | ) |

inline override protected virtual

Reimplemented from gdcm::Value.

## Write() [1/2]

template<typename TSwap>

std::ostream const & gdcm::ByteValue::Write | ( | std::ostream & | os | ) | const

inline

References Write().

## Write() [2/2]

template<typename TSwap, typename TType>

std::ostream const & gdcm::ByteValue::Write | ( | std::ostream & | os | ) | const

inline

Referenced by Write(), and gdcm::Fragment::Write().

## WriteBuffer()

bool gdcm::ByteValue::WriteBuffer | ( | std::ostream & | os | ) | const

inline

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

- gdcmByteValue.h