DCMTK  Version 3.7.0
OFFIS DICOM Toolkit
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) More...
 
 Frame (PixelType *pixelData, const size_t sizeInBytes)
 Constructor that takes over pixel data for managing. More...
 
 Frame (const Frame &rhs)
 Copy constructor, copies pixel data. More...
 
Frameoperator= (const Frame &rhs)
 Assignment constructor, copies pixel data. More...
 
virtual void setReleaseMemory (OFBool release)
 Set whether pixel data should be release by this class (default) or is managed externally. More...
 
virtual size_t getLengthInBytes () const
 Get size of pixel data in bytes. More...
 
virtual void * getPixelData () const
 Returns pointer to pixel data (untyped) More...
 
virtual PixelType * getPixelDataTyped () const
 Returns pointer to pixel data (typed) More...
 
virtual Uint8 bytesPerPixel () const
 Returns number of pixels (not necessarily bytes) in the frame. More...
 
virtual OFCondition getUint8AtIndex (Uint8 &byteVal, const size_t index) const
 Get value at given index as 8 bit value. More...
 
virtual OFCondition getUint16AtIndex (Uint16 &shortVal, const size_t index) const
 Get value at given index as 16 bit value. More...
 
virtual OFString print () const
 Print frame data to string (for debugging purposes) More...
 
 ~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
numPixelsNumber of pixels to allocate

◆ 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
pixelDataPointer to pixel data that is afterwards managed by this class
sizeInBytesSize of pixel data in bytes

◆ Frame() [3/3]

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

Copy constructor, copies pixel data.

Parameters
rhsFrame to copy

References DcmIODTypes::Frame< PixelType >::m_numPixels, and DcmIODTypes::Frame< PixelType >::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.

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

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

◆ getPixelDataTyped()

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

Returns pointer to pixel data (typed)

Returns
Pointer to pixel data

◆ 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
shortValThe value at the given index
indexThe 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, and EC_Normal.

◆ 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
byteValThe value at the given index
indexThe 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, and EC_Normal.

◆ operator=()

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

Assignment constructor, copies pixel data.

Parameters
rhsFrame to copy from
Returns
Reference to this object

References DcmIODTypes::Frame< PixelType >::m_numPixels, and DcmIODTypes::Frame< PixelType >::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.

◆ 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
releaseOFTrue if memory should be released, OFFalse otherwise

Implements DcmIODTypes::FrameBase.


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


Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1