MeVisLab Toolbox Reference
View2DLut.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2017, 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#pragma once
14
15#include "SoView2DSystem.h"
16
17#include "mlLUTData.h"
18#include "mlLUTFunction.h"
19
23{
24public:
27
29 void invalidate();
30
32 const MLuint8* getUint8Data() const { return _lut8.getData(); }
33
35 const MLuint16* getUint16Data() const { return _lut16.getData(); }
36
38 const ml::LUTDataId& getFullId() const { return _lut8.getFullId(); }
39
41 int getWidth() const { return _lut8.getWidth(); }
42
44 bool render(ml::LUTFunction* lut, int lutWidth, double range, double min, double max);
45
47 static bool shouldUseHighColorDepth() { return _useHighColorDepth; }
48
50 static void setShouldUseHighColorDepth(bool flag) { _useHighColorDepth = flag; }
51
52protected:
55
56 static bool _useHighColorDepth;
57};
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
A small wrapper class for the LUT data.
Definition View2DLut.h:23
static void setShouldUseHighColorDepth(bool flag)
Sets if high color depth should be used.
Definition View2DLut.h:50
bool render(ml::LUTFunction *lut, int lutWidth, double range, double min, double max)
Render the lut from given function.
ml::LUTData< MLuint8 > _lut8
Definition View2DLut.h:53
const ml::LUTDataId & getFullId() const
Get the full id of the lut data.
Definition View2DLut.h:38
int getWidth() const
Get the width of the lut.
Definition View2DLut.h:41
const MLuint16 * getUint16Data() const
Get the uint16 lut data (64bit RGBA).
Definition View2DLut.h:35
static bool _useHighColorDepth
Definition View2DLut.h:56
ml::LUTData< MLuint16 > _lut16
Definition View2DLut.h:54
static bool shouldUseHighColorDepth()
Returns true if high bit depth (float16) should be used.
Definition View2DLut.h:47
const MLuint8 * getUint8Data() const
Get the uint8 lut data (32bit RGBA).
Definition View2DLut.h:32
void invalidate()
Invalidate the lut data (changes the id to 0).
A LUTData object stores an instance of a LUT, rendered for a specified visual type,...
Definition mlLUTData.h:243
Common base class for lookup tables.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
unsigned char MLuint8
Definition mlTypeDefs.h:109
unsigned short MLuint16
Definition mlTypeDefs.h:142