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

Template class to convert DICOM pixel stream to intermediate representation. More...

+ Inheritance diagram for DiInputPixelTemplate< T1, T2 >:

Public Member Functions

 DiInputPixelTemplate (const DiDocument *document, const Uint16 alloc, const Uint16 stored, const Uint16 high, const unsigned long first, const unsigned long number, const unsigned long fsize, DcmFileCache *fileCache, Uint32 &fragment)
 constructor More...
 
virtual ~DiInputPixelTemplate ()
 destructor
 
int determineMinMax ()
 determine minimum and maximum pixel value More...
 
EP_Representation getRepresentation () const
 get pixel representation More...
 
const void * getData () const
 get pointer to input pixel data More...
 
virtual void * getDataPtr ()
 get reference to pointer to input pixel data More...
 
void removeDataReference ()
 remove reference to (internally handled) pixel data
 
double getMinValue (const int idx) const
 get minimum pixel value More...
 
double getMaxValue (const int idx) const
 get maximum pixel value More...
 
- Public Member Functions inherited from DiInputPixel
 DiInputPixel (const unsigned int bits, const unsigned long first, const unsigned long number, const unsigned long fsize)
 constructor More...
 
virtual ~DiInputPixel ()
 destructor
 
virtual int determineMinMax ()=0
 determine minimum and maximum pixel value (abstract) More...
 
virtual EP_Representation getRepresentation () const =0
 get pixel representation (abstract). More...
 
virtual const void * getData () const =0
 get pointer to input pixel data (abstract) More...
 
virtual void * getDataPtr ()=0
 get pointer to input pixel data (abstract) More...
 
virtual void removeDataReference ()=0
 remove reference to (internally handled) pixel data (abstract)
 
virtual double getMinValue (const int idx) const =0
 get minimum pixel value (abstract) More...
 
virtual double getMaxValue (const int idx) const =0
 get maximum pixel value (abstract) More...
 
unsigned int getBits () const
 get number of bits per pixel More...
 
double getAbsMinimum () const
 get absolute minimum pixel value More...
 
double getAbsMaximum () const
 get absolute maximum pixel value More...
 
double getAbsMaxRange () const
 get absolute pixel value range More...
 
unsigned long getCount () const
 get number of pixels stored More...
 
unsigned long getPixelStart () const
 get first pixel to be processed More...
 
unsigned long getPixelCount () const
 get number of pixels to be processed More...
 
unsigned long getComputedCount () const
 get number of pixels computed from the image resolution 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 DiDocument *document, const Uint16 bitsAllocated, const Uint16 bitsStored, const Uint16 highBit, DcmFileCache *fileCache, Uint32 &fragment)
 convert pixel data from DICOM dataset to input representation More...
 

Private Attributes

T2 * Data
 pointer to pixel data
 
T2 MinValue [2]
 minimum pixel value ([0] = global, [1] = selected pixel range)
 
T2 MaxValue [2]
 maximum pixel value ([0] = global, [1] = selected pixel range)
 

Additional Inherited Members

virtual EP_Representation getRepresentation () const
 determine integer representation for template type T More...
 
- Protected Attributes inherited from DiInputPixel
unsigned long Count
 number of pixels stored
 
unsigned int Bits
 bits per pixel/sample
 
unsigned long FirstFrame
 first frame to be processed
 
unsigned long NumberOfFrames
 number of frames to be processed
 
unsigned long FrameSize
 number of pixels per frame
 
unsigned long PixelStart
 first pixel to be processed
 
unsigned long PixelCount
 number of pixels to be processed
 
unsigned long ComputedCount
 number of pixels computed from the image resolution
 
double AbsMinimum
 absolute minimum (possible) pixel value
 
double AbsMaximum
 absolute maximum (possible) pixel value
 

Detailed Description

template<class T1, class T2>
class DiInputPixelTemplate< T1, T2 >

Template class to convert DICOM pixel stream to intermediate representation.

Constructor & Destructor Documentation

◆ DiInputPixelTemplate()

template<class T1 , class T2 >
DiInputPixelTemplate< T1, T2 >::DiInputPixelTemplate ( const DiDocument document,
const Uint16  alloc,
const Uint16  stored,
const Uint16  high,
const unsigned long  first,
const unsigned long  number,
const unsigned long  fsize,
DcmFileCache fileCache,
Uint32 &  fragment 
)
inline

constructor

Parameters
documentpointer to DICOM image object
allocnumber of bits allocated for each pixel
storednumber of bits stored for each pixel
highposition of high bit within bits allocated
firstfirst frame to be processed
numbernumber of frames to be processed
fsizenumber of pixels per frame (frame size)
fileCachepointer to file cache object used for partial read
fragmentcurrent pixel item fragment (for encapsulated pixel data)

References DiInputPixel::AbsMaximum, DiInputPixel::AbsMinimum, DiInputPixel::Bits, DiInputPixelTemplate< T1, T2 >::convert(), DiInputPixel::Count, DiDocument::getPixelData(), DiPixelRepresentationTemplate< T2 >::isSigned(), DicomImageClass::maxval(), DiInputPixelTemplate< T1, T2 >::MaxValue, DiInputPixelTemplate< T1, T2 >::MinValue, DiInputPixel::PixelCount, and DiInputPixel::PixelStart.

Member Function Documentation

◆ convert()

template<class T1 , class T2 >
void DiInputPixelTemplate< T1, T2 >::convert ( const DiDocument document,
const Uint16  bitsAllocated,
const Uint16  bitsStored,
const Uint16  highBit,
DcmFileCache fileCache,
Uint32 &  fragment 
)
inlineprivate

convert pixel data from DICOM dataset to input representation

Parameters
documentpointer to DICOM image object
bitsAllocatednumber of bits allocated for each pixel
bitsStorednumber of bits stored for each pixel
highBitposition of high bit within bits allocated
fileCachepointer to file cache object used for partial read
fragmentcurrent pixel item fragment (for encapsulated pixel data)

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

◆ determineMinMax()

template<class T1 , class T2 >
int DiInputPixelTemplate< T1, T2 >::determineMinMax ( )
inlinevirtual

determine minimum and maximum pixel value

Returns
status, true if successful, false otherwise

Implements DiInputPixel.

References DiInputPixelTemplate< T1, T2 >::Data.

◆ getData()

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

get pointer to input pixel data

Returns
pointer to input pixel data

Implements DiInputPixel.

References DiInputPixelTemplate< T1, T2 >::Data.

◆ getDataPtr()

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

get reference to pointer to input pixel data

Returns
reference to pointer to input pixel data

Implements DiInputPixel.

References DiInputPixelTemplate< T1, T2 >::Data.

◆ getMaxValue()

template<class T1 , class T2 >
double DiInputPixelTemplate< T1, T2 >::getMaxValue ( const int  idx) const
inlinevirtual

get maximum pixel value

Parameters
idxspecifies whether to return the global maximum (0) or the maximum of the selected pixel range (1, see PixelStart/Range)
Returns
maximum pixel value

Implements DiInputPixel.

References DiInputPixelTemplate< T1, T2 >::MaxValue.

◆ getMinValue()

template<class T1 , class T2 >
double DiInputPixelTemplate< T1, T2 >::getMinValue ( const int  idx) const
inlinevirtual

get minimum pixel value

Parameters
idxspecifies whether to return the global minimum (0) or the minimum of the selected pixel range (1, see PixelStart/Range)
Returns
minimum pixel value

Implements DiInputPixel.

References DiInputPixelTemplate< T1, T2 >::MinValue.

◆ getRepresentation()

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

get pixel representation

Returns
pixel representation

Implements DiInputPixel.

References DiPixelRepresentationTemplate< T >::getRepresentation().


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