|
MeVisLab Toolbox Reference
|
#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 |
| int | getDataSize (void) const |
| Get size of LUT data area (in bytes). | |
| bool | isInRange (int index, int row=0, int layer=0) const |
| 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) |
| MLErrorCode | initShared2D (LUTVisualType visualType, int minRow, int maxRow, int layer, LUTDataBase *srcLutData, int srcRow, int srcLayer) |
| 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] |
| 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.
Referenced by initShared1D(), initShared2D(), and ml::LUTData< T >::LUTData().
|
virtual |
Destructor.
| void ml::LUTDataBase::clear | ( | ) |
Clear.
|
protected |
Clear data buffer.
|
inline |
Get size of LUT data area (in bytes).
Definition at line 154 of file mlLUTData.h.
References _dataLength, and _entrySize.
|
inline |
|
inline |
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.
References _dimensionality.
|
inline |
|
inline |
Get full LUT data ID, including min/max ranged from renderRescaled.
Definition at line 170 of file mlLUTData.h.
References _lutId.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get minimum index value.
Definition at line 119 of file mlLUTData.h.
References _minIndex.
Referenced by ml::LUTIterator< T >::init().
|
inline |
Get minimum layer value.
Definition at line 137 of file mlLUTData.h.
References _minLayer.
Referenced by ml::LUTData< T >::getEntriesAt(), ml::LUTData< T >::getEntriesAt(), ml::LUTData< T >::getEntriesAt(), and ml::LUTData< T >::getEntriesAt().
|
inline |
Get minimum row value.
Definition at line 128 of file mlLUTData.h.
References _minRow.
Referenced by ml::LUTData< T >::getEntriesAt(), and ml::LUTData< T >::getEntriesAt().
|
inline |
| 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().
|
inline |
Get visual type.
Definition at line 110 of file mlLUTData.h.
References _visualType.
Referenced by ml::LUTFBlend::getRenderType(), ml::LUTFCompose::getRenderType(), and ml::LUTIterator< T >::init().
|
inline |
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.
Referenced by ml::LUTData< T >::init().
|
protected |
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.
References LUTDataBase().
Referenced by ml::LUTData< T >::initShared1D().
|
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.
References LUTDataBase().
Referenced by ml::LUTData< T >::initShared2D().
|
inline |
| 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
|
inline |
Return true if this LUTData object owns the referenced LUT data buffer.
Definition at line 101 of file mlLUTData.h.
References _ownsData.
|
protected |
Reset properties.
|
inline |
Set full LUT data ID, including min/max ranged from renderRescaled.
Definition at line 173 of file mlLUTData.h.
References _lutId.
|
inline |
|
inline |
Set LUT ID including min/max range on rescaled luts.
Definition at line 167 of file mlLUTData.h.
References _lutId.
|
protected |
LUT data pointer.
Definition at line 197 of file mlLUTData.h.
Referenced by ml::LUTData< T >::getData(), ml::LUTData< T >::getData(), and isInitialized().
|
protected |
Number of entries.
Definition at line 194 of file mlLUTData.h.
Referenced by getDataSize(), and getLength().
|
protected |
Data type identifier constant.
Definition at line 188 of file mlLUTData.h.
Referenced by getDataType().
|
protected |
Dimensionality (1, 2 or 3).
Definition at line 210 of file mlLUTData.h.
Referenced by getDimensionality().
|
protected |
Entry offset for addressing via getEntriesAt() in derived LUTData class.
Definition at line 226 of file mlLUTData.h.
Referenced by ml::LUTData< T >::getEntriesAt(), and ml::LUTData< T >::getEntriesAt().
|
protected |
Size of single data entry.
Definition at line 191 of file mlLUTData.h.
Referenced by getDataSize(), and getEntrySize().
|
protected |
LUT ID.
Definition at line 230 of file mlLUTData.h.
Referenced by getFullId(), getId(), setFullId(), setId(), and setId().
|
protected |
Definition at line 213 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getMaxIndex(), and getWidth().
|
protected |
Definition at line 219 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getDepth(), and getMaxLayer().
|
protected |
Definition at line 216 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getHeight(), and getMaxRow().
|
protected |
Index range (1st dimension).
Definition at line 213 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getMinIndex(), and getWidth().
|
protected |
Layer range (3rd dimension).
Definition at line 219 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getDepth(), and getMinLayer().
|
protected |
Row range (2nd dimension).
Definition at line 216 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), getHeight(), and getMinRow().
|
protected |
|
protected |
This flag is true if LUT data buffer is owned by this LUTData object.
Definition at line 200 of file mlLUTData.h.
Referenced by ownsData().
|
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.
Referenced by ml::LUTData< T >::getEntriesAt(), and ml::LUTData< T >::getEntriesAt().
|
protected |
Visual type.
Definition at line 204 of file mlLUTData.h.
Referenced by ml::LUTData< T >::clone(), and getVisualType().