MeVisLabToolboxReference
ml::LUTDataBase Class Reference

Untyped base class for LUTData template classes. More...

#include <mlLUTData.h>

Inheritance diagram for ml::LUTDataBase:
ml::LUTData< T >

List of all members.

Public Member Functions

virtual ~LUTDataBase ()
 Destructor.
void clear (void)
 Clear.
bool isInitialized (void) const
 Return true if LUT initialized.
bool ownsData (void) const
 Return true if this LUTData object owns the referenced LUT data buffer.
MLDataType getDataType (void) const
 Get data type.
int getEntrySize (void) const
 Get size of a single LUT entry.
LUTVisualType getVisualType (void) const
 Get visual type.
int getNumChannels (void) const
 Get number of channels.
LUTDimensionality getDimensionality (void) const
 Get number of dimensions (1, 2, or 3)
int getMinIndex (void) const
 Get minimum index value.
int getMaxIndex (void) const
 Get maximum index value.
int getWidth (void) const
 Get index range width.
int getMinRow (void) const
 Get minimum row value.
int getMaxRow (void) const
 Get maximum row value.
int getHeight (void) const
 Get number of rows.
int getMinLayer (void) const
 Get minimum layer value.
int getMaxLayer (void) const
 Get maximum layer value.
int getDepth (void) const
 Get number of layers.
int getLength (void) const
 Get total number of entries.
int getStride (int dim) const
 Get entry stride for index (dim = 1), row (2) and layer (3) dimension, relative to entry size, i.e.
int getDataSize (void) const
 Get size of LUT data area (in bytes)
bool isInRange (int index, int row=0, int layer=0) const
 Return true if specified index, row and layer position is in LUT range.
unsigned int getId (void) const
 Get LUT ID.
void setId (unsigned int id)
 Set LUT ID.

Protected Member Functions

 LUTDataBase (MLDataType dataType)
 Constructor, create empty, unallocated table.
MLErrorCode init (LUTVisualType visualType, int minIndex, int maxIndex, int minRow, int maxRow, int minLayer, int maxLayer)
 Initialize LUT data for specified visual type and index/row/layer ranges.
MLErrorCode initShared1D (LUTVisualType visualType, int minIndex, int maxIndex, int row, int layer, LUTDataBase *srcLutData, int srcIndex, int srcRow, int srcLayer)
 Initialize 1D-LUT data for specified visual type, index range and row/layer.
MLErrorCode initShared2D (LUTVisualType visualType, int minRow, int maxRow, int layer, LUTDataBase *srcLutData, int srcRow, int srcLayer)
 Initialize 2D-LUT data for specified visual type, row range and layer.
void reset (void)
 Reset properties.
void clearData (void)
 Clear data buffer.
bool initData (void)
 Initialize data buffer, return true if successful.

Protected Attributes

MLDataType _dataType
 Data type identifier constant.
int _entrySize
 Size of single data entry.
int _dataLength
 Number of entries.
void * _data
 LUT data pointer.
bool _ownsData
 This flag is true if LUT data buffer is owned by this LUTData object.
LUTVisualType _visualType
 Visual type.
int _numChannels
 Number of channels.
LUTDimensionality _dimensionality
 Dimensionality (1, 2 or 3)
int _minIndex
 Index range (1st dimension)
int _maxIndex
int _minRow
 Row range (2nd dimension)
int _maxRow
int _minLayer
 Layer range (3rd dimension)
int _maxLayer
int _strides [3]
 Data strides (entry address differences) for index (1st), row (2nd) and layer (3rd) dimension (relative to entry size)
int _entryOffset
 Entry offset for addressing via getEntriesAt() in derived LUTData class.
unsigned int _id
 LUT ID.

Detailed Description

Untyped base class for LUTData template classes.

Store instances of a LUT rendered for a given visual type, reference value and index, row and layer range. This class has a protected constructor, i.e. can only be instantiated by derived classes. The type information stored in this class can be used to typecast a pointer to the appropriate derived LUTData class. The ID stored with each LUTDataBase object can be used to identify the source the LUT was rendered from, e.g. the LUTFunction.

Definition at line 42 of file mlLUTData.h.


Constructor & Destructor Documentation

ml::LUTDataBase::LUTDataBase ( MLDataType  dataType) [protected]

Constructor, create empty, unallocated table.

virtual ml::LUTDataBase::~LUTDataBase ( ) [inline, virtual]

Destructor.

Definition at line 70 of file mlLUTData.h.


Member Function Documentation

void ml::LUTDataBase::clear ( void  )

Clear.

void ml::LUTDataBase::clearData ( void  ) [protected]

Clear data buffer.

int ml::LUTDataBase::getDataSize ( void  ) const [inline]

Get size of LUT data area (in bytes)

Definition at line 133 of file mlLUTData.h.

MLDataType ml::LUTDataBase::getDataType ( void  ) const [inline]

Get data type.

Definition at line 83 of file mlLUTData.h.

int ml::LUTDataBase::getDepth ( void  ) const [inline]

Get number of layers.

Definition at line 122 of file mlLUTData.h.

LUTDimensionality ml::LUTDataBase::getDimensionality ( void  ) const [inline]

Get number of dimensions (1, 2, or 3)

Definition at line 95 of file mlLUTData.h.

int ml::LUTDataBase::getEntrySize ( void  ) const [inline]

Get size of a single LUT entry.

Definition at line 86 of file mlLUTData.h.

int ml::LUTDataBase::getHeight ( void  ) const [inline]

Get number of rows.

Definition at line 113 of file mlLUTData.h.

unsigned int ml::LUTDataBase::getId ( void  ) const [inline]

Get LUT ID.

Definition at line 141 of file mlLUTData.h.

int ml::LUTDataBase::getLength ( void  ) const [inline]

Get total number of entries.

Definition at line 125 of file mlLUTData.h.

int ml::LUTDataBase::getMaxIndex ( void  ) const [inline]

Get maximum index value.

Definition at line 101 of file mlLUTData.h.

int ml::LUTDataBase::getMaxLayer ( void  ) const [inline]

Get maximum layer value.

Definition at line 119 of file mlLUTData.h.

int ml::LUTDataBase::getMaxRow ( void  ) const [inline]

Get maximum row value.

Definition at line 110 of file mlLUTData.h.

int ml::LUTDataBase::getMinIndex ( void  ) const [inline]

Get minimum index value.

Definition at line 98 of file mlLUTData.h.

Referenced by ml::LUTIterator< T >::init().

int ml::LUTDataBase::getMinLayer ( void  ) const [inline]

Get minimum layer value.

Definition at line 116 of file mlLUTData.h.

int ml::LUTDataBase::getMinRow ( void  ) const [inline]

Get minimum row value.

Definition at line 107 of file mlLUTData.h.

int ml::LUTDataBase::getNumChannels ( void  ) const [inline]

Get number of channels.

Definition at line 92 of file mlLUTData.h.

int ml::LUTDataBase::getStride ( int  dim) const

Get entry stride for index (dim = 1), row (2) and layer (3) dimension, relative to entry size, i.e.

each entry counts as 1. Return 0 if dim is invalid for the present LUT data.

Referenced by ml::LUTIterator< T >::init().

LUTVisualType ml::LUTDataBase::getVisualType ( void  ) const [inline]

Get visual type.

Definition at line 89 of file mlLUTData.h.

Referenced by ml::LUTFCompose::getRenderType(), ml::LUTFBlend::getRenderType(), and ml::LUTIterator< T >::init().

int ml::LUTDataBase::getWidth ( void  ) const [inline]

Get index range width.

Definition at line 104 of file mlLUTData.h.

MLErrorCode ml::LUTDataBase::init ( LUTVisualType  visualType,
int  minIndex,
int  maxIndex,
int  minRow,
int  maxRow,
int  minLayer,
int  maxLayer 
) [protected]

Initialize LUT data for specified visual type and index/row/layer ranges.

bool ml::LUTDataBase::initData ( void  ) [protected]

Initialize data buffer, return true if successful.

MLErrorCode ml::LUTDataBase::initShared1D ( LUTVisualType  visualType,
int  minIndex,
int  maxIndex,
int  row,
int  layer,
LUTDataBase srcLutData,
int  srcIndex,
int  srcRow,
int  srcLayer 
) [protected]

Initialize 1D-LUT data for specified visual type, index range and row/layer.

The LUT data buffer is shared with the data buffer of srcLutData, starting at specified srcIndex, srcRow and srcLayer. An error is returned if the requested visual type and index range is incompatible with the source LUTData.

MLErrorCode ml::LUTDataBase::initShared2D ( LUTVisualType  visualType,
int  minRow,
int  maxRow,
int  layer,
LUTDataBase srcLutData,
int  srcRow,
int  srcLayer 
) [protected]

Initialize 2D-LUT data for specified visual type, row range and layer.

The LUT data buffer is shared with the data buffer of srcLutData, starting at specified srcRow and srcLayer. An error is returned if the requested visual type and row range is incompatible with the source LUTData.

bool ml::LUTDataBase::isInitialized ( void  ) const [inline]

Return true if LUT initialized.

Definition at line 77 of file mlLUTData.h.

bool ml::LUTDataBase::isInRange ( int  index,
int  row = 0,
int  layer = 0 
) const

Return true if specified index, row and layer position is in LUT range.

bool ml::LUTDataBase::ownsData ( void  ) const [inline]

Return true if this LUTData object owns the referenced LUT data buffer.

Definition at line 80 of file mlLUTData.h.

void ml::LUTDataBase::reset ( void  ) [protected]

Reset properties.

void ml::LUTDataBase::setId ( unsigned int  id) [inline]

Set LUT ID.

Definition at line 144 of file mlLUTData.h.


Member Data Documentation

void* ml::LUTDataBase::_data [protected]

LUT data pointer.

Definition at line 169 of file mlLUTData.h.

Number of entries.

Definition at line 166 of file mlLUTData.h.

Data type identifier constant.

Definition at line 160 of file mlLUTData.h.

Dimensionality (1, 2 or 3)

Definition at line 182 of file mlLUTData.h.

Entry offset for addressing via getEntriesAt() in derived LUTData class.

Definition at line 198 of file mlLUTData.h.

int ml::LUTDataBase::_entrySize [protected]

Size of single data entry.

Definition at line 163 of file mlLUTData.h.

unsigned int ml::LUTDataBase::_id [protected]

LUT ID.

Definition at line 202 of file mlLUTData.h.

int ml::LUTDataBase::_maxIndex [protected]

Definition at line 185 of file mlLUTData.h.

int ml::LUTDataBase::_maxLayer [protected]

Definition at line 191 of file mlLUTData.h.

int ml::LUTDataBase::_maxRow [protected]

Definition at line 188 of file mlLUTData.h.

int ml::LUTDataBase::_minIndex [protected]

Index range (1st dimension)

Definition at line 185 of file mlLUTData.h.

int ml::LUTDataBase::_minLayer [protected]

Layer range (3rd dimension)

Definition at line 191 of file mlLUTData.h.

int ml::LUTDataBase::_minRow [protected]

Row range (2nd dimension)

Definition at line 188 of file mlLUTData.h.

Number of channels.

Definition at line 179 of file mlLUTData.h.

bool ml::LUTDataBase::_ownsData [protected]

This flag is true if LUT data buffer is owned by this LUTData object.

Definition at line 172 of file mlLUTData.h.

int ml::LUTDataBase::_strides[3] [protected]

Data strides (entry address differences) for index (1st), row (2nd) and layer (3rd) dimension (relative to entry size)

Definition at line 195 of file mlLUTData.h.

Visual type.

Definition at line 176 of file mlLUTData.h.


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