DCMTK Version 3.6.8
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | List of all members
DiYBR422PixelTemplate< T1, T2 > Class Template Reference

Template class to handle YCbCr Full 4:2:2 pixel data. More...

+ Inheritance diagram for DiYBR422PixelTemplate< T1, T2 >:

Public Member Functions

 DiYBR422PixelTemplate (const DiDocument *docu, const DiInputPixel *pixel, EI_Status &status, const int bits, const OFBool rgb)
 constructor More...
 
virtual ~DiYBR422PixelTemplate ()
 destructor
 
- Public Member Functions inherited from DiColorPixelTemplate< T2 >
 DiColorPixelTemplate (const DiDocument *docu, const DiInputPixel *pixel, const Uint16 samples, EI_Status &status, const Uint16 sample_rate=0)
 constructor More...
 
virtual ~DiColorPixelTemplate ()
 destructor
 
EP_Representation getRepresentation () const
 get integer representation More...
 
const void * getData () const
 get pointer to internal array of pixel data. More...
 
void * getDataPtr ()
 get pointer to internal array of pixel data. More...
 
void * getDataArrayPtr ()
 get pointer to internal array of pixel data. More...
 
OFBool getPixelData (void *data, const unsigned long count, const unsigned long fcount, const unsigned long frames, const int planar) const
 fill given memory block with pixel data (all three image planes, RGB) More...
 
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
 create true color (24/32 bit) bitmap for MS Windows. More...
 
unsigned long createAWTBitmap (void *&data, const Uint16 width, const Uint16 height, const unsigned long frame, const int fromBits, const int toBits) const
 create true color (32 bit) bitmap for Java (AWT default format). More...
 
- Public Member Functions inherited from DiColorPixel
 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 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...
 
- Public Member Functions inherited from DiPixelRepresentationTemplate< T2 >
 DiPixelRepresentationTemplate ()
 default constructor
 
virtual ~DiPixelRepresentationTemplate ()
 destructor
 
int isSigned () const
 check whether template type T is signed or not More...
 

Private Member Functions

void convert (const T1 *pixel, const int bits, const OFBool rgb)
 convert input pixel data to intermediate representation More...
 
void convertValue (T2 &red, T2 &green, T2 &blue, const T2 y, const T2 cb, const T2 cr, const T2 maxvalue)
 convert a single YCbCr value to RGB More...
 

Additional Inherited Members

- Protected Member Functions inherited from DiColorPixelTemplate< T2 >
 DiColorPixelTemplate (const DiColorPixel *pixel, const unsigned long count)
 constructor More...
 
int Init (const void *pixel)
 initialize internal memory More...
 
- Protected Member Functions inherited from DiColorPixel
 DiColorPixel (const DiColorPixel *pixel, const unsigned long count)
 constructor More...
 
virtual EP_Representation getRepresentation () const
 determine integer representation for template type T More...
 
- Protected Attributes inherited from DiColorPixelTemplate< T2 >
T2 * Data [3]
 pointer to pixel data (3 components)
 
- Protected Attributes inherited from DiColorPixel
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

template<class T1, class T2>
class DiYBR422PixelTemplate< T1, T2 >

Template class to handle YCbCr Full 4:2:2 pixel data.

Constructor & Destructor Documentation

◆ DiYBR422PixelTemplate()

template<class T1 , class T2 >
DiYBR422PixelTemplate< T1, T2 >::DiYBR422PixelTemplate ( const DiDocument docu,
const DiInputPixel pixel,
EI_Status status,
const int  bits,
const OFBool  rgb 
)
inline

constructor

Parameters
docupointer to DICOM document
pixelpointer to input pixel representation
statusreference to status variable
bitsnumber of bits per sample
rgbflag, convert color model to RGB only if true

References DiYBR422PixelTemplate< T1, T2 >::convert(), DiPixel::Count, EIS_InvalidValue, EIS_Normal, DiInputPixel::getData(), DiInputPixel::getPixelStart(), and DiColorPixel::PlanarConfiguration.

Member Function Documentation

◆ convert()

template<class T1 , class T2 >
void DiYBR422PixelTemplate< T1, T2 >::convert ( const T1 *  pixel,
const int  bits,
const OFBool  rgb 
)
inlineprivate

convert input pixel data to intermediate representation

Parameters
pixelpointer to input pixel data
bitsnumber of bits per sample
rgbflag, convert color model to RGB only if true

References DiYBR422PixelTemplate< T1, T2 >::convertValue(), DiPixel::Count, DiColorPixelTemplate< T2 >::Data, DiColorPixelTemplate< T2 >::Init(), DiPixel::InputCount, and DicomImageClass::maxval().

Referenced by DiYBR422PixelTemplate< T1, T2 >::DiYBR422PixelTemplate().

◆ convertValue()

template<class T1 , class T2 >
void DiYBR422PixelTemplate< T1, T2 >::convertValue ( T2 &  red,
T2 &  green,
T2 &  blue,
const T2  y,
const T2  cb,
const T2  cr,
const T2  maxvalue 
)
inlineprivate

convert a single YCbCr value to RGB

Parameters
redthe red part of the RGB value
greenthe green part of the RGB value
bluethe blue part of the RGB value
ythe luma part of the YCbCr value
cbthe blue-difference part of the YCbCr value
crthe red-difference part of the YCbCr value
maxvaluethe maximum value of the RGB parts

Referenced by DiYBR422PixelTemplate< T1, T2 >::convert().


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


Generated on Tue Dec 19 2023 for DCMTK Version 3.6.8 by Doxygen 1.9.4