DCMTK: DcmIODTypes::Frame< PixelType > Class Template Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DcmIODTypes::Frame< PixelType > Class Template Reference

Struct representing a single frame. More...

Inheritance diagram for DcmIODTypes::Frame< PixelType >:

## Public Member Functions
| Frame ()
| Default constructor.
| Frame (const size_t numPixels)
| Constructor that creates pixel data of the given size (amount of pixels).
| Frame (PixelType *pixelData, const size_t sizeInBytes)
| Constructor that takes over pixel data for managing.
| Frame (const Frame &rhs)
| Copy constructor, copies pixel data.
Frame & | operator= (const Frame &rhs)
| Assignment constructor, copies pixel data.
virtual void | setReleaseMemory (OFBool release)
| Set whether pixel data should be release by this class (default) or is managed externally.
virtual size_t | getLengthInBytes () const
| Get size of pixel data in bytes.
virtual void * | getPixelData () const
| Returns pointer to pixel data (untyped).
virtual PixelType * | getPixelDataTyped () const
| Returns pointer to pixel data (typed).
virtual Uint8 | bytesPerPixel () const
| Returns number of pixels (not necessarily bytes) in the frame.
virtual OFCondition | getUint8AtIndex (Uint8 &byteVal, const size_t index) const
| Get value at given index as 8 bit value.
virtual OFCondition | getUint16AtIndex (Uint16 &shortVal, const size_t index) const
| Get value at given index as 16 bit value.
virtual OFString | print () const
| Print frame data to string (for debugging purposes).
| ~Frame ()
| Destructor, frees memory if not disabled via setReleaseMemory() method.
Public Member Functions inherited from DcmIODTypes::FrameBase
| FrameBase ()
| Destructor.
virtual | ~FrameBase ()
| Deconstructor, frees frame data if not disabled via setReleaseMemory() method.

## Public Attributes
PixelType * | m_pixData
| Array for the pixel data bytes.
size_t | m_numPixels
| Number of pixels in the frame.

## Detailed Description

template<typename PixelType>
class DcmIODTypes::Frame< PixelType >

Struct representing a single frame.

## Constructor & Destructor Documentation

## ◆ Frame() [1/3]

template<typename PixelType>

DcmIODTypes::Frame< PixelType >::Frame | ( | const size_t | numPixels | ) |
| inline

Constructor that creates pixel data of the given size (amount of pixels).

Parameters

  numPixels | Number of pixels to allocate

References m_numPixels, and m_pixData.

## ◆ Frame() [2/3]

template<typename PixelType>

DcmIODTypes::Frame< PixelType >::Frame | ( | PixelType * | pixelData,
|  | const size_t | sizeInBytes )
| inline

Constructor that takes over pixel data for managing.

Parameters

  pixelData | Pointer to pixel data that is afterwards managed by this class
  sizeInBytes | Size of pixel data in bytes

References m_numPixels, and m_pixData.

## ◆ Frame() [3/3]

template<typename PixelType>

DcmIODTypes::Frame< PixelType >::Frame | ( | const Frame< PixelType > & | rhs | ) |
| inline

Copy constructor, copies pixel data.

Parameters

  rhs | Frame to copy

References Frame(), m_numPixels, and m_pixData.

## Member Function Documentation

## ◆ bytesPerPixel()

template<typename PixelType>

virtual Uint8 DcmIODTypes::Frame< PixelType >::bytesPerPixel | ( |  | ) | const
| inlinevirtual

Returns number of pixels (not necessarily bytes) in the frame.

Returns
  Number of pixels

Implements DcmIODTypes::FrameBase.

Referenced by getLengthInBytes().

## ◆ getLengthInBytes()

template<typename PixelType>

virtual size_t DcmIODTypes::Frame< PixelType >::getLengthInBytes | ( |  | ) | const
| inlinevirtual

Get size of pixel data in bytes.

Returns
  Size of pixel data in bytes

Implements DcmIODTypes::FrameBase.

References bytesPerPixel(), and m_numPixels.

Referenced by DcmSegmentation::addFrame().

## ◆ getPixelData()

template<typename PixelType>

virtual void * DcmIODTypes::Frame< PixelType >::getPixelData | ( |  | ) | const
| inlinevirtual

Returns pointer to pixel data (untyped).

Returns
  Pointer to pixel data

Implements DcmIODTypes::FrameBase.

References m_pixData.

## ◆ getPixelDataTyped()

template<typename PixelType>

virtual PixelType * DcmIODTypes::Frame< PixelType >::getPixelDataTyped | ( |  | ) | const
| inlinevirtual

Returns pointer to pixel data (typed).

Returns
  Pointer to pixel data

References m_pixData.

## ◆ getUint16AtIndex()

template<typename PixelType>

virtual OFCondition DcmIODTypes::Frame< PixelType >::getUint16AtIndex | ( | Uint16 & | shortVal,
|  | const size_t | index ) const
| inlinevirtual

Get value at given index as 16 bit value.

Parameters

  shortVal | The value at the given index
  index | The index to get the value from

Returns
  EC_Normal if successful, EC_IllegalCall if index is out of bounds

Implements DcmIODTypes::FrameBase.

References EC_IllegalCall, EC_Normal, m_numPixels, and m_pixData.

## ◆ getUint8AtIndex()

template<typename PixelType>

virtual OFCondition DcmIODTypes::Frame< PixelType >::getUint8AtIndex | ( | Uint8 & | byteVal,
|  | const size_t | index ) const
| inlinevirtual

Get value at given index as 8 bit value.

Parameters

  byteVal | The value at the given index
  index | The index to get the value from

Returns
  EC_Normal if successful, EC_IllegalCall if index is out of bounds

Implements DcmIODTypes::FrameBase.

References EC_IllegalCall, EC_Normal, m_numPixels, and m_pixData.

## ◆ operator=()

template<typename PixelType>

Frame & DcmIODTypes::Frame< PixelType >::operator= | ( | const Frame< PixelType > & | rhs | ) |
| inline

Assignment constructor, copies pixel data.

Parameters

  rhs | Frame to copy from

Returns
  Reference to this object

References Frame(), m_numPixels, and m_pixData.

## ◆ print()

template<typename PixelType>

virtual OFString DcmIODTypes::Frame< PixelType >::print | ( |  | ) | const
| inlinevirtual

Print frame data to string (for debugging purposes).

Returns
  String representation of frame data

Implements DcmIODTypes::FrameBase.

References m_numPixels, and m_pixData.

## ◆ setReleaseMemory()

template<typename PixelType>

virtual void DcmIODTypes::Frame< PixelType >::setReleaseMemory | ( | OFBool | release | ) |
| inlinevirtual

Set whether pixel data should be release by this class (default) or is managed externally.

Parameters

  release | OFTrue if memory should be released, OFFalse otherwise

Implements DcmIODTypes::FrameBase.

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

- dcmiod/include/dcmtk/dcmiod/iodtypes.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1