MeVisLab Toolbox Reference
|
The LUTIterator class template is used by a LUTFunction object for rendering into a LUTData object. More...
#include <mlLUTIterator.h>
Public Member Functions | |
LUTIterator (LUTVisualType visualType, LUTData< T > &lutData) | |
Constructor for addressing a 1D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT. | |
LUTIterator (LUTVisualType visualType, LUTData< T > &lutData, int row) | |
Constructor for addressing a single row in a 2D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT, row identifies the LUT row. | |
LUTIterator (LUTVisualType visualType, LUTData< T > &lutData, int row, int layer) | |
Constructor for addressing a single row in a 3D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT, row and layer identify the LUT row. | |
~LUTIterator () override | |
Destructor. | |
void | operator++ (void) |
Increment operator. | |
Public Member Functions inherited from ml::LUTIteratorBase | |
virtual | ~LUTIteratorBase () |
Destructor (declared here to make it virtual) | |
bool | isValid (void) const |
Is iterator valid? | |
LUTVisualType | getSourceType (void) const |
Get visual type used for rendering (source type) | |
LUTVisualType | getTargetType (void) const |
Get visual type used for storing (target type) | |
bool | alphaNeedsInit (void) const |
Alpha channel needs initialization. | |
int | getWidth (void) const |
Get LUT width. | |
int | operator() (void) const |
Get current index (zero based) | |
int | getRow (void) const |
Get current row. | |
int | getLayer (void) const |
Get current layer. | |
bool | atEnd (void) const |
End of index range reached? | |
int | getNumChannels (void) const |
Get number of (source) channels. | |
Public Attributes | |
T ** | chn |
Channel pointer array. | |
Protected Types | |
typedef void(LUTIterator< T >::* | IncrementFnc) (void) |
Increment method pointer type definition. | |
Protected Types inherited from ml::LUTIteratorBase | |
enum | ConvMethod { CONV_NONE = 0 , CONV_L_TO_RGB , CONV_RGB_TO_L } |
Conversion method id. More... | |
Protected Member Functions | |
void | init (LUTData< T > &lutData) |
Initialize. | |
void | clear (void) |
Clean up. | |
void | inc1 (void) |
! Increment methods | |
void | inc2 (void) |
void | inc3 (void) |
void | inc4 (void) |
void | inc5 (void) |
void | convertLtoRGB (void) |
Convert Luminance to RGB. | |
void | convertRGBtoL (void) |
Convert RGB to Luminance. | |
void | convertAndInc (void) |
Increment method including conversion. | |
Protected Member Functions inherited from ml::LUTIteratorBase | |
LUTIteratorBase (LUTVisualType vtFrom, LUTVisualType vtTo, int width, int row, int layer) | |
Constructor (protected, class can only be used by derived classes) | |
Protected Attributes | |
IncrementFnc | _inc |
Increment method pointers. | |
IncrementFnc | _incConvert |
IncrementFnc | _incPointers |
T * | _dummy |
Dummy channel entries. | |
int | _dpLut |
Pointer increment. | |
Protected Attributes inherited from ml::LUTIteratorBase | |
bool | _valid |
Iterator valid flag. | |
LUTVisualType | _vtFrom |
Source visual type, used by the LUT being rendered. | |
LUTVisualType | _vtTo |
Target visual type, used by the LUTData object storing the rendered LUT. | |
enum ml::LUTIteratorBase::ConvMethod | _convMethodId |
int | _incMethodId |
Pointer increment method id (= number of channel pointers to increment) | |
bool | _initAlpha |
Alpha channel needs initialization. | |
int | _width |
Width of LUTData object. | |
int | _index |
Current index. | |
int | _row |
Current row and layer. | |
int | _layer |
Additional Inherited Members | |
Public Types inherited from ml::LUTIteratorBase | |
enum | { L = 0 , A_LA = 1 , R = 0 , G = 1 , B = 2 , A_RGBA = 3 , MAX_CHANNELS = 4 } |
Channel pointer access constants. More... | |
The LUTIterator class template is used by a LUTFunction object for rendering into a LUTData object.
For each lookup index, the LUT uses the channel pointers chn to store the LUT entry values, and calls the LUTIterator's increment operator to convert the entry values into the type of the LUTData object (if necessary) and to increment the channel data pointers.
Definition at line 127 of file mlLUTIterator.h.
|
protected |
Increment method pointer type definition.
Definition at line 191 of file mlLUTIterator.h.
ml::LUTIterator< T >::LUTIterator | ( | LUTVisualType | visualType, |
LUTData< T > & | lutData ) |
Constructor for addressing a 1D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT.
Definition at line 209 of file mlLUTIterator.h.
References ml::LUTIterator< T >::init(), and mlrange_cast().
ml::LUTIterator< T >::LUTIterator | ( | LUTVisualType | visualType, |
LUTData< T > & | lutData, | ||
int | row ) |
Constructor for addressing a single row in a 2D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT, row identifies the LUT row.
Definition at line 220 of file mlLUTIterator.h.
References ml::LUTIterator< T >::init(), and mlrange_cast().
ml::LUTIterator< T >::LUTIterator | ( | LUTVisualType | visualType, |
LUTData< T > & | lutData, | ||
int | row, | ||
int | layer ) |
Constructor for addressing a single row in a 3D-LUT visualType is the type of the LUT being rendered, lutData is the object storing the rendered LUT, row and layer identify the LUT row.
Definition at line 231 of file mlLUTIterator.h.
References ml::LUTIterator< T >::init(), and mlrange_cast().
|
inlineoverride |
Destructor.
Definition at line 150 of file mlLUTIterator.h.
Clean up.
Definition at line 336 of file mlLUTIterator.h.
Increment method including conversion.
Definition at line 187 of file mlLUTIterator.h.
Convert RGB to Luminance.
Definition at line 180 of file mlLUTIterator.h.
References B, G, L, ml::LUTConvertRGBtoL(), mlrange_cast(), and R.
! Increment methods
Definition at line 170 of file mlLUTIterator.h.
Definition at line 171 of file mlLUTIterator.h.
Definition at line 172 of file mlLUTIterator.h.
Definition at line 173 of file mlLUTIterator.h.
Definition at line 174 of file mlLUTIterator.h.
Initialize.
Definition at line 239 of file mlLUTIterator.h.
References B, G, L, ml::LUT_ABGR, ml::LUT_BGR, ml::LUT_L, ml::LUT_LA, ml::LUT_RGB, ml::LUT_RGBA, ml::LUTAlphaChannelIndex(), ml::LUTNumberOfChannels(), ml::LUTReducedVisualType(), mlrange_cast(), R, and T.
Referenced by ml::LUTIterator< T >::LUTIterator(), ml::LUTIterator< T >::LUTIterator(), and ml::LUTIterator< T >::LUTIterator().
|
inline |
Increment operator.
Definition at line 154 of file mlLUTIterator.h.
|
protected |
Pointer increment.
Definition at line 200 of file mlLUTIterator.h.
|
protected |
Dummy channel entries.
Definition at line 197 of file mlLUTIterator.h.
|
protected |
Increment method pointers.
Definition at line 194 of file mlLUTIterator.h.
|
protected |
Definition at line 194 of file mlLUTIterator.h.
|
protected |
Definition at line 194 of file mlLUTIterator.h.
T** ml::LUTIterator< T >::chn |
Channel pointer array.
Definition at line 158 of file mlLUTIterator.h.