DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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. More...
 
 FGStack (const OFString &stackID)
 Constructor, create empty stack with given Stack ID (and fill in frames later) More...
 
virtual ~FGStack ()
 Virtual destructor, frees memory.
 
const_iterator begin () const
 Return const iterator to first frame (not sorted after stack position) More...
 
iterator begin ()
 Return iterator to first frame (not sorted after stack position) More...
 
const_iterator end () const
 Return const iterator pointing behind last frame (not sorted after stack position) More...
 
iterator end ()
 Return iterator pointing behind last frame (not sorted after stack position) More...
 
virtual OFBool addFrame (const Uint32 frameNumber, const Uint32 inStackPos)
 Add frame to stack and set its in-stack position. More...
 
virtual OFString getStackID () const
 Get Stack ID uniquely identifying this stack. More...
 
Uint32 getInStackPos (const Uint32 frameNumber) const
 Get the stack position for a given frame. More...
 
void getFramesAtStackPos (const Uint32 inStackPos, OFVector< Uint32 > &resultFrameNumbers)
 Get list of frames that are set to a specific In-Stack Position. More...
 

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. More...
 

Friends

class FGStackInterface
 

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::FGStack ( const OFString stackID,
const OFMap< Uint32, Uint32 >  frameNumbers 
)

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

Parameters
stackIDThe Stack ID of the stack
frameNumbersA 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::FGStack ( const OFString stackID)

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

Parameters
stackIDThe Stack ID of the frame

Member Function Documentation

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
frameNumberThe frame number that should be added to the stack
inStackPosThe 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)
const_iterator FGStack::begin ( ) const

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

Returns
Const iterator to first frame
iterator FGStack::begin ( )

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

Returns
Iterator to first frame
const_iterator FGStack::end ( ) const

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

Returns
Const iterator pointing behind last frame
iterator FGStack::end ( )

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

Returns
Iterator pointing behind last frame
void FGStack::getFramesAtStackPos ( const Uint32  inStackPos,
OFVector< Uint32 > &  resultFrameNumbers 
)

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

Parameters
inStackPosIn-Stack Position Number to find frames for
resultFrameNumbersThe frame numbers assigned to that stack position
Uint32 FGStack::getInStackPos ( const Uint32  frameNumber) const

Get the stack position for a given frame.

Parameters
frameNumberThe number of the frame
Returns
The stack position for that frame
virtual OFString FGStack::getStackID ( ) const
virtual

Get Stack ID uniquely identifying this stack.

Returns
The Stack ID

Member Data Documentation

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:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8