MeVisLab Toolbox Reference
SoCSODefines.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 <CSOBase/CSODefines.h>
21 #include <SoView2D.h>
22 
24 
25 ML_START_NAMESPACE
26 class StylePalette;
27 class CSOProcessorData;
28 ML_END_NAMESPACE
29 
30 class SoCSOTransform;
31 
33 
35 {
36  SoView2D* view2D = nullptr;
38  View2DEvent* ec = nullptr;
40 };
41 
43 
45 {
46  ml::CSOList* csoList = nullptr;
48  int hitMode = 0;
53  int timepointindex = -1;
54  bool deleteSeedPoint = false;
56 };
57 
59 
63 
66 {
68  View2DSlice* slice = nullptr;
69  int z = -1;
71  int voxelAugmentZ = 0;
72  std::string seriesInstanceUID;
73  std::string frameOfReferenceUID;
74  int timePointIndex = 0;
75  std::vector<SoCSOTransform*> csoTransforms;
76  ml::CoordinateSystemReference coordinateSystemReference;
77 
79 
80  std::string getViewerId() const
81  {
82  if (slicelist && slicelist->getOwner())
83  {
84  return slicelist->getOwner()->viewerId.getValue().getString();
85  }
86  return std::string("");
87  }
89  {
90  SbVec3f tempPosition(static_cast<float>(position[0]), static_cast<float>(position[1]),
91  static_cast<float>(position[2]));
92  SbVec3f result;
93  for (auto csoTransform : csoTransforms) {
94  csoTransform->transformPoint(tempPosition, result);
95  tempPosition = result;
96  }
97  return ml::Vector3(tempPosition[0], tempPosition[1], tempPosition[2]);
98  };
99 };
100 
102 
104 {
110 };
111 
113 
115 {
116  std::vector<ml::Vector3> positions;
117 };
118 
120 
123 {
124  double minZ = 0.0;
125  double maxZ = 0.0;
126 };
127 
129 
131 {
133  {
136  }
137 
140 };
141 
143 
145 {
147  ml::CSOList* csoList = nullptr;
148  ml::CSO* cso = nullptr;
149  std::vector<int> csoIds;
150  ml::AbstractTransformationPtr transformation = nullptr;
152 };
153 
155 
158 {
162 
165 
166  SbVec2f upperLeft;
167  SbVec2f labelSize;
168 
169  std::string labelName;
170  std::string labelString;
171  std::string labelCaption;
172 
174 
175  float labelFontColor[4];
177 };
178 
180 
183 {
186  SHOW_MARKER_CIRCLE = 2
187 };
188 
190 
193 {
195  COLOR_GENERAL = 1
196 };
197 
199 
202 {
205 };
206 
208 
211 {
217  unsigned short pathPointStyle;
218 
225 
226  float labelRed;
227  float labelGreen;
228  float labelBlue;
229  float labelAlpha;
230 };
231 
233 
237 {
239  bool isCurrentlyMovingCSO = false;
240  ml::CSOProcessorData* processorData = nullptr;
241 };
242 
244 
247 {
251 };
252 
254 
257 {
260 };
261 
263 
266 {
269 };
270 
272 
275 {
278 };
279 
281 
284 {
287 };
288 
290 
293 {
296 };
297 
299 
302 {
305 };
306 
308 
311 {
315 };
316 
318 
319 const unsigned short PATH_POINTS_PATTERN_NONE = 0x0000;
320 const unsigned short PATH_POINTS_PATTERN_SOLID = 0xFFFF; //<! Line pattern for a solid line.
321 const unsigned short PATH_POINTS_PATTERN_DASHED = 0xF0F0;
322 const unsigned short PATH_POINTS_PATTERN_DOTTED = 0xAAAA;
323 const unsigned short PATH_POINTS_PATTERN_SHORT_DASHED = 0xC7C7; //<! Line pattern for a short dashed line.
324 
326 
327 #define TAG_VIEWER_ID "viewerId"
328 
SEED_POINT_MARKER_MODES
Enumeration of markers for seed points.
Definition: SoCSODefines.h:183
@ SHOW_MARKER_NONE
Shows no marker at the seed point positions.
Definition: SoCSODefines.h:184
@ SHOW_MARKER_CIRCLE
Shows a circle at the seed point positions.
Definition: SoCSODefines.h:186
@ SHOW_MARKER_RECT
Shows a rectangle at the seed point positions.
Definition: SoCSODefines.h:185
COLOR_MODES
Enumeration of marker coloring.
Definition: SoCSODefines.h:193
@ COLOR_AS_CSO
The marker is shown in the same color as the CSO.
Definition: SoCSODefines.h:194
@ COLOR_GENERAL
Use the general marker color for all markers.
Definition: SoCSODefines.h:195
CSOSliceInformation
Definition: SoCSODefines.h:104
@ CSO_SLICE_COMPLETELY_BELOW
The CSO lies completely below the current slice.
Definition: SoCSODefines.h:109
@ CSO_SLICE_UNKNOWN
No information about the CSO and the current slice.
Definition: SoCSODefines.h:105
@ CSO_SLICE_COMPLETELY_ABOVE
The CSO lies completely above the current slice.
Definition: SoCSODefines.h:108
@ CSO_SLICE_CROSSED
The CSO is crossed by the current slice.
Definition: SoCSODefines.h:107
@ CSO_SLICE_COMPLETELY_ON
The CSO lies completely on the current slice.
Definition: SoCSODefines.h:106
SELECTION_COLOR_MODES
Defines the color mode for selected CSOs.
Definition: SoCSODefines.h:257
@ SELECTION_COLOR_MODE_BRIGHTEN
Selection color mode: the selected CSO is brightened.
Definition: SoCSODefines.h:258
@ SELECTION_COLOR_MODE_FIXED
Selection color mode: the selected CSO is set to a fixed color.
Definition: SoCSODefines.h:259
SELECTED_SEED_POINT_COLOR_MODES
Defines the color mode for selected seed points.
Definition: SoCSODefines.h:275
@ SELECTED_SEED_POINT_COLOR_MODE_BRIGHTEN
Selected seed point color mode: the selected seed point is brightened.
Definition: SoCSODefines.h:276
@ SELECTED_SEED_POINT_COLOR_MODE_FIXED
Selected seed point color mode: the selected seed point is set to a fixed color.
Definition: SoCSODefines.h:277
const unsigned short PATH_POINTS_PATTERN_SOLID
Definition: SoCSODefines.h:320
SELECTED_SEED_POINT_SIZE_MODES
Defines the size mode for selected seed points.
Definition: SoCSODefines.h:284
@ SELECTED_SEED_POINT_ENLARGE
Selected seed point size mode: the size of the selected seed point is enlarged.
Definition: SoCSODefines.h:285
@ SELECTED_SEED_POINT_FIXED
Selected seed point size mode: the size of the selected seed point is set to a fixed value.
Definition: SoCSODefines.h:286
const unsigned short PATH_POINTS_PATTERN_SHORT_DASHED
Definition: SoCSODefines.h:323
SELECTION_LINE_WIDTH_MODES
Defines the line width mode for selected CSOs.
Definition: SoCSODefines.h:266
@ SELECTION_LINE_FIXED
Selection line width mode: the line width of the selected CSO is set to a certain value.
Definition: SoCSODefines.h:268
@ SELECTION_LINE_WIDEN
Selection line width mode: the line width of the selected CSO is widened.
Definition: SoCSODefines.h:267
HIGHLIGHT_COLOR_MODES
Defines the highlighting color mode for CSOs under the mouse cursor.
Definition: SoCSODefines.h:293
@ HIGHLIGHT_COLOR_MODE_FIXED
Highlight color mode: the CSO under the mouse cursor is set to a fixed color.
Definition: SoCSODefines.h:295
@ HIGHLIGHT_COLOR_MODE_BRIGHTEN
Highlight color mode: the CSO under the mouse cursor is brightened.
Definition: SoCSODefines.h:294
SIDE_FILLING_LINE_WIDTH_MODES
Enumeration of line width modes for side fillings.
Definition: SoCSODefines.h:311
@ SIDE_FILLING_WIDTH_AS_CSO
Definition: SoCSODefines.h:312
@ SIDE_FILLING_WIDTH_MANUAL
Definition: SoCSODefines.h:314
@ SIDE_FILLING_WIDTH_AUTOMATIC
Definition: SoCSODefines.h:313
const unsigned short PATH_POINTS_PATTERN_NONE
Line pattern for no line at all.
Definition: SoCSODefines.h:319
const unsigned short PATH_POINTS_PATTERN_DASHED
Line pattern for a dashed line.
Definition: SoCSODefines.h:321
STYLE_PALETTE_INDEX_USE
Enumeration of the usage of style palette indices.
Definition: SoCSODefines.h:202
@ USE_INDEX_FOR_GROUP
The style of the according Group index is chosen (overrides CSO style).
Definition: SoCSODefines.h:204
@ USE_INDEX_FOR_CSO
The style of the according CSO index is chosen.
Definition: SoCSODefines.h:203
const unsigned short PATH_POINTS_PATTERN_DOTTED
Line pattern for a dotted line.
Definition: SoCSODefines.h:322
CSOEvalEventView2DInfos CSOProcessView2DInfos
Typedefs for backward compatibility.
Definition: SoCSODefines.h:61
CSOEvalEventCSOInfos CSOProcessCSOInfos
Definition: SoCSODefines.h:62
HIT_POINT_MODE
Enumeration for different hit point modes.
Definition: SoCSODefines.h:247
@ HIT_SEED_POINT
Hit point was near an existing seed point.
Definition: SoCSODefines.h:249
@ HIT_PATH_POINT
Hit point was near a path point.
Definition: SoCSODefines.h:250
@ HIT_NOTHING_HIT
Hit point was nowhere near an existing CSO.
Definition: SoCSODefines.h:248
HIGHLIGHT_LINE_WIDTH_MODES
Defines the highlighting line width mode for CSOs under the mouse cursor.
Definition: SoCSODefines.h:302
@ HIGHLIGHT_LINE_FIXED
Highlight line width mode: the line width of the CSOs under the mouse cursor is set to a certain valu...
Definition: SoCSODefines.h:304
@ HIGHLIGHT_LINE_WIDEN
Highlight line width mode: the line width of the CSOs under the mouse cursor is widened.
Definition: SoCSODefines.h:303
View2DEventPhase
event phase for simple extensions that grab the focus, do something (motion) and are released afterwa...
@ EVENT_ANY
Event phase is undefined and has to be checked by getEvent() method.
Abstract Open Inventor base class for uniform shader parameter nodes.
SoView2D is a 2D viewer for image data.
Definition: SoView2D.h:62
SoSFString viewerId
id string, needs to be unique in a network if used
Definition: SoView2D.h:82
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
SoView2D * getOwner()
Get the owning SoView2D.
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Definition: View2DSlice.h:48
The CSOBoundingBox defines an axis parallel bounding box with double precision.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition: CSOList.h:61
The CSOPathPoints is a list of world coordinates which are interpolated by a certain interpolation sc...
Definition: CSOPathPoints.h:37
The CSOSeedPoint can be interactively set and modified and is the framework for contours.
Definition: CSOSeedPoint.h:35
The CSO represents a contour segmentation object.
Definition: CSO.h:44
Base object class StylePalette for providing a collection of colors, line styles and marker types.
Tvec3< MLdouble > Vector3
A vector with three components of type double.
Definition: mlVector3.h:286
ml::AbstractTransformationPtr transformation
Definition: SoCSODefines.h:150
std::vector< int > csoIds
Definition: SoCSODefines.h:149
ml::CSOList * csoList
Definition: SoCSODefines.h:147
CSODrawSliceInformation sliceInfo
Definition: SoCSODefines.h:151
ml::CSOBoundingBox slabBB
Definition: SoCSODefines.h:146
CSOSliceInformation sliceInformation
Definition: SoCSODefines.h:138
std::string getViewerId() const
Definition: SoCSODefines.h:80
std::string frameOfReferenceUID
Definition: SoCSODefines.h:73
std::vector< SoCSOTransform * > csoTransforms
Definition: SoCSODefines.h:75
size_t worldToVoxelMatrixHashKey
Definition: SoCSODefines.h:70
ml::CoordinateSystemReference coordinateSystemReference
Definition: SoCSODefines.h:76
View2DSliceList * slicelist
Definition: SoCSODefines.h:67
ml::StylePalette * stylePalette
Definition: SoCSODefines.h:78
ml::Vector3 getTransformedPosition(const ml::Vector3 &position) const
Definition: SoCSODefines.h:88
std::string seriesInstanceUID
Definition: SoCSODefines.h:72
View2DSlice * slice
Definition: SoCSODefines.h:68
Structure holding information about the processor/editor state.
Definition: SoCSODefines.h:237
ml::CSO * csoCurrentlyUnderMouse
Definition: SoCSODefines.h:238
ml::CSOProcessorData * processorData
Definition: SoCSODefines.h:240
bool isCurrentlyMovingCSO
Definition: SoCSODefines.h:239
ml::CSO * recentlySelectedCSO
Definition: SoCSODefines.h:49
ml::CSOPathPoints * recentlySelectedPathPoints
Definition: SoCSODefines.h:51
ml::CSOSeedPoint * recentlySelectedSeedPoint
Definition: SoCSODefines.h:50
ml::CSOList * csoList
Definition: SoCSODefines.h:46
ml::Vector3 currentHitPoint
Definition: SoCSODefines.h:47
ml::CSOBoundingBox slabBB
Definition: SoCSODefines.h:52
View2DEventPhase phase
Definition: SoCSODefines.h:39
View2DSliceList * slicelist
Definition: SoCSODefines.h:37
Structure to store render information for a certain CSO and viewer.
Definition: SoCSODefines.h:158
CSODrawView2DInfos view2DInfos
Definition: SoCSODefines.h:160
CSODrawCSOInfos csoInfos
Definition: SoCSODefines.h:159
ml::Vector2 labelBoundingBoxV1
Definition: SoCSODefines.h:163
CSODrawSliceInformation drawSliceInfos
Definition: SoCSODefines.h:161
ml::Vector2 labelBoundingBoxV2
Definition: SoCSODefines.h:164
std::vector< ml::Vector3 > positions
Definition: SoCSODefines.h:116
Structure to hold visual parameters for the old editor.
Definition: SoCSODefines.h:211
unsigned short pathPointStyle
Definition: SoCSODefines.h:217
Defines the z slab of a CSO bounding box in voxel coordinates.
Definition: SoCSODefines.h:123