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
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
66 enum Map {
67 MAP_NONE = 0,
69 MAP_R, MAP_G, MAP_B,
71 MAP_NUM_VALUES
72 };
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
99
107 double minIndex, double maxIndex) const override;
108
112 template <typename T>
114 bool rescale) const;
115
117
118
121
124
125
127
128};
129
130
132
133
134#endif
135// __mlLUTFChannelMap_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
A LUT function mapping the individual channels of the input LUT to the channels of the output LUT.
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
Render the lookup table into lutData using lutIterator to access and increment the LUT pointers.
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_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.
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 a LUT primitive (as selected by the _shape member variable) into lutData using lutIterator to ...
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.
LUTFChannelMap(void)
Constructor.
Common base class for lookup tables.
LUT iterator base class with type independent functionality and declarations.
@ MAX_CHANNELS
Number of channels.
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.