MeVisLab Toolbox Reference
ml::LUTFColor Class Reference

LUT transform to apply or remove color to an input LUT. More...

#include <mlLUTFColor.h>

Inheritance diagram for ml::LUTFColor:
ml::LUTFunction ml::Base

Public Member Functions

 LUTFColor (void)
 Constructor.
virtual void setInputLUT (LUTFunction *inLUT)
 Set input LUT.
Transform parameters
virtual void setVisualType (LUTVisualType visualType)
 Set visual type.
virtual void getColor (double *r, double *g, double *b) const
 Store color factor in *r, *g and *b (if not null).
virtual void setColor (double r, double g, double b)
 Set color factor.
virtual double getIntensity (void) const
 Get intensity factor.
virtual void setIntensity (double intensity)
 Set intensity factor.
virtual double getAlpha (void) const
 Get alpha factor.
virtual void setAlpha (double alpha)
 Set alpha factor.
LUT properties
double getNativeMinIndex (void) const override
 Get native minimum index.
double getNativeMaxIndex (void) const override
 Get native maximum index.
int getHeight (void) const override
 Get native LUT height (= number of rows, numbering starts at 0).
int getDepth (void) const override
 Get native LUT depth (= number of layers, numbering starts at 0).
double getNativeMinValue (void) const override
 Get native minimum LUT value.
double getNativeMaxValue (void) const override
 Get native maximum LUT value.
Public Member Functions inherited from ml::LUTFunction
 LUTFunction (LUTVisualType vt, bool relative)
 Constructor.
void changed (void)
void overwriteUniqueId (unsigned int newId)
 Overwrites the unique id. NOTE: use this only if you really know what you are doing!
virtual bool isValid (void) const
 Return true if the LUT function is valid. An invalid LUT function can not be rendered.
virtual LUTVisualType getVisualType (void) const
 Get LUT visual type.
virtual bool isRelative (void) const
 Is LUT relative?
virtual void setRelative (bool relative)
 Set/reset relative flag.
virtual LUTDimensionality getDimensionality (void) const
 Get dimensionality (1, 2, or 3), usually depending on height and depth.
unsigned int getId (void) const
virtual bool render (LUTDataBase *lutData) const
virtual bool renderRescaled (LUTDataBase *lutData, double minIndex, double maxIndex) const
Public Member Functions inherited from ml::Base
 Base ()
 Constructor.
virtual ~Base ()
 Destructor.
virtual BasedeepCopy () const
bool isOfAllowedType (const std::vector< const RuntimeType * > &types) const
virtual bool isRefCountedBase () const
 Returns whether the instance is derived from RefCountedBase.
virtual std::string detailString () const
virtual bool implementsPersistence (PersistenceInterface) const
virtual std::string persistentState () const
 Returns a string describing the object's internal state.
virtual void setPersistentState (const std::string &state)
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node.
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node.
virtual void writeTo (AbstractPersistenceOutputStream *) const
virtual void readFrom (AbstractPersistenceInputStream *, int)

Protected Member Functions

 ML_CLASS_HEADER (LUTFColor)
LUT implementation
bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const override
template<typename T>
bool renderLUT (LUTData< T > *lutData, LUTIterator< T > *lutIterator, bool rescaled, double minIndex, double maxIndex) const
Protected Member Functions inherited from ml::LUTFunction
template<typename T>
bool renderT (LUTData< T > *lutData, bool rescaled, double minIndex, double maxIndex) const
template<typename T>
bool interpolateLUT (LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex) const
 ML_ABSTRACT_CLASS_HEADER (LUTFunction)
virtual LUTVisualType getRenderType (LUTDataBase *) const

Protected Attributes

LUTFunction_inLUT
 Input LUT.
double _color [3]
 Color factor.
double _intensity
 Intensity factor.
double _alpha
 Alpha factor.
Protected Attributes inherited from ml::LUTFunction
LUTVisualType _visualType
 LUT visual type.
bool _relative
 Flag for relative LUT.
unsigned int _id

Additional Inherited Members

Public Types inherited from ml::Base
enum  PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream }
 This enum describes the different persistence interfaces available. More...
Static Public Member Functions inherited from ml::LUTFunction
static unsigned int generateUniqueId (void)
Static Protected Attributes inherited from ml::LUTFunction
static unsigned int _gNextId
 Global storage for next unused LUT ID to ensure uniqueness.

Detailed Description

LUT transform to apply or remove color to an input LUT.

Definition at line 28 of file mlLUTFColor.h.

Constructor & Destructor Documentation

◆ LUTFColor()

ml::LUTFColor::LUTFColor ( void )

Constructor.

Referenced by ML_CLASS_HEADER().

Member Function Documentation

◆ getAlpha()

virtual double ml::LUTFColor::getAlpha ( void ) const
inlinevirtual

Get alpha factor.

Definition at line 59 of file mlLUTFColor.h.

References _alpha.

◆ getColor()

virtual void ml::LUTFColor::getColor ( double * r,
double * g,
double * b ) const
virtual

Store color factor in *r, *g and *b (if not null).

◆ getDepth()

int ml::LUTFColor::getDepth ( void ) const
overridevirtual

Get native LUT depth (= number of layers, numbering starts at 0).

Reimplemented from ml::LUTFunction.

◆ getHeight()

int ml::LUTFColor::getHeight ( void ) const
overridevirtual

Get native LUT height (= number of rows, numbering starts at 0).

Reimplemented from ml::LUTFunction.

◆ getIntensity()

virtual double ml::LUTFColor::getIntensity ( void ) const
inlinevirtual

Get intensity factor.

Definition at line 53 of file mlLUTFColor.h.

References _intensity.

◆ getNativeMaxIndex()

double ml::LUTFColor::getNativeMaxIndex ( void ) const
overridevirtual

Get native maximum index.

Reimplemented from ml::LUTFunction.

◆ getNativeMaxValue()

double ml::LUTFColor::getNativeMaxValue ( void ) const
overridevirtual

Get native maximum LUT value.

Reimplemented from ml::LUTFunction.

◆ getNativeMinIndex()

double ml::LUTFColor::getNativeMinIndex ( void ) const
overridevirtual

Get native minimum index.

Reimplemented from ml::LUTFunction.

◆ getNativeMinValue()

double ml::LUTFColor::getNativeMinValue ( void ) const
overridevirtual

Get native minimum LUT value.

Reimplemented from ml::LUTFunction.

◆ ML_CLASS_HEADER()

ml::LUTFColor::ML_CLASS_HEADER ( LUTFColor )
protected

References LUTFColor().

◆ renderLUT()

template<typename T>
bool ml::LUTFColor::renderLUT ( LUTData< T > * lutData,
LUTIterator< T > * lutIterator,
bool rescaled,
double minIndex,
double maxIndex ) const
protected

Render the colored LUT into lutData. If rescaled is true, render LUT rescaled with respect to range minIndex .. maxIndex. Return true if successful.

◆ renderLUTNative()

bool ml::LUTFColor::renderLUTNative ( LUTDataBase * lutData,
LUTIteratorBase * lutIterator ) const
overrideprotectedvirtual

Render the lookup table into lutData using lutIterator to access and increment the LUT pointers. Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). Return true if successful.

Implements ml::LUTFunction.

◆ renderLUTRescaled()

bool ml::LUTFColor::renderLUTRescaled ( LUTDataBase * lutData,
LUTIteratorBase * lutIterator,
double minIndex,
double maxIndex ) const
overrideprotectedvirtual

Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers. Both lutData and lutIterator should be type-cast to a derived, type specific class pointer, according to lutData->getDataType(). The LUT is rendered for range minIndex .. maxIndex, but resampled to the index range specified in lutData. Return true if successful.

Reimplemented from ml::LUTFunction.

◆ setAlpha()

virtual void ml::LUTFColor::setAlpha ( double alpha)
virtual

Set alpha factor.

◆ setColor()

virtual void ml::LUTFColor::setColor ( double r,
double g,
double b )
virtual

Set color factor.

◆ setInputLUT()

virtual void ml::LUTFColor::setInputLUT ( LUTFunction * inLUT)
virtual

Set input LUT.

References ml::LUTFunction::LUTFunction().

◆ setIntensity()

virtual void ml::LUTFColor::setIntensity ( double intensity)
virtual

Set intensity factor.

◆ setVisualType()

virtual void ml::LUTFColor::setVisualType ( LUTVisualType visualType)
inlinevirtual

Set visual type.

Definition at line 44 of file mlLUTFColor.h.

References ml::LUTFunction::_visualType, and ml::LUTFunction::changed().

Member Data Documentation

◆ _alpha

double ml::LUTFColor::_alpha
protected

Alpha factor.

Definition at line 131 of file mlLUTFColor.h.

Referenced by getAlpha().

◆ _color

double ml::LUTFColor::_color[3]
protected

Color factor.

Definition at line 125 of file mlLUTFColor.h.

◆ _inLUT

LUTFunction* ml::LUTFColor::_inLUT
protected

Input LUT.

Definition at line 122 of file mlLUTFColor.h.

◆ _intensity

double ml::LUTFColor::_intensity
protected

Intensity factor.

Definition at line 128 of file mlLUTFColor.h.

Referenced by getIntensity().


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