MeVisLab Toolbox Reference
mlLUTFColor.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_LUTFCOLOR_H
14 #define ML_LUTFCOLOR_H
15 
16 
18 
19 #include "mlLUTSystem.h"
20 #include "mlLUTFunction.h"
21 
22 
23 
24 ML_START_NAMESPACE
25 
26 
29 {
30 public:
31 
33  LUTFColor (void);
34 
35 
37  virtual void setInputLUT (LUTFunction *inLUT);
38 
39 
42 
44  virtual void setVisualType (LUTVisualType visualType) { _visualType = visualType; changed(); }
45 
47  virtual void getColor (double *r, double *g, double *b) const;
48 
50  virtual void setColor (double r, double g, double b);
51 
53  virtual double getIntensity (void) const { return _intensity; }
54 
56  virtual void setIntensity (double intensity);
57 
59  virtual double getAlpha (void) const { return _alpha; }
60 
62  virtual void setAlpha (double alpha);
63 
65 
66 
69 
71  double getNativeMinIndex (void) const override;
72 
74  double getNativeMaxIndex (void) const override;
75 
77  int getHeight (void) const override;
78 
80  int getDepth (void) const override;
81 
83  double getNativeMinValue (void) const override;
84 
86  double getNativeMaxValue (void) const override;
87 
89 
90 
91 protected:
92 
95 
100  bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override;
101 
108  bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator,
109  double minIndex, double maxIndex) const override;
110 
114  template <typename T>
115  bool renderLUT (LUTData<T> *lutData, LUTIterator<T> *lutIterator, bool rescaled,
116  double minIndex, double maxIndex) const;
117 
119 
120 
123 
125  double _color[3];
126 
128  double _intensity;
129 
131  double _alpha;
132 
133 
135 
136 };
137 
138 
139 ML_END_NAMESPACE
140 
141 #endif
142 // __mlLUTFColor_H
Untyped base class for LUTData template classes.
Definition: mlLUTData.h:64
A LUTData object stores an instance of a LUT, rendered for a specified visual type,...
Definition: mlLUTData.h:243
LUT transform to apply or remove color to an input LUT.
Definition: mlLUTFColor.h:29
virtual void setVisualType(LUTVisualType visualType)
Set visual type.
Definition: mlLUTFColor.h:44
virtual double getAlpha(void) const
Get alpha factor.
Definition: mlLUTFColor.h:59
int getHeight(void) const override
Get native LUT height (= number of rows, numbering starts at 0)
virtual double getIntensity(void) const
Get intensity factor.
Definition: mlLUTFColor.h:53
int getDepth(void) const override
Get native LUT depth (= number of layers, numbering starts at 0)
double getNativeMaxIndex(void) const override
Get native maximum index.
LUTFunction * _inLUT
Input LUT.
Definition: mlLUTFColor.h:122
virtual void setIntensity(double intensity)
Set intensity factor.
bool renderLUT(LUTData< T > *lutData, LUTIterator< T > *lutIterator, bool rescaled, double minIndex, double maxIndex) const
Render the colored LUT into lutData.
double _alpha
Alpha factor.
Definition: mlLUTFColor.h:131
bool renderLUTRescaled(LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const override
Render rescaled LUT into lutData using lutIterator to access and increment the LUT pointers.
ML_CLASS_HEADER(LUTFColor)
double getNativeMaxValue(void) const override
Get native maximum LUT value.
virtual void setColor(double r, double g, double b)
Set color factor.
double getNativeMinValue(void) const override
Get native minimum LUT value.
virtual void setAlpha(double alpha)
Set alpha factor.
bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
double getNativeMinIndex(void) const override
Get native minimum index.
double _intensity
Intensity factor.
Definition: mlLUTFColor.h:128
virtual void setInputLUT(LUTFunction *inLUT)
Set input LUT.
virtual void getColor(double *r, double *g, double *b) const
Store color factor in *r, *g and *b (if not null)
LUTFColor(void)
Constructor.
Common base class for lookup tables.
Definition: mlLUTFunction.h:55
void changed(void)
Assign a new LUT ID.
LUT iterator base class with type independent functionality and declarations.
Definition: mlLUTIterator.h:30
The LUTIterator class template is used by a LUTFunction object for rendering into a LUTData object.
#define MLLUT_EXPORT
System specific macro definitions.
Definition: mlLUTSystem.h:25
LUTVisualType
LUT visual type constants to identify the visual interpretation of the individual LUT channels.
Definition: mlLUTBasic.h:30