MeVisLab Toolbox Reference
|
A LUTData object stores an instance of a LUT, rendered for a specified visual type, data type, reference range and index/row/layer set. More...
#include <mlLUTData.h>
Public Member Functions | |
LUTData () | |
Constructor, passes data type identifier constant to LUTDataBase A specialized constructor for each supported data type is defined. | |
MLDataType | getType (MLuint8 *) |
supported basic data types | |
MLDataType | getType (MLint8 *) |
MLDataType | getType (MLuint16 *) |
MLDataType | getType (MLint16 *) |
MLDataType | getType (MLuint32 *) |
MLDataType | getType (MLint32 *) |
MLDataType | getType (MLint64 *) |
MLDataType | getType (MLuint64 *) |
MLDataType | getType (float *) |
MLDataType | getType (double *) |
MLDataType | getType (MLldouble *) |
MLErrorCode | init (LUTVisualType visualType, int minIndex, int maxIndex, T maxEntry) |
Initialize LUT data for specified visual type, index range and maximum entry value (= reference value used for scaling LUT entries) | |
MLErrorCode | init (LUTVisualType visualType, int minIndex, int maxIndex, int minRow, int maxRow, T maxEntry) |
Initialize 2D-LUT data for specified visual type, index/row ranges and maximum entry value (= reference value used for scaling LUT entries) | |
MLErrorCode | init (LUTVisualType visualType, int minIndex, int maxIndex, int minRow, int maxRow, int minLayer, int maxLayer, T maxEntry) |
Initialize 3D-LUT data for specified visual type, index/row/layer ranges and maximum entry value (= reference value used for scaling LUT entries) | |
MLErrorCode | initShared1D (LUTVisualType visualType, int minIndex, int maxIndex, int row, int layer, LUTData< T > *srcLutData, int srcIndex, int srcRow, int srcLayer) |
Initialize 1D-LUT data for specified visual type and index range. | |
MLErrorCode | initShared2D (LUTVisualType visualType, int minRow, int maxRow, int layer, LUTData< T > *srcLutData, int srcRow, int srcLayer) |
Initialize 2D-LUT data for specified visual type, row range and layer. | |
T | getMaxEntry (void) const |
Get maximum (reference) entry value. | |
T * | getData (void) |
Get LUT data pointer, entries are stored interleaved (e.g. RGBARGBA...) | |
const T * | getData (void) const |
Get LUT data pointer (const version) | |
T * | getEntriesAt (int index, int row, int layer) |
Get LUT entries at given index, row and layer. | |
const T * | getEntriesAt (int index, int row, int layer) const |
Get LUT entries at given index, row and layer (const version) | |
T * | getEntriesAt (int index, int row) |
Get LUT entries at given index and row. | |
const T * | getEntriesAt (int index, int row) const |
Get LUT entries at given index and row (const version) | |
T * | getEntriesAt (int index) |
Get LUT entries at given index. | |
const T * | getEntriesAt (int index) const |
Get LUT entries at given index (const version) | |
virtual LUTData< T > * | clone (void) const |
Create a new LUTData object with the same properties and a new, uninitialized data buffer. | |
Public Member Functions inherited from ml::LUTDataBase | |
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 Attributes | |
T | _maxEntry |
Maximum entry value (= reference value used for scaling LUT entries) | |
Protected Attributes inherited from ml::LUTDataBase | |
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. | |
Additional Inherited Members | |
Protected Member Functions inherited from ml::LUTDataBase | |
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. | |
A LUTData object stores an instance of a LUT, rendered for a specified visual type, data type, reference range and index/row/layer set.
For rendering a LUTFunction object into a LUTData, use the methods LUTFunction::render() and LUTFunction::renderRescaled(). To access the data stored in the LUTData object, use the getData() method.
Definition at line 242 of file mlLUTData.h.
|
inline |
Constructor, passes data type identifier constant to LUTDataBase A specialized constructor for each supported data type is defined.
Definition at line 248 of file mlLUTData.h.
Create a new LUTData object with the same properties and a new, uninitialized data buffer.
Definition at line 413 of file mlLUTData.h.
References ML_RESULT_OK, and mlrange_cast().
Get LUT data pointer, entries are stored interleaved (e.g. RGBARGBA...)
Definition at line 306 of file mlLUTData.h.
References T.
Get LUT entries at given index.
Definition at line 328 of file mlLUTData.h.
Get LUT entries at given index (const version)
Definition at line 332 of file mlLUTData.h.
Get LUT entries at given index and row.
Definition at line 320 of file mlLUTData.h.
Get LUT entries at given index and row (const version)
Definition at line 324 of file mlLUTData.h.
Get LUT entries at given index, row and layer.
Definition at line 312 of file mlLUTData.h.
References mlrange_cast().
Get LUT entries at given index, row and layer (const version)
Definition at line 316 of file mlLUTData.h.
References mlrange_cast().
Get maximum (reference) entry value.
Definition at line 302 of file mlLUTData.h.
|
inline |
Definition at line 260 of file mlLUTData.h.
References MLdoubleType.
|
inline |
Definition at line 259 of file mlLUTData.h.
References MLfloatType.
|
inline |
Definition at line 254 of file mlLUTData.h.
References MLint16Type.
|
inline |
Definition at line 256 of file mlLUTData.h.
References MLint32Type.
|
inline |
Definition at line 257 of file mlLUTData.h.
References MLint64Type.
|
inline |
Definition at line 252 of file mlLUTData.h.
References MLint8Type.
|
inline |
Definition at line 261 of file mlLUTData.h.
References MLldoubleType.
|
inline |
Definition at line 253 of file mlLUTData.h.
References MLuint16Type.
|
inline |
Definition at line 255 of file mlLUTData.h.
References MLuint32Type.
|
inline |
Definition at line 258 of file mlLUTData.h.
References MLuint64Type.
|
inline |
MLErrorCode ml::LUTData< T >::init | ( | LUTVisualType | visualType, |
int | minIndex, | ||
int | maxIndex, | ||
int | minRow, | ||
int | maxRow, | ||
int | minLayer, | ||
int | maxLayer, | ||
T | maxEntry ) |
Initialize 3D-LUT data for specified visual type, index/row/layer ranges and maximum entry value (= reference value used for scaling LUT entries)
Definition at line 351 of file mlLUTData.h.
References ML_BAD_PARAMETER, ML_RESULT_OK, and mlrange_cast().
|
inline |
Initialize 2D-LUT data for specified visual type, index/row ranges and maximum entry value (= reference value used for scaling LUT entries)
Definition at line 270 of file mlLUTData.h.
References mlrange_cast().
|
inline |
Initialize LUT data for specified visual type, index range and maximum entry value (= reference value used for scaling LUT entries)
Definition at line 265 of file mlLUTData.h.
References mlrange_cast().
MLErrorCode ml::LUTData< T >::initShared1D | ( | LUTVisualType | visualType, |
int | minIndex, | ||
int | maxIndex, | ||
int | row, | ||
int | layer, | ||
LUTData< T > * | srcLutData, | ||
int | srcIndex, | ||
int | srcRow, | ||
int | srcLayer ) |
Initialize 1D-LUT data for specified visual type and index range.
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.
CAUTION: Make sure that the LUT data buffer of the source LUTData remains valid during the life time of this object or until it is re-initialized.
Definition at line 375 of file mlLUTData.h.
References ML_RESULT_OK, and mlrange_cast().
MLErrorCode ml::LUTData< T >::initShared2D | ( | LUTVisualType | visualType, |
int | minRow, | ||
int | maxRow, | ||
int | layer, | ||
LUTData< T > * | srcLutData, | ||
int | srcRow, | ||
int | srcLayer ) |
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.
CAUTION: Make sure that the LUT data buffer of the source LUTData remains valid during the life time of this object or until it is re-initialized.
Definition at line 397 of file mlLUTData.h.
References ML_RESULT_OK, and mlrange_cast().
|
protected |
Maximum entry value (= reference value used for scaling LUT entries)
Definition at line 343 of file mlLUTData.h.