MeVisLab Toolbox Reference
mlLUTFConcat.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_LUTFCONCAT_H
14 #define ML_LUTFCONCAT_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  LUTFConcat (void);
34 
35 
38 
40  virtual void addInputLut (const LUTFunction *lutFunction);
41 
43  virtual void clearInputLuts (void);
44 
46  virtual const LUTFunction *getInputLut (int i) const;
47 
49 
50 
53 
55  enum CatMode {
56  CAT_ROWS = 0,
58  NUM_CAT_MODES
59  };
60 
62  virtual void setCatMode (CatMode catMode);
63 
64  virtual CatMode getCatMode (void) const { return _catMode; }
65 
67 
68 
71 
73  bool isValid (void) const override;
74 
76  double getNativeMinIndex (void) const override;
77 
79  double getNativeMaxIndex (void) const override;
80 
82  int getHeight (void) const override;
83 
85  int getDepth (void) const override;
86 
88  double getNativeMinValue (void) const override;
89 
91  double getNativeMaxValue (void) const override;
92 
94 
95 
99 
104  bool render (LUTDataBase *lutData) const override;
105 
112  bool renderRescaled (LUTDataBase *lutData, double minIndex, double maxIndex) const override;
113 
115 
116 
117 
118 protected:
119 
122 
124  bool renderLUTNative (LUTDataBase * /*lutData*/, LUTIteratorBase * /*lutIterator*/) const override
125  { return false; }
126 
129  virtual bool renderLUT (LUTDataBase *lutData, double minIndex, double maxIndex, bool rescaled) const;
130 
132 
133 
135  std::vector<const LUTFunction*> _inLUTs;
136 
139 
140 
142 
143 };
144 
145 
146 ML_END_NAMESPACE
147 
148 #endif
149 // __mlLUTFConcat_H
Untyped base class for LUTData template classes.
Definition: mlLUTData.h:64
Concatenate LUTs in row or layer direction.
Definition: mlLUTFConcat.h:29
bool render(LUTDataBase *lutData) const override
Render LUT in (previously initialized) LUTData object.
double getNativeMinIndex(void) const override
Get native minimum index.
LUTFConcat(void)
Constructor.
virtual void clearInputLuts(void)
Clear list of input LUT functions.
double getNativeMaxValue(void) const override
Get native maximum LUT value.
CatMode _catMode
Direction of concatenation (row or layer)
Definition: mlLUTFConcat.h:138
virtual bool renderLUT(LUTDataBase *lutData, double minIndex, double maxIndex, bool rescaled) const
Perform LUT rendering by redirecting to input LUT functions, implemented for both native and rescaled...
ML_CLASS_HEADER(LUTFConcat)
virtual void addInputLut(const LUTFunction *lutFunction)
Add input LUT function.
bool isValid(void) const override
Return true if the LUT function is valid.
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.
virtual void setCatMode(CatMode catMode)
Set direction of concatenation.
CatMode
Direction of concatenation.
Definition: mlLUTFConcat.h:55
@ CAT_LAYERS
Concatenate in layer direction.
Definition: mlLUTFConcat.h:57
bool renderLUTNative(LUTDataBase *, LUTIteratorBase *) const override
Dummy implementation of inherited pure virtual method, not used.
Definition: mlLUTFConcat.h:124
int getHeight(void) const override
Get native LUT height (= number of rows, numbering starts at 0)
std::vector< const LUTFunction * > _inLUTs
Input LUTs.
Definition: mlLUTFConcat.h:135
virtual const LUTFunction * getInputLut(int i) const
Get i-th input LUT function.
virtual CatMode getCatMode(void) const
Definition: mlLUTFConcat.h:64
double getNativeMinValue(void) const override
Get native minimum LUT value.
bool renderRescaled(LUTDataBase *lutData, double minIndex, double maxIndex) const override
Render rescaled LUT in (previously initialized) LUTData object.
Common base class for lookup tables.
Definition: mlLUTFunction.h:55
LUT iterator base class with type independent functionality and declarations.
Definition: mlLUTIterator.h:30
#define MLLUT_EXPORT
System specific macro definitions.
Definition: mlLUTSystem.h:25