MeVisLab Toolbox Reference
SoView2DShaderState.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2015, 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
#include "
SoView2DShaderDefinition.h
"
17
#include <vector>
18
#include <Inventor/SbBasic.h>
19
#include "
View2DSlice.h
"
20
#include "
View2DTexture.h
"
21
22
class
SoState
;
23
class
View2DTexture
;
24
class
SoView2DShaderOverlayInfo
;
25
28
class
SoView2DShaderState
29
{
30
public
:
31
SoView2DShaderState
();
32
33
void
setupFromState
(
const
std::vector<SoView2DShaderOverlayInfo*>&
overlays
,
const
std::vector<size_t>&
nodeIds
);
34
35
bool
isEqual
(
const
SoView2DShaderState
&
other
);
36
37
private
:
38
40
class
OverlayCacheInfo
41
{
42
public
:
43
OverlayCacheInfo() {
44
_blendMode =
BLEND_REPLACE
;
45
_filter =
FILTER_LINEAR
;
46
_hasLut =
false
;
47
_16bitLut =
false
;
48
_channels = 0;
49
}
50
OverlayCacheInfo(
const
SoView2DShaderOverlayInfo
& info);
51
52
bool
equals(
const
OverlayCacheInfo&
other
)
const
;
53
54
std::string _name;
55
View2DBlendMode
_blendMode;
56
View2DTextureFilter
_filter;
57
bool
_hasLut;
58
bool
_16bitLut;
59
int
_channels;
60
};
61
62
std::vector<size_t> _nodeIds;
63
bool
_valid;
64
std::vector<OverlayCacheInfo> _overlays;
65
};
View2DTextureFilter
View2DTextureFilter
Filter mode.
Definition
SoView2DDefinitions.h:88
FILTER_LINEAR
@ FILTER_LINEAR
Bilinear filtering (after classification/LUT)
Definition
SoView2DDefinitions.h:89
View2DBlendMode
View2DBlendMode
Blend mode.
Definition
SoView2DDefinitions.h:51
BLEND_REPLACE
@ BLEND_REPLACE
Definition
SoView2DDefinitions.h:55
SoView2DShaderDefinition.h
SoView2DSystem.h
View2DSlice.h
View2DTexture.h
SoView2DShaderOverlayInfo
Stores information for each overlay to render.
Definition
SoView2DShaderElement.h:31
SoView2DShaderState
Stores the state that defines the shader of the shader pipeline, used to detect if a regeneration of ...
Definition
SoView2DShaderState.h:29
SoView2DShaderState::setupFromState
void setupFromState(const std::vector< SoView2DShaderOverlayInfo * > &overlays, const std::vector< size_t > &nodeIds)
SoView2DShaderState::isEqual
bool isEqual(const SoView2DShaderState &other)
SoView2DShaderState::SoView2DShaderState
SoView2DShaderState()
View2DTexture
A class to render images as OpenGL Textures.
Definition
View2DTexture.h:47
mlrange_cast
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Definition
mlRangeCasts.h:332
MeVisLab
Standard
Sources
Inventor
SoView2D
shaderpipeline
SoView2DShaderState.h
Generated by
1.10.0