MeVisLab Toolbox Reference
mlLUTFSelect.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_LUTFSELECT_H
14#define ML_LUTFSELECT_H
15
16
18
19#include "mlLUTSystem.h"
20#include "mlLUTFunction.h"
21
22
23
25
26
29{
30public:
31
33 LUTFSelect (void);
34
35
37 virtual void setInputLUT (const LUTFunction *inLUT);
38
39
42
44 virtual void setRow (int row) { _row = row; changed(); }
45
47 virtual int getRow (void) const { return _row; }
48
50 virtual void setLayer (int layer) { _layer = layer; changed(); }
51
53 virtual int getLayer (void) const { return _layer; }
54
56
57
60
62 bool isValid (void) const override;
63
65 double getNativeMinIndex (void) const override;
66
68 double getNativeMaxIndex (void) const override;
69
71 double getNativeMinValue (void) const override;
72
74 double getNativeMaxValue (void) const override;
75
77
78
79protected:
80
83
89
97 double minIndex, double maxIndex) const override;
98
100 template <typename T>
102 double minIndex, double maxIndex, bool rescaled) const;
103
105
106
109
111 int _row, _layer;
112
113
115
116};
117
118
120
121#endif
122// __mlLUTFSelect_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
Select a 1D-LUT from a specified row/layer of a 2D- or 3D-LUT.
bool renderLUT(LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex, bool rescaled) const
Perform LUT rendering, return true if successful.
const LUTFunction * _inLUT
Input LUT.
virtual void setInputLUT(const LUTFunction *inLUT)
Set input LUT, set relative flag to true if input LUT is relative.
double getNativeMinIndex(void) const override
Get native minimum index.
virtual void setLayer(int layer)
Set layer index.
double getNativeMaxValue(void) const override
Get native maximum LUT value.
virtual void setRow(int row)
Set row index.
LUTFSelect(void)
Constructor.
bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
ML_CLASS_HEADER(LUTFSelect)
bool isValid(void) const override
Return true if the LUT function is valid.
double getNativeMaxIndex(void) const override
Get native maximum index.
virtual int getRow(void) const
Get row index.
double getNativeMinValue(void) const override
Get native minimum LUT value.
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.
virtual int getLayer(void) const
Get layer index.
Common base class for lookup tables.
void changed(void)
Assign a new LUT ID.
LUT iterator base class with type independent functionality and declarations.
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
Target mlrange_cast(Source arg)
Generic version of checked ML casts.