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]

## Public Types

typedef FragmentVector::const_iterator | ConstIterator
typedef std::vector< Fragment > | FragmentVector
typedef FragmentVector::iterator | Iterator
typedef FragmentVector::size_type | SizeType

## Public Member Functions

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

## Static Public Member Functions

static SmartPointer< SequenceOfFragments > | New ()

## 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 Fragments.

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

Examples
  DecompressImageMultiframe.cs, DecompressJPEGFile.cs, FixBrokenJ2K.cxx, FixJAIBugJPEGLS.cxx, GetJPEGSamplePrecision.cxx, and MpegVideoInfo.cs.

## Member Typedef Documentation

## ConstIterator

typedef FragmentVector::const_iterator gdcm::SequenceOfFragments::ConstIterator

## FragmentVector

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

## Iterator

typedef FragmentVector::iterator gdcm::SequenceOfFragments::Iterator

## SizeType

typedef FragmentVector::size_type gdcm::SequenceOfFragments::SizeType

## Constructor & Destructor Documentation

## SequenceOfFragments()

gdcm::SequenceOfFragments::SequenceOfFragments | ( |  | ) |

inline

constructor (UndefinedLength by default)

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

## Member Function Documentation

## AddFragment()

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

Appends a Fragment to the already added ones.

## Begin() [1/2]

Iterator gdcm::SequenceOfFragments::Begin | ( |  | ) |

inline

Referenced by Print(), and Write().

## Begin() [2/2]

ConstIterator gdcm::SequenceOfFragments::Begin | ( |  | ) | const

inline

## Clear()

void gdcm::SequenceOfFragments::Clear | ( |  | ) |

override virtual

Clear.

Implements gdcm::Value.

## ComputeByteLength()

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

## ComputeLength()

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

## End() [1/2]

Iterator gdcm::SequenceOfFragments::End | ( |  | ) |

inline

Referenced by Print(), and Write().

## End() [2/2]

ConstIterator gdcm::SequenceOfFragments::End | ( |  | ) | const

inline

## GetBuffer()

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

## GetFragBuffer()

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

## GetFragment()

const Fragment & gdcm::SequenceOfFragments::GetFragment | ( | SizeType | num | ) | const

Examples
  DecompressImage.cs, FixBrokenJ2K.cxx, and FixJAIBugJPEGLS.cxx.

## GetLength()

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

inline override virtual

Returns the SQ length, as read from disk.

Implements gdcm::Value.

## GetNumberOfFragments()

SizeType gdcm::SequenceOfFragments::GetNumberOfFragments | ( |  | ) | const

Examples
  FixJAIBugJPEGLS.cxx.

## GetTable() [1/2]

BasicOffsetTable & gdcm::SequenceOfFragments::GetTable | ( |  | ) |

inline

## GetTable() [2/2]

const BasicOffsetTable & gdcm::SequenceOfFragments::GetTable | ( |  | ) | const

inline

## New()

SmartPointer< SequenceOfFragments > gdcm::SequenceOfFragments::New | ( |  | ) |

inline static

Examples
  DecompressImageMultiframe.cs, DecompressJPEGFile.cs, and MpegVideoInfo.cs.

References SequenceOfFragments().

## operator==()

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

inline override virtual

Implements gdcm::Value.

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

## Print()

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

inline override virtual

Reimplemented from gdcm::Object.

References Begin(), and End().

## Read()

template<typename TSwap>

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

inline

References ReadPreValue(), and ReadValue().

## ReadPreValue()

template<typename TSwap>

std::istream & gdcm::SequenceOfFragments::ReadPreValue | ( | std::istream & | is | ) |

inline

References gdcmDebugMacro.

Referenced by Read().

## ReadValue()

template<typename TSwap>

std::istream & gdcm::SequenceOfFragments::ReadValue | ( | std::istream & | is,
|  | bool | )

inline

References gdcmAssertAlwaysMacro, gdcmDebugMacro, gdcmWarningMacro, gdcm::Tag::GetElement(), gdcm::Tag::GetGroup(), gdcm::ByteValue::GetLength(), gdcm::ByteValue::GetPointer(), gdcm::DataElement::GetTag(), gdcm::DataElement::GetVL(), gdcm::Fragment::Read(), gdcm::Fragment::ReadBacktrack(), and gdcm::Exception::what().

Referenced by Read().

## SetLength()

void gdcm::SequenceOfFragments::SetLength | ( | VL | length | ) |

inline override virtual

Sets the actual SQ length.

Implements gdcm::Value.

## Write()

template<typename TSwap>

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

inline

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

## WriteBuffer()

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

Examples
  GetJPEGSamplePrecision.cxx.

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

- gdcmSequenceOfFragments.h