DiColorPixel Class Reference

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

Inheritance diagram for DiColorPixel:

DiPixel DiColorPixelTemplate< T > DiColorPixelTemplate< T2 > DiColorPixelTemplate< T3 > DiColorCopyTemplate< T > DiColorFlipTemplate< T > DiColorRotateTemplate< T > DiColorScaleTemplate< T > DiCMYKPixelTemplate< T1, T2 > DiHSVPixelTemplate< T1, T2 > DiRGBPixelTemplate< T1, T2 > DiYBR422PixelTemplate< T1, T2 > DiYBRPart422PixelTemplate< T1, T2 > DiYBRPixelTemplate< T1, T2 > DiARGBPixelTemplate< T1, T2, T3 > DiPalettePixelTemplate< T1, T2, T3 > List of all members.

Public Member Functions

 DiColorPixel (const DiDocument *docu, const DiInputPixel *pixel, const Uint16 samples, EI_Status &status, const Uint16 sample_rate=0)
 constructor
virtual ~DiColorPixel ()
 destructor
int getPlanes () const
 get number of planes
virtual OFBool getPixelData (void *data, const size_t count) const =0
 fill given memory block with pixel data (all three image planes, RGB).
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.
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).

Protected Member Functions

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

Protected Attributes

int PlanarConfiguration
 planar configuration of the original pixel data (0 = color-by-pixel, 1 = color-by-plane)

Detailed Description

Abstract base class to handle color pixel data.

Definition at line 60 of file dicopx.h.


Constructor & Destructor Documentation

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

constructor

Parameters:
docu pointer to the DICOM document
pixel pointer to input pixel data
samples number of expected samples per pixel (for checking purposes)
status status of the image object (reference variable)
sample_rate dummy parameter (used for derived classes only)

DiColorPixel::DiColorPixel const DiColorPixel pixel,
const unsigned long  count
[protected]
 

constructor

Parameters:
pixel pointer to intermediate color pixel data
count number of pixels


Member Function Documentation

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:
data resulting pointer to bitmap data (set to NULL if an error occurred)
width number of columns of the image
height number of rows of the image
frame index of frame to be converted (starting from 0)
fromBits number of bits per sample used for internal representation of the image
toBits number of bits per sample used for the output bitmap (<= 8)
Returns:
number of bytes allocated by the bitmap, or 0 if an error occured

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

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:
data untyped pointer memory buffer (set to NULL if not allocated externally)
size size of the memory buffer in bytes (if 0 'data' is set to NULL)
width number of columns of the image
height number of rows of the image
frame index of frame to be converted (starting from 0)
fromBits number of bits per sample used for internal representation of the image
toBits number of bits per sample used for the output bitmap (<= 8)
mode color output mode (24 or 32 bits, see dcmimgle/dcmimage.h for details)
upsideDown specifies the order of lines in the images (0 = top-down, bottom-up otherwise)
padding align each line to a 32-bit address if true
Returns:
number of bytes allocated by the bitmap, or 0 if an error occured

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

virtual OFBool DiColorPixel::getPixelData void *  data,
const size_t  count
const [pure virtual]
 

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

Currently, the samples are always ordered by plane, thus the DICOM attribute 'PlanarConfiguration' has to be set to '1'.

Parameters:
data pointer to memory block (array of 8 or 16 bit values, OB/OW)
count number of T-size entries allocated in the 'data' array
Returns:
OFTrue if successful, OFFalse otherwise

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

int DiColorPixel::getPlanes  )  const [inline, virtual]
 

get number of planes

Returns:
number of planes (here 3, color)

Implements DiPixel.

Definition at line 88 of file dicopx.h.


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


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5