MeVisLab Toolbox Reference
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
23
25
26
29{
30public:
31
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,
65 ADD, BLEND, SUBTRACT, MULTIPLY, MIN, MAX,
66 NUM_MODES
67 };
68
70 enum Mask {
71 MASK_R = 0, MASK_G, MASK_B, MASK_A, MASK_RGB, MASK_RGBA,
72 NUM_MASKS
73 };
74
76 class LUTEntry {
77 public:
82 };
83
86
88 void addEntry(const LUTEntry& entry);
89
91 unsigned int getNumEntries() const;
92
94 const LUTEntry& getEntry(int i) const;
95
96protected:
97
100
106
114 double minIndex, double maxIndex) const override;
115
118 template <typename T>
120 bool rescale) const;
121
123
124 std::vector<LUTEntry> _entries;
125
127
128};
129
130
132
133
134#endif
135// __mlLUTFCombine_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
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