MeVisLab Toolbox Reference
SoCSO3DVis.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
15
16#pragma once
17
18#include "SoCSOIncludes.h"
19#include "SoCSOSystem.h"
20
21#include <SoInteractionNode.h>
22
23
24namespace ml
25{
26 class CSOVisualizationSettings;
27}
28
30
31class SoCSO3DVisPickAction;
32
35{
36 friend class SoCSO3DVisPickAction;
37
38public:
39
43 static void initClass();
44
45
46 /* FIELDS */
47
56
61
84
89
93
96
99
100protected:
101
103 ~SoCSO3DVis() override;
104
105private:
106
107 /* DATA TYPES */
108
109 struct CSOSettings
110 {
111 float cRed;
112 float cGreen;
113 float cBlue;
114 float cAlpha;
115
116 int linePattern;
117 float lineWidth;
118
119 float mRed;
120 float mGreen;
121 float mBlue;
122 float mAlpha;
123
124 int markerMode;
125 float markerSize;
126 };
127
128 /* MEMBER VARIABLES */
129
131 SoSeparator* _separator;
133 ml::CSOList* _csoList;
135 bool _isInNotificationCB;
137 SbTime _lastUpdateTime;
139 bool _useRenderDelayTimer;
141 float _timerDelayMilliSeconds;
142
144 bool _hasValidStylePalette;
145
147 SoCSO3DVisPickAction* _pickAction;
148
149
150 /* METHODS */
151
153 void _generateScene();
156 void _setUpVisualization(ml::CSO* cso, CSOSettings& settings);
159 void _setUpVisualization(ml::CSO* cso, ml::CSOVisualizationSettings* visualizationSettings, CSOSettings& settings);
160
162 void _setClosestCSOSelected(const SbVec3f& selectionPoint);
163
164 void inCSOListChanged(SoField*);
165 void styleChanged(SoField*);
166 void lutChanged(SoField*);
167 void otherVisualizationChanged(SoField*);
168 void timerChanged(SoField*);
169 void enableSelectionChanged(SoField*);
170 void applyChanged(SoField*);
171
173 static void _csoListNotificationCB(void* userData, int notificationFlag);
174
175 SO_NODE_HEADER(SoCSO3DVis);
176};
177
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition SoCSOSystem.h:21
Module for visualizing CSOs in 3D as an Open Inventor scene.
Definition SoCSO3DVis.h:35
SoSFBool enableSelection
Should the selection be enabled?
Definition SoCSO3DVis.h:63
SoSFMLBase inCSOList
The input CSOList.
Definition SoCSO3DVis.h:49
~SoCSO3DVis() override
Standard destructor.
SoSFBool useRenderTimeDelay
If checked, the scene is rendered only after the adjustable time.
Definition SoCSO3DVis.h:75
SoSFFloat timerDelayMilliSeconds
The adjustable timer delay.
Definition SoCSO3DVis.h:77
SoSFBool highlightSelectedGroups
Should the module highlight all CSOs that are in selected Groups?
Definition SoCSO3DVis.h:69
SoSFBool provideVertexProperties
Should texture coordinates and normals be provided in vertex properties?
Definition SoCSO3DVis.h:98
SoSFEnum stylePaletteUseIndexAs
Defines the use of style palette indices (CSO / Group).
Definition SoCSO3DVis.h:88
SoSFBool listenToFinishingNotifications
Shall the module listen to finishing notifications?
Definition SoCSO3DVis.h:81
SoSFEnum cursorShape
Cursor shape for action.
Definition SoCSO3DVis.h:67
SoSFFloat seedPointSizeScaling
This value is multiplied to all marker sizes as a scaling.
Definition SoCSO3DVis.h:73
static void initClass()
Initializes this class (inventor stuff)
SoSFBool performPreHitTest
Perform picking while hovering.
Definition SoCSO3DVis.h:65
SoSFFloat pathPointWidthOffset
This value is added to all line widths as an offset.
Definition SoCSO3DVis.h:71
SoSFBool listenToSelectionChangedNotifications
Shall the module listen to selection changed notifications?
Definition SoCSO3DVis.h:83
SoSFBool useStylePalette
Should a style palette be used for adjusting display options if one is attached?
Definition SoCSO3DVis.h:86
SoSFBool autoApply
Shall all changes of parameters take immediate effect?
Definition SoCSO3DVis.h:58
SoSFBool listenToRepaintNotifications
Shall the module listen to every repaint notification?
Definition SoCSO3DVis.h:79
SoSFMLBase inStylePalette
Input of a style palette.
Definition SoCSO3DVis.h:51
SoSFBool useLUT
Should use 4th component in path points as (absolute) index into LUT supplied by inLUT input.
Definition SoCSO3DVis.h:92
SoCSO3DVis()
Standard constructor.
SoSFMLBase inVisualizationSettings
Input for a CSOVisualizationSettings object.
Definition SoCSO3DVis.h:53
SoSFInt32 timepointToRender
Defines which timepoint to render; -1 renders all XMarkers.
Definition SoCSO3DVis.h:95
SoSFTrigger apply
Applies changes.
Definition SoCSO3DVis.h:60
SoSFMLBase inLUT
LUT for coloring of path points.
Definition SoCSO3DVis.h:55
SoInteractionNode is the base class for normal interaction nodes in OpenInventor, that handle their i...
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside...
Definition SoSFMLBase.h:45
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Main documentation file for ML users and developers.
Definition SoSFMLImage.h:51