MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
24
25
28{
29public:
32
33
35 virtual void setInputLUT(const LUTFunction* inLUT);
36
37
40
42 virtual void setRow(int row)
43 {
44 _row = row;
45 changed();
46 }
47
49 virtual int getRow(void) const
50 {
51 return _row;
52 }
53
55 virtual void setLayer(int layer)
56 {
57 _layer = layer;
58 changed();
59 }
60
62 virtual int getLayer(void) const
63 {
64 return _layer;
65 }
66
68
69
72
74 bool isValid(void) const override;
75
77 double getNativeMinIndex(void) const override;
78
80 double getNativeMaxIndex(void) const override;
81
83 double getNativeMinValue(void) const override;
84
86 double getNativeMaxValue(void) const override;
87
89
90
91protected:
94
100
108 double maxIndex) const override;
109
111 template <typename T> bool renderLUT(LUTData<T>* lutData, LUTIterator<T>* lutIterator, double minIndex,
112 double maxIndex, bool rescaled) const;
113
115
116
119
121 int _row, _layer;
122
123
125};
126
127
129
130#endif
131// __mlLUTFSelect_H
Untyped base class for LUTData template classes.
Definition mlLUTData.h:65
A LUTData object stores an instance of a LUT, rendered for a specified visual type,...
Definition mlLUTData.h:308
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.