|
MeVisLab Toolbox Reference
|
A LUT function composing several input LUTs into a single output LUT. More...
#include <mlLUTFCompose.h>
Public Member Functions | |
| LUTFCompose (void) | |
| Constructor. | |
LUT properties | |
| bool | isValid (void) const override |
| Return true if the LUT function is valid. | |
| 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. | |
LUT rendering | |
These methods are called by LUT users to obtain a rendering of the LUT function. | |
| bool | render (LUTDataBase *lutData) const override |
| bool | renderRescaled (LUTDataBase *lutData, double minIndex, double maxIndex) const override |
| 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 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 |
| Public Member Functions inherited from ml::Base | |
| Base () | |
| Constructor. | |
| virtual | ~Base () |
| Destructor. | |
| virtual Base * | deepCopy () 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 (LUTFCompose) | |
LUT implementation | |
| LUTVisualType | getRenderType (LUTDataBase *lutData) const override |
| 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, double minIndex, double maxIndex, bool rescale) const |
| unsigned int | getInputLUTWidth (unsigned int index) const |
| Get the width of the index range for which the specified input LUT needs to be rendered. | |
| 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) | |
Protected Attributes | |
| std::vector< const LUTFunction * > | _inputLUTs |
| List of input LUTs. | |
| unsigned int | _resolution |
| Intermediate resolution. | |
| Protected Attributes inherited from ml::LUTFunction | |
| LUTVisualType | _visualType |
| LUT visual type. | |
| bool | _relative |
| Flag for relative LUT. | |
| unsigned int | _id |
Input LUT list and intermediate resolution | |
| static unsigned int | defaultResolution |
| Default value for the intermediate resolution. | |
| void | clear (void) |
| Clear list of input LUTs. | |
| void | addInputLUT (const LUTFunction &inputLUT) |
| Add an input LUT. | |
| unsigned int | getNumInputLUTs (void) const |
| Get number of input LUTs. | |
| const LUTFunction * | getInputLUT (unsigned int i) const |
| Get pointer to i-th input LUT (or NULL if out of range). | |
| void | setResolution (unsigned int resolution) |
| Set intermediate resolution (if not obtained from input LUT). | |
| unsigned int | getResolution (void) const |
| Get intermediate resolution. | |
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. | |
A LUT function composing several input LUTs into a single output LUT.
Definition at line 29 of file mlLUTFCompose.h.
| ml::LUTFCompose::LUTFCompose | ( | void | ) |
Constructor.
Referenced by ML_CLASS_HEADER().
| void ml::LUTFCompose::addInputLUT | ( | const LUTFunction & | inputLUT | ) |
Add an input LUT.
References ml::LUTFunction::LUTFunction().
| void ml::LUTFCompose::clear | ( | void | ) |
Clear list of input LUTs.
|
overridevirtual |
Get native LUT depth (= number of layers, numbering starts at 0).
Reimplemented from ml::LUTFunction.
|
overridevirtual |
Get native LUT height (= number of rows, numbering starts at 0).
Reimplemented from ml::LUTFunction.
| const LUTFunction * ml::LUTFCompose::getInputLUT | ( | unsigned int | i | ) | const |
Get pointer to i-th input LUT (or NULL if out of range).
References ml::LUTFunction::LUTFunction().
|
protected |
Get the width of the index range for which the specified input LUT needs to be rendered.
|
overridevirtual |
Get native maximum index.
Reimplemented from ml::LUTFunction.
|
overridevirtual |
Get native maximum LUT value.
Reimplemented from ml::LUTFunction.
|
overridevirtual |
Get native minimum index.
Reimplemented from ml::LUTFunction.
|
overridevirtual |
Get native minimum LUT value.
Reimplemented from ml::LUTFunction.
| unsigned int ml::LUTFCompose::getNumInputLUTs | ( | void | ) | const |
Get number of input LUTs.
|
inlineoverrideprotectedvirtual |
Get visual type used for rendering. This method is called by render() and renderRescaled() to initialize the LUT iterator object appropriate for a pair of source/target visual types. By returning the visual type of lutData, we always render directly in the visual type requested.
Reimplemented from ml::LUTFunction.
Definition at line 122 of file mlLUTFCompose.h.
References ml::LUTDataBase::getVisualType().
|
inline |
|
overridevirtual |
Return true if the LUT function is valid.
Reimplemented from ml::LUTFunction.
|
protected |
References LUTFCompose().
|
overridevirtual |
Render LUT in (previously initialized) LUTData object. Return true if successful.
Overloaded here to directly render the LUT if only one input LUT is specified
Reimplemented from ml::LUTFunction.
|
protected |
Render the output LUT into lutData using lutIterator to access and increment the LUT pointers. Return true if successful.
|
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.
|
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.
|
overridevirtual |
Render rescaled LUT in (previously initialized) LUTData object. LUT is rendered for range minIndex .. maxIndex, but resampled to the index range specified in lutData. Return true if successful
Overloaded here to directly render the LUT if only one input LUT is specified
Reimplemented from ml::LUTFunction.
|
inline |
Set intermediate resolution (if not obtained from input LUT).
Definition at line 80 of file mlLUTFCompose.h.
References _resolution, and ml::LUTFunction::changed().
|
protected |
List of input LUTs.
Definition at line 152 of file mlLUTFCompose.h.
|
protected |
Intermediate resolution.
Definition at line 155 of file mlLUTFCompose.h.
Referenced by getResolution(), and setResolution().
|
static |
Default value for the intermediate resolution.
Definition at line 86 of file mlLUTFCompose.h.