DCMTK  Version 3.6.2
OFFIS DICOM Toolkit
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
DiMonoOutputPixelTemplate< T1, T2, T3 > Class Template Reference

Template class to create monochrome output data. More...

+ Inheritance diagram for DiMonoOutputPixelTemplate< T1, T2, T3 >:

Public Member Functions

 DiMonoOutputPixelTemplate (void *buffer, const DiMonoPixel *pixel, DiOverlay *overlays[2], const DiLookupTable *vlut, const DiLookupTable *plut, DiDisplayFunction *disp, const EF_VoiLutFunction vfunc, const double center, const double width, const Uint32 low, const Uint32 high, const Uint16 columns, const Uint16 rows, const unsigned long frame, const unsigned long, const int pastel=0)
 constructor More...
 
virtual ~DiMonoOutputPixelTemplate ()
 destructor
 
EP_Representation getRepresentation () const
 get integer representation of output data More...
 
size_t getItemSize () const
 get size of one pixel / item in the pixel array More...
 
const void * getData () const
 get pointer to output pixel data More...
 
virtual void * getDataPtr ()
 get pointer to output pixel data More...
 
void removeDataReference ()
 remove reference to (internally handled) pixel data (abstract)
 
int writePPM (STD_NAMESPACE ostream &stream) const
 write pixel data of selected frame to PPM/ASCII file More...
 
int writePPM (FILE *stream) const
 write pixel data of selected frame to PPM/ASCII file More...
 
- Public Member Functions inherited from DiMonoOutputPixel
 DiMonoOutputPixel (const DiMonoPixel *pixel, const unsigned long size, const unsigned long frame, const unsigned long max)
 constructor More...
 
virtual ~DiMonoOutputPixel ()
 destructor
 
unsigned long getCount () const
 get number of pixel per frame More...
 
int isUnused (const unsigned long value)
 check whether specified pixel value is used in the image. More...
 
- Public Member Functions inherited from DiPixelRepresentationTemplate< T3 >
 DiPixelRepresentationTemplate ()
 default constructor
 
virtual ~DiPixelRepresentationTemplate ()
 destructor
 
int isSigned () const
 check whether template type T is signed or not More...
 

Protected Member Functions

void determineUsedValues ()
 examine which pixel values are actually used
 
unsigned long determineOptimizationCount (const double count)
 determine number of entries for the optimization LUT More...
 

Private Member Functions

void createDisplayLUT (const DiDisplayLUT *&dlut, DiDisplayFunction *disp, const int bits)
 create a display LUT with the specified number of input bits More...
 
int initOptimizationLUT (T3 *&lut, const unsigned long ocnt)
 initialize an optimization LUT if the optimization criteria is fulfilled More...
 
void voilut (const DiMonoPixel *inter, const Uint32 start, const DiLookupTable *vlut, const DiLookupTable *plut, DiDisplayFunction *disp, const T3 low, const T3 high)
 apply the currently active VOI LUT to the output data More...
 
void nowindow (const DiMonoPixel *inter, const Uint32 start, const DiLookupTable *plut, DiDisplayFunction *disp, const T3 low, const T3 high)
 perform linear scaling to the output data (no windowing) More...
 
void sigmoid (const DiMonoPixel *inter, const Uint32 start, const DiLookupTable *plut, DiDisplayFunction *disp, const double center, const double width, const T3 low, const T3 high)
 apply the currently active sigmoid VOI window to the output data More...
 
void window (const DiMonoPixel *inter, const Uint32 start, const DiLookupTable *plut, DiDisplayFunction *disp, const double center, const double width, const T3 low, const T3 high)
 apply the currently active linear VOI window to the output data More...
 
void overlay (DiOverlay *overlays[2], DiDisplayFunction *disp, const Uint16 columns, const Uint16 rows, const unsigned long frame)
 apply the currently active overlay planes to the output data More...
 

Private Attributes

T3 * Data
 pointer to the storage area where the output data should be stored
 
int DeleteData
 flag indicating whether the output data buffer should be deleted in the destructor
 

Additional Inherited Members

- Protected Attributes inherited from DiMonoOutputPixel
unsigned long Count
 number of pixels per frame (intermediate representation)
 
const unsigned long FrameSize
 number of pixels per frame (memory buffer size)
 
Uint8 * UsedValues
 array of used pixel values
 
const unsigned long MaxValue
 maximum output value
 

Detailed Description

template<class T1, class T2, class T3>
class DiMonoOutputPixelTemplate< T1, T2, T3 >

Template class to create monochrome output data.

Constructor & Destructor Documentation

◆ DiMonoOutputPixelTemplate()

template<class T1, class T2, class T3>
DiMonoOutputPixelTemplate< T1, T2, T3 >::DiMonoOutputPixelTemplate ( void *  buffer,
const DiMonoPixel pixel,
DiOverlay overlays[2],
const DiLookupTable vlut,
const DiLookupTable plut,
DiDisplayFunction disp,
const EF_VoiLutFunction  vfunc,
const double  center,
const double  width,
const Uint32  low,
const Uint32  high,
const Uint16  columns,
const Uint16  rows,
const unsigned long  frame,
const unsigned  long,
const int  pastel = 0 
)
inline

constructor

Parameters
bufferstorage area for the output pixel data (optional, maybe NULL)
pixelpointer to intermediate pixel representation
overlaysarray of overlay management objects
vlutVOI LUT (optional, maybe NULL)
plutpresentation LUT (optional, maybe NULL)
dispdisplay function (optional, maybe NULL)
vfuncVOI LUT function (optional)
centerwindow center (optional, invalid if 'width' < 1)
widthwindow width (optional, invalid if < 1)
lowlowest pixel value for the output data (e.g. 0)
highhighest pixel value for the output data (e.g. 255)
columnsimage's width (in pixels)
rowsimage's height
frameframe to be rendered (#)param frames total number of frames present in intermediate representation
pastelflag indicating whether to use not only 'real' grayscale values (optional, experimental)

Member Function Documentation

◆ createDisplayLUT()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::createDisplayLUT ( const DiDisplayLUT *&  dlut,
DiDisplayFunction disp,
const int  bits 
)
inlineprivate

create a display LUT with the specified number of input bits

Parameters
dlutreference to storage area where the display LUT should be stored
disppointer to object describing the current display function
bitsnumber of bits defining the input width of the display LUT

References DiDisplayFunction::getLookupTable(), DiDisplayFunction::isValid(), and DiBaseLUT::isValid().

◆ determineOptimizationCount()

template<class T1, class T2, class T3>
unsigned long DiMonoOutputPixelTemplate< T1, T2, T3 >::determineOptimizationCount ( const double  count)
inlineprotected

determine number of entries for the optimization LUT

Parameters
countnumber of entries intended to be used for the optimization LUT (floating point value)
Returns
number of entries for the optimization LUT (unsigned integer value) or 0 if the size would exceed a certain limit (10,000,000 entries)

◆ getData()

template<class T1, class T2, class T3>
const void* DiMonoOutputPixelTemplate< T1, T2, T3 >::getData ( ) const
inlinevirtual

get pointer to output pixel data

Returns
pointer to pixel data

Implements DiMonoOutputPixel.

References DiMonoOutputPixel::getData().

◆ getDataPtr()

template<class T1, class T2, class T3>
virtual void* DiMonoOutputPixelTemplate< T1, T2, T3 >::getDataPtr ( )
inlinevirtual

get pointer to output pixel data

Returns
pointer to pixel data

Implements DiMonoOutputPixel.

References DiMonoOutputPixel::getDataPtr().

◆ getItemSize()

template<class T1, class T2, class T3>
size_t DiMonoOutputPixelTemplate< T1, T2, T3 >::getItemSize ( ) const
inlinevirtual

get size of one pixel / item in the pixel array

Returns
item size

Implements DiMonoOutputPixel.

References DiMonoOutputPixel::getItemSize().

◆ getRepresentation()

template<class T1, class T2, class T3>
EP_Representation DiMonoOutputPixelTemplate< T1, T2, T3 >::getRepresentation ( ) const
inlinevirtual

get integer representation of output data

Returns
integer representation

Implements DiMonoOutputPixel.

References DiPixelRepresentationTemplate< T >::getRepresentation().

◆ initOptimizationLUT()

template<class T1, class T2, class T3>
int DiMonoOutputPixelTemplate< T1, T2, T3 >::initOptimizationLUT ( T3 *&  lut,
const unsigned long  ocnt 
)
inlineprivate

initialize an optimization LUT if the optimization criteria is fulfilled

Parameters
lutreference to storage area where the optimization LUT should be stored
ocntnumber of entries for the optimization LUT (0 = never create one)
Returns
status, true if successful, false otherwise

References DiMonoOutputPixel::Count.

◆ nowindow()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::nowindow ( const DiMonoPixel inter,
const Uint32  start,
const DiLookupTable plut,
DiDisplayFunction disp,
const T3  low,
const T3  high 
)
inlineprivate

perform linear scaling to the output data (no windowing)

Parameters
interpointer to intermediate pixel representation
startoffset of the first pixel to be processed
plutpresentation LUT (optional, maybe NULL)
dispdisplay function (optional, maybe NULL)
lowlowest pixel value for the output data (e.g. 0)
highhighest pixel value for the output data (e.g. 255)

◆ overlay()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::overlay ( DiOverlay overlays[2],
DiDisplayFunction disp,
const Uint16  columns,
const Uint16  rows,
const unsigned long  frame 
)
inlineprivate

apply the currently active overlay planes to the output data

Parameters
overlaysarray of overlay management objects
dispdisplay function (optional, maybe NULL)
columnsimage's width (in pixels)
rowsimage's height (in pixels)
framenumber of frame to be rendered

References DiMonoOutputPixelTemplate< T1, T2, T3 >::Data, and DiMonoOutputPixel::getCount().

◆ sigmoid()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::sigmoid ( const DiMonoPixel inter,
const Uint32  start,
const DiLookupTable plut,
DiDisplayFunction disp,
const double  center,
const double  width,
const T3  low,
const T3  high 
)
inlineprivate

apply the currently active sigmoid VOI window to the output data

Parameters
interpointer to intermediate pixel representation
startoffset of the first pixel to be processed
plutpresentation LUT (optional, maybe NULL)
dispdisplay function (optional, maybe NULL)
centerwindow center
widthwindow width (>= 1)
lowlowest pixel value for the output data (e.g. 0)
highhighest pixel value for the output data (e.g. 255)

◆ voilut()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::voilut ( const DiMonoPixel inter,
const Uint32  start,
const DiLookupTable vlut,
const DiLookupTable plut,
DiDisplayFunction disp,
const T3  low,
const T3  high 
)
inlineprivate

apply the currently active VOI LUT to the output data

Parameters
interpointer to intermediate pixel representation
startoffset of the first pixel to be processed
vlutVOI LUT
plutpresentation LUT (optional, maybe NULL)
dispdisplay function (optional, maybe NULL)
lowlowest pixel value for the output data (e.g. 0)
highhighest pixel value for the output data (e.g. 255)

◆ window()

template<class T1, class T2, class T3>
void DiMonoOutputPixelTemplate< T1, T2, T3 >::window ( const DiMonoPixel inter,
const Uint32  start,
const DiLookupTable plut,
DiDisplayFunction disp,
const double  center,
const double  width,
const T3  low,
const T3  high 
)
inlineprivate

apply the currently active linear VOI window to the output data

Parameters
interpointer to intermediate pixel representation
startoffset of the first pixel to be processed
plutpresentation LUT (optional, maybe NULL)
dispdisplay function (optional, maybe NULL)
centerwindow center
widthwindow width (>= 1)
lowlowest pixel value for the output data (e.g. 0)
highhighest pixel value for the output data (e.g. 255)

◆ writePPM() [1/2]

template<class T1, class T2, class T3>
int DiMonoOutputPixelTemplate< T1, T2, T3 >::writePPM ( STD_NAMESPACE ostream &  stream) const
inlinevirtual

write pixel data of selected frame to PPM/ASCII file

Parameters
streamopen C++ output stream
Returns
status, true if successful, false otherwise

Implements DiMonoOutputPixel.

References DiMonoOutputPixelTemplate< T1, T2, T3 >::Data, and DiMonoOutputPixel::FrameSize.

◆ writePPM() [2/2]

template<class T1, class T2, class T3>
int DiMonoOutputPixelTemplate< T1, T2, T3 >::writePPM ( FILE *  stream) const
inlinevirtual

write pixel data of selected frame to PPM/ASCII file

Parameters
streamopen C file stream
Returns
status, true if successful, false otherwise

Implements DiMonoOutputPixel.

References DiMonoOutputPixelTemplate< T1, T2, T3 >::Data, and DiMonoOutputPixel::FrameSize.


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


Generated on Mon Jul 17 2017 for DCMTK Version 3.6.2 by Doxygen 1.8.13