MeVisLab Toolbox Reference
mlLUTFChannelMap.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_LUTFCHANNEL_MAP_H
14#define ML_LUTFCHANNEL_MAP_H
15
16
19
20#include "mlLUTSystem.h"
21#include "mlLUTFunction.h"
22
23
24
25ML_START_NAMESPACE
26
27
31{
32public:
33
36
37
40
42 bool isValid (void) const override;
43
45 double getNativeMinIndex (void) const override;
46
48 double getNativeMaxIndex (void) const override;
49
51 int getHeight (void) const override;
52
54 int getDepth (void) const override;
55
57 double getNativeMinValue (void) const override;
58
60 double getNativeMaxValue (void) const override;
61
63
64
73
74
76 void setRGBAMap (Map r, Map g, Map b, Map a);
77
79 void setLAMap (Map l, Map a);
80
82 const Map *getMap (void) const { return _map; }
83
84
86 void setSource (LUTFunction *source);
87
88
89protected:
90
93
98 bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override;
99
106 bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator,
107 double minIndex, double maxIndex) const override;
108
112 template <typename T>
113 bool renderLUT (LUTData<T> *lutData, LUTIterator<T> *lutIterator, double minIndex, double maxIndex,
114 bool rescale) const;
115
117
118
121
124
125
127
128};
129
130
131ML_END_NAMESPACE
132
133
134#endif
135// __mlLUTFChannelMap_H
int getDepth(void) const override
Get native LUT depth (= number of layers, numbering starts at 0).
LUTFunction * _source
Input LUT function.
double getNativeMinIndex(void) const override
Get native minimum index.
void setSource(LUTFunction *source)
Set input LUT function.
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).
bool renderLUTNative(LUTDataBase *lutData, LUTIteratorBase *lutIterator) const override
ML_CLASS_HEADER(LUTFChannelMap)
double getNativeMinValue(void) const override
Get native minimum LUT value.
const Map * getMap(void) const
Get current channel map.
void setLAMap(Map l, Map a)
Specify channel map for L(A) output LUT.
Map
Channel source selector constants and type.
@ MAP_B
Red, green, blue channels.
@ MAP_L
Intensity channel.
@ MAP_NUM_VALUES
Number of selector constants.
@ MAP_NONE
No source channel.
@ MAP_A
Alpha channel.
double getNativeMaxIndex(void) const override
Get native maximum index.
void setRGBAMap(Map r, Map g, Map b, Map a)
Specify channel map for RGB(A) output LUT.
Map _map[LUTIteratorBase::MAX_CHANNELS]
Source channel selectors.
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
bool renderLUTRescaled(LUTDataBase *lutData, LUTIteratorBase *lutIterator, double minIndex, double maxIndex) const override
LUTFChannelMap(void)
Constructor.
LUTFunction(LUTVisualType vt, bool relative)
Constructor.
LUT iterator base class with type independent functionality and declarations.
@ MAX_CHANNELS
Number of channels.
#define MLLUT_EXPORT
System specific macro definitions.
Definition mlLUTSystem.h:25