DCMTK  Version 3.6.5
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DiColorPixel Class Referenceabstract

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

+ Inheritance diagram for DiColorPixel:

Public Member Functions

 DiColorPixel (const DiDocument *docu, const DiInputPixel *pixel, const Uint16 samples, EI_Status &status, const Uint16 sample_rate=0)
 constructor More...
 
virtual ~DiColorPixel ()
 destructor
 
int getPlanes () const
 get number of planes More...
 
int getPlanarConfiguration () const
 get planar configuration of the original pixel data More...
 
virtual OFBool getPixelData (void *data, const unsigned long count, const unsigned long fcount, const unsigned long frames, const int planar) const =0
 fill given memory block with pixel data (all three image planes, RGB) More...
 
virtual unsigned long createDIB (void *&data, const unsigned long size, const Uint16 width, const Uint16 height, const unsigned long frame, const int fromBits, const int toBits, const int mode, const int upsideDown, const int padding) const =0
 create true color (24/32 bit) bitmap for MS Windows. More...
 
virtual unsigned long createAWTBitmap (void *&data, const Uint16 width, const Uint16 height, const unsigned long frame, const int fromBits, const int toBits) const =0
 create true color (32 bit) bitmap for Java (AWT default format). More...
 
- Public Member Functions inherited from DiPixel
 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 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 Member Functions

 DiColorPixel (const DiColorPixel *pixel, const unsigned long count)
 constructor More...
 

Protected Attributes

int PlanarConfiguration
 planar configuration of the original pixel data (0 = color-by-pixel, 1 = color-by-plane)
 
- Protected Attributes inherited from DiPixel
unsigned long Count
 number of pixels
 
unsigned long InputCount
 number of pixels in the input buffer
 

Detailed Description

Abstract base class to handle color pixel data.

Constructor & Destructor Documentation

◆ DiColorPixel() [1/2]

DiColorPixel::DiColorPixel ( const DiDocument docu,
const DiInputPixel pixel,
const Uint16  samples,
EI_Status status,
const Uint16  sample_rate = 0 
)

constructor

Parameters
docupointer to the DICOM document
pixelpointer to input pixel data
samplesnumber of expected samples per pixel (for checking purposes)
statusstatus of the image object (reference variable)
sample_ratedummy parameter (used for derived classes only)

◆ DiColorPixel() [2/2]

DiColorPixel::DiColorPixel ( const DiColorPixel pixel,
const unsigned long  count 
)
protected

constructor

Parameters
pixelpointer to intermediate color pixel data
countnumber of pixels

Member Function Documentation

◆ createAWTBitmap()

virtual unsigned long DiColorPixel::createAWTBitmap ( void *&  data,
const Uint16  width,
const Uint16  height,
const unsigned long  frame,
const int  fromBits,
const int  toBits 
) const
pure virtual

create true color (32 bit) bitmap for Java (AWT default format).

Parameters
dataresulting pointer to bitmap data (set to NULL if an error occurred)
widthnumber of columns of the image
heightnumber of rows of the image
frameindex of frame to be converted (starting from 0)
fromBitsnumber of bits per sample used for internal representation of the image
toBitsnumber of bits per sample used for the output bitmap (<= 8)
Returns
number of bytes allocated by the bitmap, or 0 if an error occurred

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

◆ createDIB()

virtual unsigned long DiColorPixel::createDIB ( void *&  data,
const unsigned long  size,
const Uint16  width,
const Uint16  height,
const unsigned long  frame,
const int  fromBits,
const int  toBits,
const int  mode,
const int  upsideDown,
const int  padding 
) const
pure virtual

create true color (24/32 bit) bitmap for MS Windows.

Parameters
datauntyped pointer memory buffer (set to NULL if not allocated externally)
sizesize of the memory buffer in bytes (if 0 'data' is set to NULL)
widthnumber of columns of the image
heightnumber of rows of the image
frameindex of frame to be converted (starting from 0)
fromBitsnumber of bits per sample used for internal representation of the image
toBitsnumber of bits per sample used for the output bitmap (<= 8)
modecolor output mode (24 or 32 bits, see dcmimgle/dcmimage.h for details)
upsideDownspecifies the order of lines in the images (0 = top-down, bottom-up otherwise)
paddingalign each line to a 32-bit address if true
Returns
number of bytes allocated by the bitmap, or 0 if an error occurred

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

◆ getPixelData()

virtual OFBool DiColorPixel::getPixelData ( void *  data,
const unsigned long  count,
const unsigned long  fcount,
const unsigned long  frames,
const int  planar 
) const
pure virtual

fill given memory block with pixel data (all three image planes, RGB)

Parameters
datapointer to memory block (array of 8 or 16 bit values, OB/OW)
countnumber of T-size entries allocated in the 'data' array
fcountnumber of pixels per frame
framestotal number of frames present in intermediate representation
planarflag indicating whether data shall be stored color-by-pixel or color-by-plane
Returns
OFTrue if successful, OFFalse otherwise

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

◆ getPlanarConfiguration()

int DiColorPixel::getPlanarConfiguration ( ) const
inline

get planar configuration of the original pixel data

Returns
planar configuration (0 = color-by-pixel, 1 = color-by-plane)

◆ getPlanes()

int DiColorPixel::getPlanes ( ) const
inlinevirtual

get number of planes

Returns
number of planes (here 3, color)

Implements DiPixel.


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


Generated on Mon Oct 28 2019 for DCMTK Version 3.6.5 by Doxygen 1.8.15