# gdcm::SequenceOfItems Class Reference

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.

More...

`#include <gdcmSequenceOfItems.h>`

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

List of all members.

## Public Types
typedef ItemVector::const_iterator | ConstIterator
typedef std::vector< Item > | ItemVector
typedef ItemVector::iterator | Iterator
## Public Member Functions
| SequenceOfItems ()
| constructor (UndefinedLength by default)
void | AddItem (Item const &item)
| Appends an Item to the already added ones.
ConstIterator | Begin () const
Iterator | Begin ()
void | Clear ()
template<typename TDE >
VL | ComputeLength () const
ConstIterator | End () const
Iterator | End ()
bool | FindDataElement (const Tag &t) const
Item & | GetItem (unsigned int position)
const Item & | GetItem (unsigned int position) const
VL | GetLength () const
| Returns the SQ length, as read from disk.
unsigned int | GetNumberOfItems () const
bool | IsUndefinedLength () const
| return if Value Length if of undefined length
SequenceOfItems & | operator= (const SequenceOfItems &val)
void | Print (std::ostream &os) const
template<typename TDE , typename TSwap >
std::istream & | Read (std::istream &is)
void | SetLength (VL length)
| Sets the actual SQ length.
void | SetLengthToUndefined ()
void | SetNumberOfItems (unsigned int n)
template<typename TDE , typename TSwap >
std::ostream const & | Write (std::ostream &os) const
## 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.

## 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:

  AnonymizeAES.cxx, GenSeqs.cxx, and ReadExplicitLengthSQIVR.cxx.

## Member Typedef Documentation

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

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

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

## Constructor & Destructor Documentation

gdcm::SequenceOfItems::SequenceOfItems | ( |  | ) | `[inline]`

constructor (UndefinedLength by default)

## Member Function Documentation

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

Appends an Item to the already added ones.

ConstIterator gdcm::SequenceOfItems::Begin | ( |  | ) | const`[inline]`

Iterator gdcm::SequenceOfItems::Begin | ( |  | ) | `[inline]`

void gdcm::SequenceOfItems::Clear | ( |  | ) | `[inline, virtual]`

Implements gdcm::Value.

template<typename TDE >

VL gdcm::SequenceOfItems::ComputeLength | ( |  | ) | const`[inline]`

ConstIterator gdcm::SequenceOfItems::End | ( |  | ) | const`[inline]`

Iterator gdcm::SequenceOfItems::End | ( |  | ) | `[inline]`

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

Item& gdcm::SequenceOfItems::GetItem | ( | unsigned int | position | ) |

const Item& gdcm::SequenceOfItems::GetItem | ( | unsigned int | position | ) | const

VL gdcm::SequenceOfItems::GetLength | ( |  | ) | const`[inline, virtual]`

Returns the SQ length, as read from disk.

Implements gdcm::Value.

unsigned int gdcm::SequenceOfItems::GetNumberOfItems | ( |  | ) | const`[inline]`

bool gdcm::SequenceOfItems::IsUndefinedLength | ( |  | ) | const`[inline]`

return if Value Length if of undefined length

static SmartPointer<SequenceOfItems> gdcm::SequenceOfItems::New | ( |  | ) | `[inline, static]`

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

References Items, and SequenceLengthField.

void gdcm::SequenceOfItems::Print | ( | std::ostream & | os | ) | const`[inline, virtual]`

Reimplemented from gdcm::Object.

template<typename TDE , typename TSwap >

std::istream& gdcm::SequenceOfItems::Read | ( | std::istream & | is | ) | `[inline]`

References gdcm::Item::Clear(), gdcmWarningMacro, gdcm::Exception::GetDescription(), gdcm::DataElement::GetTag(), and gdcm::Item::Read().

void gdcm::SequenceOfItems::SetLength | ( | VL | length | ) | `[inline, virtual]`

Sets the actual SQ length.

Implements gdcm::Value.

void gdcm::SequenceOfItems::SetLengthToUndefined | ( |  | ) | `[inline]`

void gdcm::SequenceOfItems::SetNumberOfItems | ( | unsigned int | n | ) | `[inline]`

template<typename TDE , typename TSwap >

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

References gdcm::Tag::Write().

## Member Data Documentation

ItemVector gdcm::SequenceOfItems::Items

Vector of Sequence Items.

Referenced by operator=().

VL gdcm::SequenceOfItems::SequenceLengthField

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

Referenced by operator=().

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

- gdcmSequenceOfItems.h