MeVisLab Toolbox Reference
SoView2DExtensionSampler.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 #pragma once
14 
15 #include "SoView2DExtension.h"
16 
18 
19 #include <Inventor/fields/SoSFBool.h>
20 #include <Inventor/fields/SoSFTrigger.h>
21 
23 
24 
26 {
27  SO_NODE_HEADER(SoView2DExtensionSampler);
28 
29 public:
31 
32  SoSFString overlayName;
33 
35  SoSFTypedEnum<View2DTextureFilter> filterMode;
36 
38  SoSFTypedEnum<View2DBlendMode> blendMode;
39 
41 
43  static void initClass();
44 
47 
49  void draw(View2DSliceList *dsl, View2DSlice* dslice, int slice) override;
50 
52  bool evaluateEvent(SoView2D *view2d, View2DEvent* ec) override;
53 
55  void startDrawing(View2DSliceList* slicelist) override;
56 
58  void endDrawing(View2DSliceList* slicelist) override;
59 
60 protected:
62 
64  void doAction(SoAction *action) override;
65 
66 private:
68  SoNodeList _extensions;
69 
71  SoView2DShaderOverlayInfo _overlayInfo;
72 
73  ml::GLFrameBuffer _fbo;
74  View2DTexture _texture;
75 };
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
void startDrawing(View2DSliceList *slicelist) override
reimplemented from SoView2DExtension
bool evaluateEvent(SoView2D *view2d, View2DEvent *ec) override
reimplemented from SoView2DExtension
SoSFTypedEnum< View2DTextureFilter > filterMode
filter mode for rendering
SoView2DExtensionSampler()
Constructor.
~SoView2DExtensionSampler() override
void draw(View2DSliceList *dsl, View2DSlice *dslice, int slice) override
reimplemented from SoView2DExtension
void doAction(SoAction *action) override
reimplemented from SoView2DExtension
SoSFTypedEnum< View2DBlendMode > blendMode
select the blend mode of the overlay
void endDrawing(View2DSliceList *slicelist) override
reimplemented from SoView2DExtension
static void initClass()
inventor runtime type system
SoView2DExtension Base class for all View2DExtensions used for drawing and event handling on the View...
Stores information for each overlay to render.
SoView2D is a 2D viewer for image data.
Definition: SoView2D.h:62
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Definition: View2DSlice.h:48
A class to render images as OpenGL Textures.
Definition: View2DTexture.h:47