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"
17#include <vector>
18#include <Inventor/SbBasic.h>
19#include "View2DSlice.h"
20#include "View2DTexture.h"
21
22class SoState;
23class View2DTexture;
25
29{
30public:
32
33 void setupFromState(const std::vector<SoView2DShaderOverlayInfo*>& overlays, const std::vector<size_t>& nodeIds);
34
36
37private:
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
Filter mode.
@ FILTER_LINEAR
Bilinear filtering (after classification/LUT)
View2DBlendMode
Blend mode.
@ BLEND_REPLACE
Stores information for each overlay to render.
Stores the state that defines the shader of the shader pipeline, used to detect if a regeneration of ...
void setupFromState(const std::vector< SoView2DShaderOverlayInfo * > &overlays, const std::vector< size_t > &nodeIds)
bool isEqual(const SoView2DShaderState &other)
A class to render images as OpenGL Textures.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.