DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Protected Attributes | List of all members
DiPixel Class Referenceabstract

Abstract base class to handle pixel data. More...

Inheritance diagram for DiPixel:

## Public Member Functions
| DiPixel (const unsigned long count, const unsigned long inputCount=0)
| constructor More...
virtual | ~DiPixel ()
| destructor
virtual EP_Representation | getRepresentation () const =0
| get integer representation (abstract) More...
virtual int | getPlanes () const =0
| get number of planes (abstract). More...
virtual const void * | getData () const =0
| get pointer to pixel data (abstract). More...
virtual void * | getDataPtr ()=0
| get pointer to pixel data (abstract). More...
virtual void * | getDataArrayPtr ()=0
| get pointer to array of pixel data (abstract). More...
unsigned long | getCount () const
| get number of pixels More...
unsigned long | getInputCount () const
| get number of pixels stored in the 'PixelData' element More...

## Protected Attributes
unsigned long | Count
| number of pixels
unsigned long | InputCount
| number of pixels in the input buffer

## Detailed Description

Abstract base class to handle pixel data.

## Constructor & Destructor Documentation

## ◆ DiPixel()

DiPixel::DiPixel | ( | const unsigned long | count,
|  | const unsigned long | inputCount = `0`
| ) |  |
| inline

constructor

Parameters

  count | number of pixels stored in the buffer
  inputCount | number of pixels read from 'PixelData' attribute

## Member Function Documentation

## ◆ getCount()

unsigned long DiPixel::getCount | ( |  | ) | const
| inline

get number of pixels

Returns
  number of pixels

Referenced by DiColorCopyTemplate< T >::DiColorCopyTemplate(), DiColorMonoTemplate< T >::DiColorMonoTemplate(), DiFlipTemplate< T >::DiFlipTemplate(), DiMonoCopyTemplate< T >::DiMonoCopyTemplate(), DiRotateTemplate< T >::DiRotateTemplate(), DiMonoCopyTemplate< T >::copy(), DiColorCopyTemplate< T >::copy(), DiMonoFlipTemplate< T >::flip(), and DiMonoScaleTemplate< T >::scale().

## ◆ getData()

virtual const void* DiPixel::getData | ( |  | ) | const
| pure virtual

get pointer to pixel data (abstract).

NB: See implemented method in derived class for details.

Returns
  pointer to pixel data

Implemented in DiMonoPixelTemplate< T >, DiMonoPixelTemplate< T3 >, DiColorPixelTemplate< T >, DiColorPixelTemplate< T2 >, and DiColorPixelTemplate< T3 >.

## ◆ getDataArrayPtr()

virtual void* DiPixel::getDataArrayPtr | ( |  | ) |
| pure virtual

get pointer to array of pixel data (abstract).

The number of planes in the returned array can be determined using 'getPlanes()'.

Returns
  pointer to array of pixel data

Implemented in DiMonoPixelTemplate< T >, DiMonoPixelTemplate< T3 >, DiColorPixelTemplate< T >, DiColorPixelTemplate< T2 >, and DiColorPixelTemplate< T3 >.

## ◆ getDataPtr()

virtual void* DiPixel::getDataPtr | ( |  | ) |
| pure virtual

get pointer to pixel data (abstract).

NB: See implemented method in derived class for details.

Returns
  pointer to pixel data

Implemented in DiMonoPixelTemplate< T >, DiMonoPixelTemplate< T3 >, DiColorPixelTemplate< T >, DiColorPixelTemplate< T2 >, and DiColorPixelTemplate< T3 >.

## ◆ getInputCount()

unsigned long DiPixel::getInputCount | ( |  | ) | const
| inline

get number of pixels stored in the 'PixelData' element

Returns
  number pixels read from the input buffer

## ◆ getPlanes()

virtual int DiPixel::getPlanes | ( |  | ) | const
| pure virtual

get number of planes (abstract).

Returns
  number of planes (e.g. 1 for monochrome and 3 for color images)

Implemented in DiMonoPixel, and DiColorPixel.

Referenced by DiFlipTemplate< T >::DiFlipTemplate(), and DiRotateTemplate< T >::DiRotateTemplate().

## ◆ getRepresentation()

virtual EP_Representation DiPixel::getRepresentation | ( |  | ) | const
| pure virtual

get integer representation (abstract)

Returns
  integer representation of the internally stored pixel data

Implemented in DiMonoPixelTemplate< T >, DiMonoPixelTemplate< T3 >, DiColorPixelTemplate< T >, DiColorPixelTemplate< T2 >, and DiColorPixelTemplate< T3 >.

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

- dcmimgle/include/dcmtk/dcmimgle/dipixel.h

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