MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlLUTFCombine.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_LUTFCOMBINE_H
14#define ML_LUTFCOMBINE_H
15
16
18
19#include "mlLUTSystem.h"
20#include "mlLUTFunction.h"
21
22
24
25
28{
29public:
33 {}
34
35
38
40 bool isValid(void) const override;
41
43 double getNativeMinIndex(void) const override;
44
46 double getNativeMaxIndex(void) const override;
47
49 int getHeight(void) const override;
50
52 int getDepth(void) const override;
53
55 double getNativeMinValue(void) const override;
56
58 double getNativeMaxValue(void) const override;
59
61
63 enum Mode {
64 REPLACE = 0,
71 NUM_MODES
72 };
73
75 enum Mask {
76 MASK_R = 0,
82 NUM_MASKS
83 };
84
87 {
88 public:
93 };
94
97
99 void addEntry(const LUTEntry& entry);
100
102 unsigned int getNumEntries() const;
103
105 const LUTEntry& getEntry(int i) const;
106
107protected:
110
116
124 double maxIndex) const override;
125
128 template <typename T> bool renderLUT(LUTData<T>* lutData, LUTIterator<T>* lutIterator, double minIndex,
129 double maxIndex, bool rescale) const;
130
132
133 std::vector<LUTEntry> _entries;
134
136};
137
138
140
141
142#endif
143// __mlLUTFCombine_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
stores a lut function entry that should be combined
A LUT function combining several input LUTs into a single output LUT.
int getDepth(void) const override
Get native LUT depth (= number of layers, numbering starts at 0)
Mask
gives a mask that is used for combining
double getNativeMaxIndex(void) const override
Get native maximum index.
void addEntry(const LUTEntry &entry)
add an entry
Mode
gives a mode that is used for combining
ML_CLASS_HEADER(LUTFCombine)
const LUTEntry & getEntry(int i) const
get the ith entry (no range checking!)
unsigned int getNumEntries() const
get number of entries
std::vector< LUTEntry > _entries
double getNativeMaxValue(void) const override
Get native maximum LUT value.
bool renderLUT(LUTData< T > *lutData, LUTIterator< T > *lutIterator, double minIndex, double maxIndex, bool rescale) const
Render the output LUT into lutData using lutIterator to access and increment the LUT pointers.
LUTFCombine(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.
void clearEntries()
clear the entries
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.
double getNativeMinValue(void) const override
Get native minimum LUT value.
bool isValid(void) const override
Return true if the LUT function is valid.
int getHeight(void) const override
Get native LUT height (= number of rows, numbering starts at 0)
double getNativeMinIndex(void) const override
Get native minimum index.
Common base class for lookup tables.
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.
@ LUT_L
Luminance (Gray)
Definition mlLUTBasic.h:31