13#ifndef ML_LUTFUNCTION_H
14#define ML_LUTFUNCTION_H
32#define ML_LUT_NATIVE_MINMAX_DOUBLE 1
67 virtual bool isValid (
void)
const {
return true; }
92 virtual int getDepth (
void)
const {
return 1; }
180 double minIndex,
double maxIndex)
const;
190 template <
typename T>
197 template <
typename T>
199 double minIndex,
double maxIndex)
const;
virtual bool renderLUTRescaled(LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const
virtual LUTVisualType getVisualType(void) const
Get LUT visual type.
virtual bool render(LUTDataBase *lutData) const
virtual int getDepth(void) const
Get native LUT depth (= number of layers, numbering starts at 0).
unsigned int getId(void) const
virtual LUTVisualType getRenderType(LUTDataBase *) const
static unsigned int generateUniqueId(void)
virtual double getNativeMaxIndex(void) const
Get native maximum index.
virtual bool isRelative(void) const
Is LUT relative?
static unsigned int _gNextId
Global storage for next unused LUT ID to ensure uniqueness.
virtual bool renderRescaled(LUTDataBase *lutData, double minIndex, double maxIndex) const
virtual double getNativeMinIndex(void) const
Get native minimum index.
virtual LUTDimensionality getDimensionality(void) const
Get dimensionality (1, 2, or 3), usually depending on height and depth.
virtual bool isValid(void) const
Return true if the LUT function is valid. An invalid LUT function can not be rendered.
virtual double getNativeMinValue(void) const
Get native minimum LUT value.
virtual int getHeight(void) const
Get native LUT height (= number of rows, numbering starts at 0).
void overwriteUniqueId(unsigned int newId)
Overwrites the unique id. NOTE: use this only if you really know what you are doing!
virtual void setRelative(bool relative)
Set/reset relative flag.
bool interpolateLUT(LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex) const
virtual bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const =0
LUTVisualType _visualType
LUT visual type.
LUTFunction(LUTVisualType vt, bool relative)
Constructor.
bool renderT(LUTData< T > *lutData, bool rescaled, double minIndex, double maxIndex) const
ML_ABSTRACT_CLASS_HEADER(LUTFunction)
virtual double getNativeMaxValue(void) const
Get native maximum LUT value.
bool _relative
Flag for relative LUT.
LUT iterator base class with type independent functionality and declarations.
#define MLLUT_EXPORT
System specific macro definitions.
LUTDimensionality
LUT dimensionality.
@ LUT_1D
1D-LUT, consists of a single row
@ LUT_3D
3D-LUT, consists of multiple layers
@ LUT_2D
2D-LUT, consists of multiple rows in a single layer