MeVisLab Toolbox Reference
|
Untyped base class for LUTData template classes. More...
#include <mlLUTData.h>
Public Member Functions | |
virtual | ~LUTDataBase () |
Destructor. | |
void | clear () |
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. | |
void | setId (unsigned int id, double minIndex, double maxIndex) |
Set LUT ID including min/max range on rescaled luts. | |
const LUTDataId & | getFullId () const |
Get full LUT data ID, including min/max ranged from renderRescaled. | |
void | setFullId (const LUTDataId &id) |
Set full LUT data ID, including min/max ranged from renderRescaled. | |
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. | |
LUTDataId | _lutId |
LUT ID. | |
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 63 of file mlLUTData.h.
|
protected |
Constructor, create empty, unallocated table.
|
virtual |
Destructor.
void ml::LUTDataBase::clear | ( | ) |
Clear.
Get size of LUT data area (in bytes)
Definition at line 154 of file mlLUTData.h.
|
inline |
Get data type.
Definition at line 104 of file mlLUTData.h.
Get number of layers.
Definition at line 143 of file mlLUTData.h.
|
inline |
Get number of dimensions (1, 2, or 3)
Definition at line 116 of file mlLUTData.h.
Get size of a single LUT entry.
Definition at line 107 of file mlLUTData.h.
Get full LUT data ID, including min/max ranged from renderRescaled.
Definition at line 170 of file mlLUTData.h.
Get number of rows.
Definition at line 134 of file mlLUTData.h.
Get LUT ID.
Definition at line 161 of file mlLUTData.h.
Get total number of entries.
Definition at line 146 of file mlLUTData.h.
Get maximum index value.
Definition at line 122 of file mlLUTData.h.
Get maximum layer value.
Definition at line 140 of file mlLUTData.h.
Get maximum row value.
Definition at line 131 of file mlLUTData.h.
Get minimum index value.
Definition at line 119 of file mlLUTData.h.
Get minimum layer value.
Definition at line 137 of file mlLUTData.h.
Get minimum row value.
Definition at line 128 of file mlLUTData.h.
Get number of channels.
Definition at line 113 of file mlLUTData.h.
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.
|
inline |
Get visual type.
Definition at line 110 of file mlLUTData.h.
Get index range width.
Definition at line 125 of file mlLUTData.h.
|
protected |
Initialize LUT data for specified visual type and index/row/layer ranges.
Initialize data buffer, return true if successful.
|
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.
|
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.
Return true if LUT initialized.
Definition at line 98 of file mlLUTData.h.
Return true if specified index, row and layer position is in LUT range.
Return true if this LUTData object owns the referenced LUT data buffer.
Definition at line 101 of file mlLUTData.h.
Set full LUT data ID, including min/max ranged from renderRescaled.
Definition at line 173 of file mlLUTData.h.
Set LUT ID.
Definition at line 164 of file mlLUTData.h.
Set LUT ID including min/max range on rescaled luts.
Definition at line 167 of file mlLUTData.h.
References mlrange_cast().
|
protected |
LUT data pointer.
Definition at line 197 of file mlLUTData.h.
|
protected |
Number of entries.
Definition at line 194 of file mlLUTData.h.
|
protected |
Data type identifier constant.
Definition at line 188 of file mlLUTData.h.
|
protected |
Dimensionality (1, 2 or 3)
Definition at line 210 of file mlLUTData.h.
|
protected |
Entry offset for addressing via getEntriesAt() in derived LUTData class.
Definition at line 226 of file mlLUTData.h.
|
protected |
Size of single data entry.
Definition at line 191 of file mlLUTData.h.
|
protected |
LUT ID.
Definition at line 230 of file mlLUTData.h.
|
protected |
Definition at line 213 of file mlLUTData.h.
|
protected |
Definition at line 219 of file mlLUTData.h.
|
protected |
Definition at line 216 of file mlLUTData.h.
|
protected |
Index range (1st dimension)
Definition at line 213 of file mlLUTData.h.
|
protected |
Layer range (3rd dimension)
Definition at line 219 of file mlLUTData.h.
|
protected |
Row range (2nd dimension)
Definition at line 216 of file mlLUTData.h.
|
protected |
Number of channels.
Definition at line 207 of file mlLUTData.h.
|
protected |
This flag is true if LUT data buffer is owned by this LUTData object.
Definition at line 200 of file mlLUTData.h.
|
protected |
Data strides (entry address differences) for index (1st), row (2nd) and layer (3rd) dimension (relative to entry size)
Definition at line 223 of file mlLUTData.h.
|
protected |
Visual type.
Definition at line 204 of file mlLUTData.h.