gdcm::Item Class Reference

Class to represent an Item. More...

`#include <gdcmItem.h>`

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

## Public Member Functions

| Item ()
| Item (Item const &val)
void | Clear ()
bool | FindDataElement (const Tag &t) const
const DataElement & | GetDataElement (const Tag &t) const
template<typename TDE>
VL | GetLength () const
DataSet & | GetNestedDataSet ()
const DataSet & | GetNestedDataSet () const
void | InsertDataElement (const DataElement &de)
template<typename TDE, typename TSwap>
std::istream & | Read (std::istream &is)
void | SetNestedDataSet (const DataSet &nested)
template<typename TDE, typename TSwap>
const std::ostream & | Write (std::ostream &os) const
Public Member Functions inherited from gdcm::DataElement
| DataElement (const DataElement &_val)
| DataElement (const Tag &t=Tag(0), const VL &vl=0, const VR &vr=VR::INVALID)
void | Clear ()
| Clear Data Element (make Value empty and invalidate Tag & VR).
void | Empty ()
| Make Data Element empty (no Value).
const ByteValue * | GetByteValue () const
template<typename TDE>
VL | GetLength () const
SequenceOfFragments * | GetSequenceOfFragments ()
const SequenceOfFragments * | GetSequenceOfFragments () const
Tag & | GetTag ()
const Tag & | GetTag () const
| Get Tag.
Value & | GetValue ()
Value const & | GetValue () const
| Set/Get Value (bytes array, SQ of items, SQ of fragments):
SmartPointer< SequenceOfItems > | GetValueAsSQ () const
VL & | GetVL ()
const VL & | GetVL () const
| Get VL.
VR const & | GetVR () const
bool | IsEmpty () const
| Check if Data Element is empty.
bool | IsUndefinedLength () const
| return if Value Length if of undefined length
bool | operator< (const DataElement &de) const
DataElement & | operator= (const DataElement &)=default
bool | operator== (const DataElement &de) const
template<typename TDE, typename TSwap>
std::istream & | Read (std::istream &is)
template<typename TDE, typename TSwap>
std::istream & | ReadOrSkip (std::istream &is, std::set< Tag > const &skiptags)
template<typename TDE, typename TSwap>
std::istream & | ReadPreValue (std::istream &is, std::set< Tag > const &skiptags)
template<typename TDE, typename TSwap>
std::istream & | ReadValue (std::istream &is, std::set< Tag > const &skiptags)
template<typename TDE, typename TSwap>
std::istream & | ReadValueWithLength (std::istream &is, VL &length, std::set< Tag > const &skiptags)
template<typename TDE, typename TSwap>
std::istream & | ReadWithLength (std::istream &is, VL &length)
void | SetByteValue (const char *array, VL length)
void | SetTag (const Tag &t)
void | SetValue (Value const &vl)
void | SetVL (const VL &vl)
void | SetVLToUndefined ()
void | SetVR (VR const &vr)
template<typename TDE, typename TSwap>
const std::ostream & | Write (std::ostream &os) const

## Friends

std::ostream & | operator<< (std::ostream &os, const Item &val)

## Additional Inherited Members

Protected Types inherited from gdcm::DataElement
typedef SmartPointer< Value > | ValuePtr
Protected Member Functions inherited from gdcm::DataElement
void | SetValueFieldLength (VL vl, bool readvalues)
Protected Attributes inherited from gdcm::DataElement
Tag | TagField
ValuePtr | ValueField
VL | ValueLengthField
VR | VRField

## Detailed Description

Class to represent an Item.

A component of the value of a Data Element that is of Value Representation Sequence of Items. An Item contains a Data Set . See PS 3.5 7.5.1 Item Encoding Rules Each Item of a Data Element of VR SQ shall be encoded as a DICOM Standard Data Element with a specific Data Element Tag of Value (FFFE,E000). The Item Tag is followed by a 4 byte Item Length field encoded in one of the following two ways Explicit/ Implicit

Note
  ITEM: A component of the Value of a Data Element that is of Value Representation Sequence of Items. An Item contains a Data Set.

Examples
  ChangeSequenceUltrasound.cxx, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpPhilipsECHO.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, DumpVisusChange.cxx, ExtractEncryptedContent.cxx, Extracting_All_Resolution.cxx, Fake_Image_Using_Stream_Image_Writer.cxx, GenAllVR.cxx, GenFakeIdentifyFile.cxx, GenLongSeqs.cxx, GenSeqs.cxx, GetSequenceUltrasound.cxx, GetSubSequenceData.cxx, LargeVRDSExplicit.cxx, NewSequence.cs, SimplePrint.cs, gdcmrtionplan.cxx, and gdcmrtplan.cxx.

## Constructor & Destructor Documentation

## Item() [1/2]

gdcm::Item::Item | ( |  | ) |

inline

References gdcm::DataElement::DataElement().

Referenced by Item(), and operator<<.

## Item() [2/2]

gdcm::Item::Item | ( | Item const & | val | ) |

inline

References gdcm::DataElement::DataElement(), and Item().

## Member Function Documentation

## Clear()

void gdcm::Item::Clear | ( |  | ) |

inline

References gdcm::DataElement::Clear().

Referenced by gdcm::SequenceOfItems::Read().

## FindDataElement()

bool gdcm::Item::FindDataElement | ( | const Tag & | t | ) | const

inline

## GetDataElement()

const DataElement & gdcm::Item::GetDataElement | ( | const Tag & | t | ) | const

inline

References gdcm::DataElement::DataElement().

## GetLength()

template<typename TDE>

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

## GetNestedDataSet() [1/2]

DataSet & gdcm::Item::GetNestedDataSet | ( |  | ) |

inline

## GetNestedDataSet() [2/2]

const DataSet & gdcm::Item::GetNestedDataSet | ( |  | ) | const

inline

Examples
  ChangeSequenceUltrasound.cxx, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpPhilipsECHO.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, DumpVisusChange.cxx, ExtractEncryptedContent.cxx, Extracting_All_Resolution.cxx, Fake_Image_Using_Stream_Image_Writer.cxx, GenAllVR.cxx, GenFakeIdentifyFile.cxx, GenSeqs.cxx, GetSequenceUltrasound.cxx, GetSubSequenceData.cxx, LargeVRDSExplicit.cxx, NewSequence.cs, SimplePrint.cs, gdcmrtionplan.cxx, and gdcmrtplan.cxx.

Referenced by gdcm::SequenceOfItems::Read().

## InsertDataElement()

void gdcm::Item::InsertDataElement | ( | const DataElement & | de | ) |

inline

References gdcm::DataElement::DataElement(), and gdcm::DataElement::IsUndefinedLength().

## Read()

template<typename TDE, typename TSwap>

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

inline

References gdcm::ByteSwapFilter::ByteSwap(), gdcm::DataSet::Clear(), gdcmDebugMacro, gdcmErrorMacro, gdcmWarningMacro, gdcm::DataSet::IsEmpty(), gdcm::DataElement::ReadWithLength(), gdcm::ByteSwapFilter::SetByteSwapTag(), gdcm::SwapperDoOp::Swap(), gdcm::DataElement::TagField, and gdcm::DataElement::ValueLengthField.

Referenced by gdcm::SequenceOfItems::Read().

## SetNestedDataSet()

void gdcm::Item::SetNestedDataSet | ( | const DataSet & | nested | ) |

inline

## Write()

template<typename TDE, typename TSwap>

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

inline

References gdcmWarningMacro, gdcm::VL::GetLength(), gdcm::DataElement::TagField, gdcm::DataElement::ValueLengthField, gdcm::Tag::Write(), and gdcm::VL::Write().

## Friends And Related Symbol Documentation

## operator<<

std::ostream & operator<< | ( | std::ostream & | os,
|  | const Item & | val )

friend

References Item(), operator<<, gdcm::DataSet::Print(), gdcm::DataElement::TagField, and gdcm::DataElement::ValueLengthField.

Referenced by operator<<.

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

- gdcmItem.h