|
MeVisLab Toolbox Reference
|
#include <mlLUTFLinear.h>
Public Types | |
| enum | ColorInterpolation { InterpolateRGB , InterpolateHLS , InterpolateHLSpos , InterpolateHLSneg , InterpolateConstant , InterpolateSRGB } |
| Color interpolation constants. More... | |
| Public Types inherited from ml::Base | |
| enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
| This enum describes the different persistence interfaces available. More... | |
Public Member Functions | |
| ML_SET_ADDSTATE_VERSION (1) | |
| LUTFLinear (void) | |
| Constructor. | |
LUT parameters | |
| virtual bool | setPoints (const LUTRGBAPointList &points) |
| const LUTRGBAPointList & | getPoints () const |
| Get sampling point table as a const reference. | |
| LUTRGBAPointList & | getModifiablePoints () |
| void | setVisualType (LUTVisualType visualType) |
| Set the visual type of the table (this affects how the points in the list are handled). | |
| int | insertPoint (const LUTRGBAPoint &point) |
| Insert a given point and return the resulting index in the sampling point table. | |
| void | removePoint (int idx) |
| Remove the point at the given index. | |
| const LUTRGBAPoint & | getPoint (int idx) const |
| Get a point at given index. | |
| void | setPoint (int idx, const LUTRGBAPoint &point) |
| Set a point at given index, does not check if position is correct! | |
| virtual double | getStartIndex (void) const |
| Get start index. | |
| virtual double | getEndIndex (void) const |
| Get end index. | |
| virtual ColorInterpolation | getColorInterpolation (void) const |
| Get color interpolation mode. | |
| virtual void | setColorInterpolation (ColorInterpolation c) |
| Set color interpolation mode. | |
| void | setAlphaFactor (float factor) |
| Set the global alpha factor (default is 1.). | |
| float | getAlphaFactor () const |
| Get the global alpha factor. | |
| bool | relativeUsesNativeRange () const |
| void | setRelativeUsesNativeRange (bool flag) |
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. | |
| 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. | |
| virtual int | getHeight (void) const |
| Get native LUT height (= number of rows, numbering starts at 0). | |
| virtual int | getDepth (void) const |
| Get native LUT depth (= number of layers, numbering starts at 0). | |
| virtual double | getNativeMinValue (void) const |
| Get native minimum LUT value. | |
| virtual double | getNativeMaxValue (void) const |
| Get native maximum LUT value. | |
| 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 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 | writeTo (AbstractPersistenceOutputStream *) const |
| virtual void | readFrom (AbstractPersistenceInputStream *, int) |
Static Public Member Functions | |
| static EnumValues< ColorInterpolation > | getColorInterpolationValues () |
| Color interpolation values. | |
| Static Public Member Functions inherited from ml::LUTFunction | |
| static unsigned int | generateUniqueId (void) |
Protected Member Functions | |
| void | addStateToTree (TreeNode *parent) const override |
| Attaches the object state as children of the given parent node. | |
| void | readStateFromTree (TreeNode *parent) override |
| Reads the object state from the children of the given parent node. | |
| void | copyPoint (int idx, double *array) const |
| Copy the point at table index idx to the given array (ordered like in the LUTIterator). | |
| ML_CLASS_HEADER (LUTFLinear) | |
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, double startIndex, double endIndex) 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 | |
| LUTRGBAPointList | _points |
| LUT sampling point table. | |
| float | _alphaFactor |
| Global alpha factor. | |
| bool | _relativeUsesNativeRange |
| ColorInterpolation | _colorInterpolation |
| Color interpolation mode. | |
| Protected Attributes inherited from ml::LUTFunction | |
| LUTVisualType | _visualType |
| LUT visual type. | |
| bool | _relative |
| Flag for relative LUT. | |
| unsigned int | _id |
Additional Inherited Members | |
| Static Protected Attributes inherited from ml::LUTFunction | |
| static unsigned int | _gNextId |
| Global storage for next unused LUT ID to ensure uniqueness. | |
A color/gray LUT with sampling points and linear, nearest neighbor or truncated interpolation inbetween
Definition at line 114 of file mlLUTFLinear.h.
Color interpolation constants.
| Enumerator | |
|---|---|
| InterpolateRGB | Interpolation in RGB space. |
| InterpolateHLS | Interpolation in HLS space, closest H direction. |
| InterpolateHLSpos | Interpolation in HLS space, positive H direction. |
| InterpolateHLSneg | Interpolation in HLS space, negative H direction. |
| InterpolateConstant | Interpolation by floor() truncation. |
| InterpolateSRGB | Convert to linear RGB, interpolate and convert back. |
Definition at line 122 of file mlLUTFLinear.h.
| ml::LUTFLinear::LUTFLinear | ( | void | ) |
Constructor.
Referenced by ML_CLASS_HEADER().
|
overrideprotectedvirtual |
Attaches the object state as children of the given parent node.
Reimplemented from ml::Base.
|
protected |
Copy the point at table index idx to the given array (ordered like in the LUTIterator).
|
inline |
Get the global alpha factor.
Definition at line 187 of file mlLUTFLinear.h.
References _alphaFactor.
|
inlinevirtual |
Get color interpolation mode.
Definition at line 175 of file mlLUTFLinear.h.
References _colorInterpolation.
|
static |
Color interpolation values.
|
virtual |
Get end index.
|
inline |
Get modifiable sampling point table. Make sure that you keep the order of the points and that you call changed() after each change to the table.
Definition at line 151 of file mlLUTFLinear.h.
References _points.
|
overridevirtual |
Get native maximum index.
Reimplemented from ml::LUTFunction.
|
overridevirtual |
Get native minimum index.
Reimplemented from ml::LUTFunction.
| const LUTRGBAPoint & ml::LUTFLinear::getPoint | ( | int | idx | ) | const |
Get a point at given index.
|
inline |
Get sampling point table as a const reference.
Definition at line 147 of file mlLUTFLinear.h.
References _points.
|
virtual |
Get start index.
| int ml::LUTFLinear::insertPoint | ( | const LUTRGBAPoint & | point | ) |
Insert a given point and return the resulting index in the sampling point table.
|
overridevirtual |
Return true if the LUT function is valid.
Reimplemented from ml::LUTFunction.
|
protected |
References LUTFLinear().
| ml::LUTFLinear::ML_SET_ADDSTATE_VERSION | ( | 1 | ) |
|
overrideprotectedvirtual |
Reads the object state from the children of the given parent node.
Reimplemented from ml::Base.
|
inline |
Return true if the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 193 of file mlLUTFLinear.h.
References _relativeUsesNativeRange.
| void ml::LUTFLinear::removePoint | ( | int | idx | ) |
Remove the point at the given index.
|
protected |
Render the LUT table between startIndex and endIndex 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.
|
inline |
Set the global alpha factor (default is 1.).
Definition at line 181 of file mlLUTFLinear.h.
References _alphaFactor, and ml::LUTFunction::changed().
|
inlinevirtual |
Set color interpolation mode.
Definition at line 178 of file mlLUTFLinear.h.
References _colorInterpolation, and ml::LUTFunction::changed().
| void ml::LUTFLinear::setPoint | ( | int | idx, |
| const LUTRGBAPoint & | point ) |
Set a point at given index, does not check if position is correct!
|
virtual |
Set table with sampling points, data is copied to internal storage. Returns true if successful.
|
inline |
Specify whether the native index range (given by the first and last index position in the sampling point table) is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 197 of file mlLUTFLinear.h.
References _relativeUsesNativeRange.
|
inline |
Set the visual type of the table (this affects how the points in the list are handled).
Definition at line 154 of file mlLUTFLinear.h.
References ml::LUTFunction::_visualType, and ml::LUTFunction::changed().
|
protected |
Global alpha factor.
Definition at line 258 of file mlLUTFLinear.h.
Referenced by getAlphaFactor(), and setAlphaFactor().
|
protected |
Color interpolation mode.
Definition at line 265 of file mlLUTFLinear.h.
Referenced by getColorInterpolation(), and setColorInterpolation().
|
protected |
LUT sampling point table.
Definition at line 255 of file mlLUTFLinear.h.
Referenced by getModifiablePoints(), and getPoints().
|
protected |
Flag specifying whether the native index range is used as the range for relative mapping, If set to false, [0,1] is used (default is false).
Definition at line 262 of file mlLUTFLinear.h.
Referenced by relativeUsesNativeRange(), and setRelativeUsesNativeRange().