# gdcm::SequenceOfFragments Class Reference

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

`#include <gdcmSequenceOfFragments.h>`

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

List of all members.

## Public Types

typedef std::vector< Fragment > | FragmentVector

## Public Member Functions

| SequenceOfFragments ()
| constructor (UndefinedLength by default)
void | AddFragment (Fragment const &item)
| Appends a Fragment to the already added ones.
void | Clear ()
unsigned long | ComputeByteLength () const
VL | ComputeLength () const
bool | GetBuffer (char *buffer, unsigned long length) const
bool | GetFragBuffer (unsigned int fragNb, char *buffer, unsigned long &length) const
const Fragment & | GetFragment (unsigned int num) const
VL | GetLength () const
| Returns the SQ length, as read from disk.
unsigned int | GetNumberOfFragments () const
const BasicOffsetTable & | GetTable () const
BasicOffsetTable & | GetTable ()
bool | operator== (const Value &val) const
void | Print (std::ostream &os) const
template<typename TSwap >
std::istream & | Read (std::istream &is)
void | SetLength (VL length)
| Sets the actual SQ length.
template<typename TSwap >
std::ostream const & | Write (std::ostream &os) const
bool | WriteBuffer (std::ostream &os) const

## Static Public Member Functions

static SmartPointer < SequenceOfFragments > | New ()

## Public Attributes

FragmentVector | Fragments
| Vector of Sequence Fragments.
VL | SequenceLengthField
BasicOffsetTable | Table

## Detailed Description

Class to represent a Sequence Of Fragments.

Todo:
  I do not enforce that Sequence of Fragments ends with a SQ end del

Examples:

  FixBrokenJ2K.cxx, and GetJPEGSamplePrecision.cxx.

## Member Typedef Documentation

typedef std::vector<Fragment> gdcm::SequenceOfFragments::FragmentVector

## Constructor & Destructor Documentation

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

constructor (UndefinedLength by default)

## Member Function Documentation

void gdcm::SequenceOfFragments::AddFragment | ( | Fragment const & | item | ) |

Appends a Fragment to the already added ones.

void gdcm::SequenceOfFragments::Clear | ( |  | ) | `[virtual]`

Implements gdcm::Value.

unsigned long gdcm::SequenceOfFragments::ComputeByteLength | ( |  | ) | const

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

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

bool gdcm::SequenceOfFragments::GetFragBuffer | ( | unsigned int | fragNb,
|  | char * | buffer,
|  | unsigned long & | length
| ) |  | const

const Fragment& gdcm::SequenceOfFragments::GetFragment | ( | unsigned int | num | ) | const

Examples:
  FixBrokenJ2K.cxx.

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

Returns the SQ length, as read from disk.

Implements gdcm::Value.

unsigned int gdcm::SequenceOfFragments::GetNumberOfFragments | ( |  | ) | const

BasicOffsetTable& gdcm::SequenceOfFragments::GetTable | ( |  | ) | `[inline]`

const BasicOffsetTable& gdcm::SequenceOfFragments::GetTable | ( |  | ) | const`[inline]`

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

bool gdcm::SequenceOfFragments::operator== | ( | const Value & | val | ) | const`[inline, virtual]`

Implements gdcm::Value.

References Fragments, SequenceLengthField, and Table.

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

Reimplemented from gdcm::Object.

template<typename TSwap >

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

References gdcmDebugMacro, gdcmWarningMacro, gdcm::DataElement::GetTag(), gdcm::DataElement::GetVL(), gdcm::Fragment::Read(), gdcm::DataElement::SetByteValue(), and gdcm::Exception::what().

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

Sets the actual SQ length.

Implements gdcm::Value.

template<typename TSwap >

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

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

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

Examples:
  GetJPEGSamplePrecision.cxx.

## Member Data Documentation

FragmentVector gdcm::SequenceOfFragments::Fragments

Vector of Sequence Fragments.

Referenced by operator==().

VL gdcm::SequenceOfFragments::SequenceLengthField

Referenced by operator==().

BasicOffsetTable gdcm::SequenceOfFragments::Table

Referenced by operator==().

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

- gdcmSequenceOfFragments.h