DCMTK: FGStack Class Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
FGStack Class Reference

Class representing a stack in the context of an Enhanced DICOM object. More...

## Public Types
typedef OFMap< Uint32, Uint32 >::iterator | iterator
| Iterator type for iterating over the frames of a stack.
typedef OFMap< Uint32, Uint32 >::const_iterator | const_iterator
| Const iterator for iterating over the frames of a stack.

## Public Member Functions
| FGStack (const OFString &stackID, const OFMap< Uint32, Uint32 > frameNumbers)
| Constructor, creates stack from Stack ID and assigned frame numbers.
| FGStack (const OFString &stackID)
| Constructor, create empty stack with given Stack ID (and fill in frames later).
virtual | ~FGStack ()
| Virtual destructor, frees memory.
const_iterator | begin () const
| Return const iterator to first frame (not sorted after stack position).
iterator | begin ()
| Return iterator to first frame (not sorted after stack position).
const_iterator | end () const
| Return const iterator pointing behind last frame (not sorted after stack position).
iterator | end ()
| Return iterator pointing behind last frame (not sorted after stack position).
virtual OFBool | addFrame (const Uint32 frameNumber, const Uint32 inStackPos)
| Add frame to stack and set its in-stack position.
virtual OFString | getStackID () const
| Get Stack ID uniquely identifying this stack.
Uint32 | getInStackPos (const Uint32 frameNumber) const
| Get the stack position for a given frame.
void | getFramesAtStackPos (const Uint32 inStackPos, OFVector< Uint32 > &resultFrameNumbers)
| Get list of frames that are set to a specific In-Stack Position.

## Private Attributes
OFString | m_StackID
| The Stack ID of this frame.
OFMap< Uint32, Uint32 > | m_FrameNumbers
| Map with frames, key is the frame number, value is the in-stack position.

## Friends
class | FGStackInterface
| Make sure the main interface class has easy access to internal members.

## Detailed Description

Class representing a stack in the context of an Enhanced DICOM object.

Therefore the class stores the ID of the stack (Stack ID) and all the frame numbers being part of that stack, as well as for each frame its position within the stack.

## Constructor & Destructor Documentation

## ◆ FGStack() [1/2]

FGStack::FGStack | ( | const OFString & | stackID,
|  | const OFMap< Uint32, Uint32 > | frameNumbers )

Constructor, creates stack from Stack ID and assigned frame numbers.

Parameters

  stackID | The Stack ID of the stack
  frameNumbers | A map with frame numbers as the keys, and the position of the frame within the stack as the value for each frame. First position is 1. There may be frames having the same positions in the same stack. However, in that case the standard lists some elements which at least must have the same values, then: Dimension Organization UID (0020,9164) to qualify the Stack ID Image Position (Patient) (0020,0032) Image Orientation (Patient) (0020,0037) Rows (0028,0010) * first value of Pixel Spacing (0028,0030) (= field of view in the row direction) Columns (0028,0011) * second value of Pixel Spacing (0028,0030) (= field of view in the column direction) Slice Thickness (0018,0050) The values may change over time (last check was DICOM 2014a), so the latest edition of the standard should be consulted if it is planned to apply the same in-stack position to different frames.

## ◆ FGStack() [2/2]

FGStack::FGStack | ( | const OFString & | stackID | ) |

Constructor, create empty stack with given Stack ID (and fill in frames later).

Parameters

  stackID | The Stack ID of the frame

## Member Function Documentation

## ◆ addFrame()

virtual OFBool FGStack::addFrame | ( | const Uint32 | frameNumber,
|  | const Uint32 | inStackPos )
| virtual

Add frame to stack and set its in-stack position.

Any old position will be overwritten.

Parameters

  frameNumber | The frame number that should be added to the stack
  inStackPos | The position in the stack (starting from 1). More than one frame can have the same position in the stack, however there are rules (see documentation of constructor and the DICOM standard)

Returns
  OFTrue if adding was successful, OFFalse otherwise. So far, always returns OFTrue. This might change in the future.

## ◆ begin() [1/2]

iterator FGStack::begin | ( |  | ) |

Return iterator to first frame (not sorted after stack position).

Returns
  Iterator to first frame

## ◆ begin() [2/2]

const_iterator FGStack::begin | ( |  | ) | const

Return const iterator to first frame (not sorted after stack position).

Returns
  Const iterator to first frame

## ◆ end() [1/2]

iterator FGStack::end | ( |  | ) |

Return iterator pointing behind last frame (not sorted after stack position).

Returns
  Iterator pointing behind last frame

## ◆ end() [2/2]

const_iterator FGStack::end | ( |  | ) | const

Return const iterator pointing behind last frame (not sorted after stack position).

Returns
  Const iterator pointing behind last frame

## ◆ getFramesAtStackPos()

void FGStack::getFramesAtStackPos | ( | const Uint32 | inStackPos,
|  | OFVector< Uint32 > & | resultFrameNumbers )

Get list of frames that are set to a specific In-Stack Position.

Parameters

  inStackPos | In-Stack Position Number to find frames for
  resultFrameNumbers | The frame numbers assigned to that stack position

## ◆ getInStackPos()

Uint32 FGStack::getInStackPos | ( | const Uint32 | frameNumber | ) | const

Get the stack position for a given frame.

Parameters

  frameNumber | The number of the frame

Returns
  The stack position for that frame

## ◆ getStackID()

virtual OFString FGStack::getStackID | ( |  | ) | const
| virtual

Get Stack ID uniquely identifying this stack.

Returns
  The Stack ID

## Member Data Documentation

## ◆ m_FrameNumbers

OFMap<Uint32, Uint32> FGStack::m_FrameNumbers
| private

Map with frames, key is the frame number, value is the in-stack position.

More than one frame can have the same in-stack position

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

- dcmfg/include/dcmtk/dcmfg/stack.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1