MeVisLab Toolbox Reference
ml::LUTIterator< T > Class Template Reference

The LUTIterator class template is used by a LUTFunction object for rendering into a LUTData object. More...

#include <mlLUTIterator.h>

Inheritance diagram for ml::LUTIterator< T >:
ml::LUTIteratorBase

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. More...
 
 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. More...
 
 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. More...
 
 ~LUTIterator () override
 Destructor. More...
 
void operator++ (void)
 Increment operator. More...
 
- Public Member Functions inherited from ml::LUTIteratorBase
virtual ~LUTIteratorBase ()
 Destructor (declared here to make it virtual) More...
 
bool isValid (void) const
 Is iterator valid? More...
 
LUTVisualType getSourceType (void) const
 Get visual type used for rendering (source type) More...
 
LUTVisualType getTargetType (void) const
 Get visual type used for storing (target type) More...
 
bool alphaNeedsInit (void) const
 Alpha channel needs initialization. More...
 
int getWidth (void) const
 Get LUT width. More...
 
int operator() (void) const
 Get current index (zero based) More...
 
int getRow (void) const
 Get current row. More...
 
int getLayer (void) const
 Get current layer. More...
 
bool atEnd (void) const
 End of index range reached? More...
 
int getNumChannels (void) const
 Get number of (source) channels. More...
 

Public Attributes

T ** chn
 Channel pointer array. More...
 

Protected Types

typedef void(LUTIterator< T >::* IncrementFnc) (void)
 Increment method pointer type definition. More...
 
- 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. More...
 
void clear (void)
 Clean up. More...
 
void inc1 (void)
 ! Increment methods More...
 
void inc2 (void)
 
void inc3 (void)
 
void inc4 (void)
 
void inc5 (void)
 
void convertLtoRGB (void)
 Convert Luminance to RGB. More...
 
void convertRGBtoL (void)
 Convert RGB to Luminance. More...
 
void convertAndInc (void)
 Increment method including conversion. More...
 
- 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) More...
 

Protected Attributes

IncrementFnc _inc
 Increment method pointers. More...
 
IncrementFnc _incConvert
 
IncrementFnc _incPointers
 
T_dummy
 Dummy channel entries. More...
 
int _dpLut
 Pointer increment. More...
 
- Protected Attributes inherited from ml::LUTIteratorBase
bool _valid
 Iterator valid flag. More...
 
LUTVisualType _vtFrom
 Source visual type, used by the LUT being rendered. More...
 
LUTVisualType _vtTo
 Target visual type, used by the LUTData object storing the rendered LUT. More...
 
enum ml::LUTIteratorBase::ConvMethod _convMethodId
 
int _incMethodId
 Pointer increment method id (= number of channel pointers to increment) More...
 
bool _initAlpha
 Alpha channel needs initialization. More...
 
int _width
 Width of LUTData object. More...
 
int _index
 Current index. More...
 
int _row
 Current row and layer. More...
 
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...
 

Detailed Description

template<typename T>
class ml::LUTIterator< T >

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.

Member Typedef Documentation

◆ IncrementFnc

template<typename T >
typedef void(LUTIterator<T>::* ml::LUTIterator< T >::IncrementFnc) (void)
protected

Increment method pointer type definition.

Definition at line 191 of file mlLUTIterator.h.

Constructor & Destructor Documentation

◆ LUTIterator() [1/3]

template<typename T >
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().

◆ LUTIterator() [2/3]

template<typename T >
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().

◆ LUTIterator() [3/3]

template<typename T >
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().

◆ ~LUTIterator()

template<typename T >
ml::LUTIterator< T >::~LUTIterator ( )
inlineoverride

Destructor.

Definition at line 150 of file mlLUTIterator.h.

Member Function Documentation

◆ clear()

template<typename T >
void ml::LUTIterator< T >::clear ( void  )
protected

Clean up.

Definition at line 336 of file mlLUTIterator.h.

◆ convertAndInc()

template<typename T >
void ml::LUTIterator< T >::convertAndInc ( void  )
inlineprotected

Increment method including conversion.

Definition at line 187 of file mlLUTIterator.h.

◆ convertLtoRGB()

template<typename T >
void ml::LUTIterator< T >::convertLtoRGB ( void  )
inlineprotected

Convert Luminance to RGB.

Definition at line 177 of file mlLUTIterator.h.

References L.

◆ convertRGBtoL()

template<typename T >
void ml::LUTIterator< T >::convertRGBtoL ( void  )
inlineprotected

Convert RGB to Luminance.

Definition at line 180 of file mlLUTIterator.h.

References B, G, L, ml::LUTConvertRGBtoL(), and R.

◆ inc1()

template<typename T >
void ml::LUTIterator< T >::inc1 ( void  )
inlineprotected

! Increment methods

Definition at line 170 of file mlLUTIterator.h.

◆ inc2()

template<typename T >
void ml::LUTIterator< T >::inc2 ( void  )
inlineprotected

Definition at line 171 of file mlLUTIterator.h.

◆ inc3()

template<typename T >
void ml::LUTIterator< T >::inc3 ( void  )
inlineprotected

Definition at line 172 of file mlLUTIterator.h.

◆ inc4()

template<typename T >
void ml::LUTIterator< T >::inc4 ( void  )
inlineprotected

Definition at line 173 of file mlLUTIterator.h.

◆ inc5()

template<typename T >
void ml::LUTIterator< T >::inc5 ( void  )
inlineprotected

Definition at line 174 of file mlLUTIterator.h.

◆ init()

◆ operator++()

template<typename T >
void ml::LUTIterator< T >::operator++ ( void  )
inline

Increment operator.

Definition at line 154 of file mlLUTIterator.h.

Member Data Documentation

◆ _dpLut

template<typename T >
int ml::LUTIterator< T >::_dpLut
protected

Pointer increment.

Definition at line 200 of file mlLUTIterator.h.

◆ _dummy

template<typename T >
T* ml::LUTIterator< T >::_dummy
protected

Dummy channel entries.

Definition at line 197 of file mlLUTIterator.h.

◆ _inc

template<typename T >
IncrementFnc ml::LUTIterator< T >::_inc
protected

Increment method pointers.

Definition at line 194 of file mlLUTIterator.h.

◆ _incConvert

template<typename T >
IncrementFnc ml::LUTIterator< T >::_incConvert
protected

Definition at line 194 of file mlLUTIterator.h.

◆ _incPointers

template<typename T >
IncrementFnc ml::LUTIterator< T >::_incPointers
protected

Definition at line 194 of file mlLUTIterator.h.

◆ chn

template<typename T >
T** ml::LUTIterator< T >::chn

Channel pointer array.

Definition at line 158 of file mlLUTIterator.h.


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