GDCM 3.2.1

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gdcm::SequenceOfItems Class Reference

Class to represent a Sequence Of Items. More...

`#include <gdcmSequenceOfItems.h>`

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

## Public Types
typedef ItemVector::const_iterator | ConstIterator
typedef std::vector< Item > | ItemVector
typedef ItemVector::iterator | Iterator
typedef ItemVector::size_type | SizeType

## Public Member Functions
| SequenceOfItems ()
| constructor (UndefinedLength by default)
void | AddItem (Item const &item)
| Appends an Item to the already added ones.
Item & | AddNewUndefinedLengthItem ()
| Appends an Item to the already added ones.
Iterator | Begin ()
ConstIterator | Begin () const
void | Clear () override
| remove all items within the sequence
template<typename TDE>
VL | ComputeLength () const
Iterator | End ()
ConstIterator | End () const
bool | FindDataElement (const Tag &t) const
Item & | GetItem (SizeType position)
const Item & | GetItem (SizeType position) const
VL | GetLength () const override
| Returns the SQ length, as read from disk.
SizeType | GetNumberOfItems () const
bool | IsEmpty () const
bool | IsUndefinedLength () const
| return if Value Length if of undefined length
SequenceOfItems & | operator= (const SequenceOfItems &val)
bool | operator== (const Value &val) const override
void | Print (std::ostream &os) const override
template<typename TDE, typename TSwap>
std::istream & | Read (std::istream &is, bool readvalues=true)
bool | RemoveItemByIndex (const SizeType index)
void | SetLength (VL length) override
| Sets the actual SQ length.
void | SetLengthToUndefined ()
| Properly set the Sequence of Item to be undefined length.
void | SetNumberOfItems (SizeType n)
template<typename TDE, typename TSwap>
std::ostream const & | Write (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 &)

## Static Public Member Functions
static SmartPointer< SequenceOfItems > | New ()

## Public Attributes
ItemVector | Items
| Vector of Sequence Items.
VL | SequenceLengthField
| Total length of the Sequence (or 0xffffffff) if undefined.

## Additional Inherited Members
Protected Member Functions inherited from gdcm::Value
virtual void | SetLengthOnly (VL l)
Protected Member Functions inherited from gdcm::Object
void | Register ()
void | UnRegister ()

## Detailed Description

Class to represent a Sequence Of Items.

(value representation : SQ)

- a Value Representation for Data Elements that contains a sequence of Data Sets.
- Sequence of Item allows for Nested Data Sets

See PS 3.5, 7.4.6 Data Element Type Within a Sequence

Note
  SEQUENCE OF ITEMS (VALUE REPRESENTATION SQ) A Value Representation for Data Elements that contain a sequence of Data Sets. Sequence of Items allows for Nested Data Sets.

Examples
  DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, ExtractEncryptedContent.cxx, Extracting_All_Resolution.cxx, Fake_Image_Using_Stream_Image_Writer.cxx, GenAllVR.cxx, GenFakeIdentifyFile.cxx, GenLongSeqs.cxx, GenSeqs.cxx, GetSequenceUltrasound.cxx, and ReadExplicitLengthSQIVR.cxx.

## Member Typedef Documentation

## ◆ ConstIterator

typedef ItemVector::const_iterator gdcm::SequenceOfItems::ConstIterator

## ◆ ItemVector

typedef std::vector< Item > gdcm::SequenceOfItems::ItemVector

## ◆ Iterator

typedef ItemVector::iterator gdcm::SequenceOfItems::Iterator

## ◆ SizeType

typedef ItemVector::size_type gdcm::SequenceOfItems::SizeType

Examples
  DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, and GetSubSequenceData.cxx.

## Constructor & Destructor Documentation

## ◆ SequenceOfItems()

gdcm::SequenceOfItems::SequenceOfItems | ( |  | ) |
| inline

constructor (UndefinedLength by default)

References SequenceLengthField.

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

## Member Function Documentation

## ◆ AddItem()

void gdcm::SequenceOfItems::AddItem | ( | Item const & | item | ) |

Appends an Item to the already added ones.

Examples
  Extracting_All_Resolution.cxx.

## ◆ AddNewUndefinedLengthItem()

Item & gdcm::SequenceOfItems::AddNewUndefinedLengthItem | ( |  | ) |

Appends an Item to the already added ones.

## ◆ Begin() [1/2]

Iterator gdcm::SequenceOfItems::Begin | ( |  | ) |
| inline

References Items.

## ◆ Begin() [2/2]

ConstIterator gdcm::SequenceOfItems::Begin | ( |  | ) | const
| inline

References Items.

## ◆ Clear()

void gdcm::SequenceOfItems::Clear | ( |  | ) |
| override virtual

remove all items within the sequence

Implements gdcm::Value.

## ◆ ComputeLength()

template<typename TDE>

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

## ◆ End() [1/2]

Iterator gdcm::SequenceOfItems::End | ( |  | ) |
| inline

References Items.

## ◆ End() [2/2]

ConstIterator gdcm::SequenceOfItems::End | ( |  | ) | const
| inline

References Items.

## ◆ FindDataElement()

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

## ◆ GetItem() [1/2]

Item & gdcm::SequenceOfItems::GetItem | ( | SizeType | position | ) |

## ◆ GetItem() [2/2]

const Item & gdcm::SequenceOfItems::GetItem | ( | SizeType | position | ) | const

Examples
  DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, ExtractEncryptedContent.cxx, and GetSequenceUltrasound.cxx.

## ◆ GetLength()

VL gdcm::SequenceOfItems::GetLength | ( |  | ) | const
| inline override virtual

Returns the SQ length, as read from disk.

Implements gdcm::Value.

References SequenceLengthField.

Referenced by Read().

## ◆ GetNumberOfItems()

SizeType gdcm::SequenceOfItems::GetNumberOfItems | ( |  | ) | const
| inline

Examples
  DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, ExtractEncryptedContent.cxx, and GetSequenceUltrasound.cxx.

References Items.

## ◆ IsEmpty()

bool gdcm::SequenceOfItems::IsEmpty | ( |  | ) | const
| inline

References Items.

## ◆ IsUndefinedLength()

bool gdcm::SequenceOfItems::IsUndefinedLength | ( |  | ) | const
| inline

return if Value Length if of undefined length

References SequenceLengthField.

## ◆ New()

SmartPointer< SequenceOfItems > gdcm::SequenceOfItems::New | ( |  | ) |
| inline static

Examples
  NewSequence.cs.

References SequenceOfItems().

## ◆ operator=()

SequenceOfItems & gdcm::SequenceOfItems::operator= | ( | const SequenceOfItems & | val | ) |
| inline

References SequenceOfItems(), Items, and SequenceLengthField.

## ◆ operator==()

bool gdcm::SequenceOfItems::operator== | ( | const Value & | val | ) | const
| inline override virtual

Implements gdcm::Value.

References SequenceOfItems(), gdcm::Value::Value(), Items, and SequenceLengthField.

## ◆ Print()

void gdcm::SequenceOfItems::Print | ( | std::ostream & | os | ) | const
| inline override virtual

Reimplemented from gdcm::Object.

References Items, and SequenceLengthField.

## ◆ Read()

template<typename TDE, typename TSwap>

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

References gdcm::Item::Clear(), gdcm_assert, gdcmDebugMacro, gdcmWarningMacro, gdcm::Exception::GetDescription(), GetLength(), gdcm::Item::GetNestedDataSet(), gdcm::DataElement::GetTag(), gdcm::DataElement::GetVL(), Items, gdcm::Item::Read(), SequenceLengthField, and gdcm::DataSet::Size().

## ◆ RemoveItemByIndex()

bool gdcm::SequenceOfItems::RemoveItemByIndex | ( | const SizeType | index | ) |

Remove an Item as specified by its index, if index > size, false is returned Index starts at 1 not 0

## ◆ SetLength()

void gdcm::SequenceOfItems::SetLength | ( | VL | length | ) |
| inline override virtual

Sets the actual SQ length.

Implements gdcm::Value.

References SequenceLengthField.

## ◆ SetLengthToUndefined()

void gdcm::SequenceOfItems::SetLengthToUndefined | ( |  | ) |

Properly set the Sequence of Item to be undefined length.

## ◆ SetNumberOfItems()

void gdcm::SequenceOfItems::SetNumberOfItems | ( | SizeType | n | ) |
| inline

References Items.

## ◆ Write()

template<typename TDE, typename TSwap>

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

References Items, SequenceLengthField, gdcm::Tag::Write(), and gdcm::VL::Write().

## Member Data Documentation

## ◆ Items

ItemVector gdcm::SequenceOfItems::Items

Vector of Sequence Items.

Referenced by Begin(), Begin(), End(), End(), GetNumberOfItems(), IsEmpty(), operator=(), operator==(), Print(), Read(), SetNumberOfItems(), and Write().

## ◆ SequenceLengthField

VL gdcm::SequenceOfItems::SequenceLengthField

Total length of the Sequence (or 0xffffffff) if undefined.

Referenced by SequenceOfItems(), GetLength(), IsUndefinedLength(), operator=(), operator==(), Print(), Read(), SetLength(), and Write().

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

- gdcmSequenceOfItems.h