MeVisLab Toolbox Reference
SoView2DCSOEditor.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 "SoView2DCSOEditorBase.h"
19 
20 #include <SoView2DExtension.h>
21 
24 
25 
26 class SoCSOTransform;
27 
29 
31 {
32  CrossingPoint(){x=y=-1;}
33  double x,y;
34 };
35 
37 
38 const int KEY_CODE_SPACE = 32;
39 const int KEY_CODE_ENTER = 65293;
40 const int KEY_CODE_DELETE = 65535;
41 const int KEY_CODE_BCKSPC = 65288;
42 
44 
47 {
54 };
55 
57 
60 {
61 public:
62 
66  static void initClass();
67 
76 
77 
79  // INTERACTION
81 
84  {
85  INTERACTION_MODE_EDIT = 0,
86  INTERACTION_MODE_MOVE = 1
87  };
88 
91  {
92  TOGGLE_MODE_NONE = 0,
93  TOGGLE_MODE_ALT = 1,
94  TOGGLE_MODE_CONTROL = 2,
95  TOGGLE_MODE_SHIFT = 3
96  };
97 
99 
102  {
103  EDIT_OP_KEY_MOD_NONE = 0,
104  EDIT_OP_KEY_MOD_ALT = 1,
105  EDIT_OP_KEY_MOD_CONTROL = 2,
106  EDIT_OP_KEY_MOD_SHIFT = 3
107  };
108 
111  {
112  EDIT_OP_KEY_A, EDIT_OP_KEY_B, EDIT_OP_KEY_C, EDIT_OP_KEY_D, EDIT_OP_KEY_E, EDIT_OP_KEY_F,
113  EDIT_OP_KEY_G, EDIT_OP_KEY_H, EDIT_OP_KEY_I, EDIT_OP_KEY_J, EDIT_OP_KEY_K, EDIT_OP_KEY_L,
114  EDIT_OP_KEY_M, EDIT_OP_KEY_N, EDIT_OP_KEY_O, EDIT_OP_KEY_P, EDIT_OP_KEY_Q, EDIT_OP_KEY_R,
115  EDIT_OP_KEY_S, EDIT_OP_KEY_T, EDIT_OP_KEY_U, EDIT_OP_KEY_V, EDIT_OP_KEY_W, EDIT_OP_KEY_X,
116  EDIT_OP_KEY_Y, EDIT_OP_KEY_Z,
117 
121  EDIT_OP_KEY_BCKSPC
122  };
123 
129  SoSFBool movingOn;
155  SoSFFloat moveRatio;
156 
157 
159  // DISPLAY
161 
163  SoSFBool useAntiAliasing;
175  SoSFBool showBoundingBox;
177  SoSFFloat boundingBoxAlpha;
179  SoSFColor boundingBoxColor;
186  SoSFBool shouldLevelCSO;
188  SoSFEnum ghostMode;
190  SoSFEnum ghostUnitMode;
192  SoSFBool ghostStyleAlpha;
200  SoSFFloat ghostDepth;
202  SoSFFloat ghostFadeOutAlpha;
204  SoSFBool useTessellation;
206  SoSFBool showSeedPoints;
207 
210 
218  SoSFColor tessellationColor;
220  SoSFFloat tessellationAlpha;
224  SoSFFloat globalAlphaFactor;
234 
249 
264 
266 
268  {
269  WR_ODD = GLU_TESS_WINDING_ODD,
270  WR_NONZERO = GLU_TESS_WINDING_NONZERO,
271  WR_POSITIVE = GLU_TESS_WINDING_POSITIVE,
272  WR_NEGATIVE = GLU_TESS_WINDING_NEGATIVE,
273  WR_ABS_GEQ_TWO = GLU_TESS_WINDING_ABS_GEQ_TWO
274  };
275 
292 
295 
297  SoSFBool useStylePalette;
300 
303  {
304  LABEL_SHOW_NONE = 0,
305  LABEL_SHOW_CSO_LABEL = 1,
306  LABEL_SHOW_CSO_DESCRIPTION = 2,
307  LABEL_SHOW_CSO_ID = 3,
308  LABEL_SHOW_CSO_INDEX = 4,
309  LABEL_SHOW_GROUP_LABEL = 5,
310  LABEL_SHOW_GROUP_DESCRIPTION = 6,
311  LABEL_SHOW_GROUP_ID = 7,
312  LABEL_SHOW_GROUP_INDEX = 8,
313  LABEL_SHOW_CSO_LENGTH = 9,
314  LABEL_SHOW_CSO_AREA = 10
315  };
316 
318  SoSFEnum labelShowMode;
319 
323 
326  {
327  LABEL_ALIGN_TOP_LEFT = 0,
328  LABEL_ALIGN_TOP_RIGHT = 1,
329  LABEL_ALIGN_BOTTOM_LEFT = 2,
330  LABEL_ALIGN_BOTTOM_RIGHT = 3,
331  LABEL_ALIGN_TOP = 4,
332  LABEL_ALIGN_BOTTOM = 5,
333  LABEL_ALIGN_LEFT = 6,
334  LABEL_ALIGN_RIGHT = 7,
335  LABEL_ALIGN_CENTER = 8
336  };
337 
340  {
341  LABEL_UNIT_SCALE_MM = 0,
342  LABEL_UNIT_SCALE_CM = 1,
343  LABEL_UNIT_SCALE_M = 2
344  };
345 
347  SoSFEnum labelUnitScale;
349  SoSFBool showLabelUnits;
353  SoSFFloat labelFontSize;
357  SoSFFloat labelMarginX;
359  SoSFFloat labelMarginY;
361  SoSFColor generalLabelColor;
363  SoSFFloat generalLabelAlpha;
365  SoSFEnum labelColorMode;
367  SoSFBool useIconFile;
369  SoSFString iconFile;
371  SoSFString internalIconFile;
372 
374  // Edit Operations
376 
380  SoSFEnum copyKeyModifier;
384  SoSFEnum undoKeyModifier;
386  SoSFEnum redoKeyModifier;
396  SoSFEnum cutCopyKey;
398  SoSFEnum copyKey;
400  SoSFEnum pasteKey;
402  SoSFEnum undoKey;
404  SoSFEnum redoKey;
408  SoSFEnum deleteCSOKey;
409 
411  SoSFTrigger triggerCutCopy;
413  SoSFTrigger triggerCopy;
415  SoSFTrigger triggerPaste;
416 
419 
425 
428 
430 
431 
432 protected:
433 
435  ~SoView2DCSOEditor() override;
437  void draw(View2DSliceList* slicelist, View2DSlice* /* slice */, int z) override;
438 
440  bool evalEvent(SoView2D* view2d, View2DSliceList* slicelist,
441  View2DEvent* ec, View2DEventPhase phase) override;
442 
443 private:
444 
445  /* DATA STRUCTURES*/
446 
447  struct CSOCrossings
448  {
449  CSOCrossings() {cso=nullptr;sorted=false;needsFilling=false;}
450  std::vector < CrossingPoint > crossingPoints;
451  ml::CSO* cso;
452  bool sorted;
453  bool needsFilling;
454  };
455  std::vector<CSOCrossings> crossings;
456 
457  struct GroupBoundingBox
458  {
459  GroupBoundingBox() { group = nullptr; firstCSOInGroup = nullptr; }
460  ml::CSOGroup* group;
461  ml::CSO* firstCSOInGroup;
462  ml::CSOBoundingBox boundingBox;
463  };
464  std::vector<GroupBoundingBox> groupBoundingBoxes;
465 
466 
467  /* MEMBER VARIABLES */
468 
470  View2DSliceList* _interactionSliceList;
473  bool _isInNotificationCB;
475  bool _isNotifyingMyselfRepaint;
477  ml::CSOList* _csoList;
479  ml::CSOProcessorData* _csoProcessorData;
481  ml::CSOProcessorData* _lastValidProcessorData;
483  ml::CSO* _recentlySelectedCSO;
485  ml::CSOSeedPoint* _recentlySelectedSeedPoint;
487  ml::CSOPathPoints* _recentlySelectedPathPoints;
489  ml::CSO* _currentlyUnderMouseCursorCSO;
491  std::vector<ml::CSO*>_copiedCSOs;
493  ml::Vector3 _startingHitPoint;
495  ml::Vector3 _lastCurrentHitPoint;
497  int _startingTimePoint;
499  bool _isCurrentlyMovingCSOs;
501  bool _hasMovedCSOs;
503  float* _imageSlice;
505  int _imageSliceExtX;
507  int _imageSliceExtY;
509  int _imageSlicePosZ;
511  SbVec3f _startWorldPositionCutCopy;
513  SbVec3f _currentWorldPosition;
516  SbVec3f _offsetVectorWorld;
518  bool _hasValidStylePalette;
520  ml::CSOBoundingBox _slabBB;
522  SoCSOTransform* _pCSOTransform;
524  ml::CSOProcessorData* _defaultProcessorData;
526  bool _isMultiSelectionEnabled;
527 
529  unsigned int _imageSerialNumber;
530 
532  std::map <int, std::vector<int> > _csoGroupIds;
533 
534  /* METHODS */
535 
536  void inCSOListChanged(SoField*);
537  void inProcessorChanged(SoField*);
538  void inStylePaletteChanged(SoField*);
539  void keyChanged(SoField*);
540  void triggerCutCopyChanged(SoField*);
541  void triggerCopyChanged(SoField*);
542  void triggerPasteChanged(SoField*);
543 
544  void notifyCSOList();
545 
546  bool getShouldOnlyInteractWithSelectedCSO() const override { return shouldOnlyInteractWithSelectedCSO.getValue() == 1; }
547  float getSelectionTolerance() const override { return selectionTolerance.getValue(); }
548  bool getShowOnlyParallelCSOs() const override { return showOnlyParallelCSOs.getValue() == 1; }
549  bool getShowCSOsOnAllTimePoints() const override { return showCSOsOnAllTimePoints.getValue() == 1; }
550  bool getOverwriteCurrentTimePoint() const override { return overwriteCurrentTimePoint.getValue() == 1; }
551  int getNewCurrentTimePoint() const override { return newCurrentTimePoint.getValue(); }
552 
553  float getShowParallelThickness() const override { return showParallelThickness.getValue(); }
554  bool getUseStylePalette() const override { return useStylePalette.getValue() == 1; }
555  float getGlobalAlphaFactor() const override { return globalAlphaFactor.getValue(); }
556  int getStylePaletteUseIndexAs() const override { return stylePaletteUseIndexAs.getValue(); }
557  bool getUseIconFile() const override { return useIconFile.getValue() == 1; }
558  SbString getIconFile() const override { return iconFile.getValue(); }
559  SbString getInternalIconFile() const override { return internalIconFile.getValue(); }
560  bool getHighlightSelectedGroups() const override { return highlightSelectedGroups.getValue() == 1; }
561 
562  bool getOverwriteSelectionVisualizationSettings() const override { return overwriteSelectionVisualizationSettings.getValue() == 1; }
563  int getSelectionColoringMode() const override { return selectionColoringMode.getValue(); }
564  float getSelectionBrightenColor() const override { return selectionBrightenColor.getValue(); }
565  SbColor getSelectionFixedColor() const override { return selectionFixedColor.getValue(); }
566  int getSelectionLineWidthMode() const override { return selectionLineWidthMode.getValue(); }
567  float getSelectionWidenLineWidth() const override { return selectionWidenLineWidth.getValue(); }
568  float getSelectionFixedLineWidth() const override { return selectionFixedLineWidth.getValue(); }
569  int getSelectedSeedPointSizeMode() const override { return selectedSeedPointSizeMode.getValue(); }
570  float getSelectedSeedPointBrightenColor() const override { return selectedSeedPointBrightenColor.getValue(); }
571  float getSelectedSeedPointAlpha() const override { return selectedSeedPointAlpha.getValue(); }
572  int getSelectedSeedPointColoringMode() const override { return selectedSeedPointColoringMode.getValue(); }
573  SbColor getSelectedSeedPointFixedColor() const override { return selectedSeedPointFixedColor.getValue(); }
574  float getSelectedSeedPointEnlargeSize() const override { return selectedSeedPointEnlargeSize.getValue(); }
575  float getSelectedSeedPointSize() const override { return selectedSeedPointSize.getValue(); }
576 
577  bool getEnableMouseOverHighlighting() const override { return enableMouseOverHighlighting.getValue() == 1; }
578  int getMouseOverColorMode() const override { return mouseOverColorMode.getValue(); }
579  SbColor getMouseOverColorColor() const override { return mouseOverColorColor.getValue(); }
580  float getMouseOverColorBrightenValue() const override { return mouseOverColorBrightenValue.getValue(); }
581  int getMouseOverLineWidthMode() const override { return mouseOverLineWidthMode.getValue(); }
582  float getMouseOverLineWidthLineWidth() const override { return mouseOverLineWidthLineWidth.getValue(); }
583  float getMouseOverLineWidthWidenValue() const override { return mouseOverLineWidthWidenValue.getValue(); }
584  bool getUsePathPointColorForSeedPoints() const override {return usePathPointColorForSeedPoints.getValue() == 1; }
585  bool getShowSeedPoints() const override { return showSeedPoints.getValue() == 1; }
586 
588  int getLabelColorMode() const override { return labelColorMode.getValue(); }
589  SbColor getGeneralLabelColor() const override { return generalLabelColor.getValue(); }
590  float getGeneralLabelAlpha() const override { return generalLabelAlpha.getValue(); }
592 
593 
596  bool _evaluateKeyboardOperation(View2DEvent* ec, bool& deleteSeedPressed);
598  void _performCutCopySelected();
600  void _performCopySelected();
602  void _performPasteSelected(View2DSliceList* slicelist);
604  bool _evaluateForceStartNewCSO(View2DEvent* ec);
606  void _storeCopiedCSOGroupInformation();
608  void _resetInteractionClasses();
611  void _checkUniqueEditingOperationKeys();
613  static void _csoListNotificationCB(void* userData, int notificationFlag);
615  void doAction(SoAction *action) override;
616 
618  void _setMouseCursor(SoView2D* view2D, int mouseCursorShape);
619 
621  ml::Vector3 _getPathPointColor(const ml::CSO* cso) const;
622 
624  bool _intersectionSegmentPlane(const ml::Vector3& segmentPoint1, const ml::Vector3& segmentPoint2,
625  const ml::Vector3& planePoint, const ml::Vector3& planeNormal,
626  SbVec3f& intersectionPoint);
627 
629  void _tessellateAllCSOsOnSlice(View2DSliceList* slicelist, View2DSlice* slice, int z);
630 
632  void _glPathPointSettings(const ml::CSO* cso);
634  void _glTessellationColor(const ml::CSO* cso);
635 
637  void _drawLabel(View2DSliceList* slicelist, View2DSlice* slice, int z);
639  void _renderLabelText( const std::string &labelText, ml::CSOBoundingBox& bb, View2DSlice* slice, const float vz, CSOVisualParameters &visualParameters );
640 
642  void _computeDeviceCoordinatesForLabel(const std::string &labelText, View2DFont* font, float lblFontSize, ml::CSOBoundingBox &csoVoxelBB, View2DSlice* slice, const float vz, float& devX, float& devY);
643 
645  void _drawBoundBox(ml::CSO* cso, View2DSliceList* slicelist);
647  void _drawCSOsFromSide(View2DSliceList* slicelist, View2DSlice* slice, int z);
649  void _glDrawRect(float startX, float startY, float endX, float endY, float lineWidth);
650 
651  SO_NODE_HEADER(SoView2DCSOEditor);
652 };
653 
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
const int KEY_CODE_DELETE
Key code for: Delete.
INTERACTIVE_MODE
Enumeration for the interactive mode, depending on existing CSOs.
@ INTERACTIVE_MODE_MOVE_CSO
With the next click (and drag), a CSO can be moved.
@ INTERACTIVE_MODE_INSERT_SEED
With the next click a new seed point can be inserted into a CSO.
@ INTERACTIVE_MODE_CLOSE_CSO
With the next click (or release), a CSO is closed.
@ INTERACTIVE_MODE_START_CSO
With the next click, a new CSO can be started.
@ INTERACTIVE_MODE_SELECT_CSO
With the next click, a CSO is selected.
@ INTERACTIVE_MODE_EDIT_CSO
With the next click, a seed point of a CSO can be edited.
const int KEY_CODE_BCKSPC
Key code for: Backspace.
const int KEY_CODE_ENTER
Key code for: Enter.
const int KEY_CODE_SPACE
Key code for: Space.
View2DEventPhase
event phase for simple extensions that grab the focus, do something (motion) and are released afterwa...
Abstract Open Inventor base class for uniform shader parameter nodes.
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside...
Definition: SoSFMLBase.h:45
virtual int getSelectionLineWidthMode() const =0
virtual bool getShowSeedPoints() const =0
virtual SbColor getSelectedSeedPointFixedColor() const =0
virtual float getSelectedSeedPointSize() const =0
virtual float getMouseOverLineWidthWidenValue() const =0
virtual float getMouseOverLineWidthLineWidth() const =0
virtual float getSelectedSeedPointBrightenColor() const =0
virtual float getSelectionTolerance() const =0
virtual bool getEnableMouseOverHighlighting() const =0
virtual SbColor getGeneralLabelColor() const =0
virtual int getSelectedSeedPointColoringMode() const =0
virtual int getStylePaletteUseIndexAs() const =0
virtual int getLabelColorMode() const =0
virtual float getGlobalAlphaFactor() const =0
virtual bool getUsePathPointColorForSeedPoints() const =0
virtual bool getShowCSOsOnAllTimePoints() const =0
virtual SbColor getMouseOverColorColor() const =0
virtual bool getUseStylePalette() const =0
virtual bool getHighlightSelectedGroups() const =0
virtual SbColor getSelectionFixedColor() const =0
virtual float getSelectionBrightenColor() const =0
virtual float getSelectedSeedPointAlpha() const =0
virtual float getSelectedSeedPointEnlargeSize() const =0
virtual bool getShouldOnlyInteractWithSelectedCSO() const =0
pure virtual access methods to fields every editor needs to implement
virtual bool getUseIconFile() const =0
virtual int getMouseOverLineWidthMode() const =0
virtual float getShowParallelThickness() const =0
virtual int getSelectedSeedPointSizeMode() const =0
virtual SbString getInternalIconFile() const =0
virtual float getSelectionFixedLineWidth() const =0
virtual float getMouseOverColorBrightenValue() const =0
virtual bool getOverwriteCurrentTimePoint() const =0
virtual int getSelectionColoringMode() const =0
virtual bool getShowOnlyParallelCSOs() const =0
virtual bool getOverwriteSelectionVisualizationSettings() const =0
virtual SbString getIconFile() const =0
virtual float getGeneralLabelAlpha() const =0
virtual int getNewCurrentTimePoint() const =0
virtual float getSelectionWidenLineWidth() const =0
virtual int getMouseOverColorMode() const =0
Provides 2D drawing and interaction for the contour segmentation objects.
SoSFEnum deleteCSOKey
Field for adjusting the key for the delete CSO operation.
SoSFFloat moveRatio
Sets the ratio of the selected CSO that need to be in the image for them to be able to be moved.
LABEL_ALIGNMENT_MODES
Enumeration of the label alignment.
bool evalEvent(SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
Event handling.
SoSFString keyConfigurationStatus
Field displays the status of the key/key modifier configuration.
SoSFEnum redoKey
Field for adjusting the key for the redo operation.
~SoView2DCSOEditor() override
Standard destructor.
SoSFFloat ghostDepth
Defines the ghost depth.
SoSFBool combineLabelsForGroupsOnSlice
Shall only one label per group for all CSOs of that group on a slice be shown?
SoSFColor tessellationColor
Color for tessellation (if not as CSO).
SoSFBool shouldLevelCSO
Should the last generated / edited CSO be automatically leveled?
SoSFBool overwriteCurrentTimePoint
Should the current time point be overwritten?
SoSFFloat selectedSeedPointBrightenColor
Sets the brighten value for the color of the selected seed point.
SoSFBool highlightSelectedGroups
Should the module highlight all CSOs that are in selected Groups?
SoSFEnum labelAlignmentMode
Field for adjusting the label alignment mode.
SoSFFloat labelFontSize
Field for adjusting the font size.
SoSFFloat mouseOverColorBrightenValue
Sets the mouse-over highlighting brighten amount.
SoSFFloat selectionBrightenColor
Sets the brighten value for the selection color.
SoSFBool usePathPointColorForSeedPoints
Shall the seed points have the same color as the path points?
SoSFBool useHoleCorrection
Shall inner CSOs lead to holes in the rendering?
SoSFFloat ghostFadeOutAlpha
Defines the ghost fade out alpha (default is 0). If it is greater than 0, CSOs are drawn completely.
SoSFEnum forceStartNewCSOKeyModifier
(Modifier): If this key is pressed, a new contour is started, even if the first hit point is in the v...
SoSFBool shouldTouchItselfInEvalEvent
Should the module touch itself in the evalEvent method?
SoSFFloat mouseOverLineWidthWidenValue
Sets the mouse-over highlighting line widen amount.
SoSFFloat selectionFixedLineWidth
Sets the line width for the selection line width.
SoSFString internalIconFile
The internal icon file name. This field is filled by some MDL function (expand path).
static void initClass()
Initialization of inventor stuff.
SoSFTrigger triggerPaste
Trigger for the Paste operation.
SoSFEnum selectionColoringMode
Adjusts the selection coloring mode (brighten / fixed color).
SoSFEnum redoKeyModifier
Field for adjusting the keyboard modifier for the redo operation.
LABEL_UNITS_SCALES
Enumeration of unit scales.
SoSFFloat labelMarginX
Field for adjusting the x-margin of the label alignment.
SoSFEnum tessellationWindingRule
Sets the winding rule for tessellation.
SoSFEnum deleteSeedPointKey
Field for adjusting the key for the delete seed point operation.
SoSFString iconFile
The external icon file name. This field is used to hold a initial value with a path variable; the rea...
SoSFEnum fillingFromSideLineWidthMode
Defines the mode for setting the line width of side fillings.
SoSFBool shouldListenToSelectionChangedEvents
Should the module touch itself on selection change events?
SoSFEnum deleteSeedPointKeyModifier
Field for adjusting the keyboard modifier for the delete seed point operation.
SoSFEnum generalInteractionModeToggleKey
The modifier key that can toggle the general interaction mode.
SoSFMLBase inCSOList
Base input node: the CSOList.
SoSFBool ghostStyleAlpha
Defines the ghost style alpha.
SoSFColor boundingBoxColor
The color of the bounding boxes.
EDITING_OPERATION_KEYS
Enumeration of the keys for editing operations.
SoSFBool showCSOsOnAllTimePoints
Should the CSOs be shown on all time points of an image?
SoSFFloat mouseOverLineWidthLineWidth
Sets the mouse-over highlighting line fixed width.
SoSFEnum mouseOverLineWidthMode
Sets the mouse-over highlighting line width mode (widen or fixed).
SoSFEnum mouseOverColorMode
Sets the mouse-over highlighting color mode (brighten or fixed).
SoSFColor selectionFixedColor
Sets the color for the selection color (deprecatedName: selectionFallbackColor).
SoSFEnum nextInteractionStatus
Field for displaying the status of the (next) interaction.
SoSFBool useStylePalette
Should a style palette be used for adjusting display options if one is attached?
SoSFEnum cutCopyKeyModifier
Field for adjusting the keyboard modifier for the cut&copy operation.
SoSFTrigger triggerCutCopy
Trigger for the Cut&Copy operation.
SoSFBool showLabelUnits
Shall the units be shown? (for length and area).
SoSFBool shouldLimitCSOMovement
Should the moving of CSOs be limited at the border of an image?
SoSFBool ghostStyleStipple
Defines the ghost style stipple.
SoSFFloat generalLabelAlpha
Field for adjusting the label alpha.
SoSFBool shouldUpdateInteractionStateAndCSOId
Should the next interaction and the current CSO id under the cursor be updated on each interaction?
SoSFEnum undoKeyModifier
Field for adjusting the keyboard modifier for the undo operation.
SoSFColor generalLabelColor
Field for adjusting the label color.
SoSFEnum copyKeyModifier
Field for adjusting the keyboard modifier for the copy operation.
SoSFEnum forceStartNewCSOKey
If this key is pressed, a new contour is started, even if the first hit point is in the vicinity of a...
SoSFBool useTessellation
Shall the CSOs be tessellated?
SoSFFloat labelMarginY
Field for adjusting the y-margin of the label alignment.
SoSFBool shouldOnlyInteractWithSelectedCSO
SoSFMLBase inStylePalette
Input of a style palette.
EDITING_OPERATION_KEYBOARD_MODIFIERS
Enumeration of the keyboard modifiers for editing operations.
SoSFBool useAntiAliasing
Should the CSO be rendered with anti aliasing?
SoSFBool showBoundingBox
Should the bounding box of a CSO be displayed?
SoSFTrigger triggerCopy
Trigger for the Copy operation.
SoSFBool useHoleCorrectionForGroupsOnly
Shall the hole correction only be applied to CSOs of one group?
SoSFBool shouldNotifyItself
Should the module be able to notify itself?
SoSFEnum tessellationColorMode
Color mode for the tessellation.
SoSFEnum copyKey
Field for adjusting the key for the copy operation.
SoSFBool enableMultiSelection
Field for enabling/disabling multi selection.
SoSFEnum undoKey
Field for adjusting the key for the undo operation.
SoSFColor selectedSeedPointFixedColor
Sets the color for the selected seed point.
SoSFInt32 currentlyUnderMouseCursorCSOId
Provides id of the CSO currently under mouse.
SoSFBool ghostStyleLineWidth
Defines the ghost style line width.
SoSFFloat selectedSeedPointAlpha
Sets the alpha for the selected seed point.
SoSFBool shouldListenToFinishedEvents
Should the module touch itself on finished events?
SoSFEnum selectedSeedPointColoringMode
Adjusts the coloring mode for the selected seed point (brighten / fixed color).
SoSFBool ghostStyleBrighten
Defines the ghost style line brighten.
SoSFBool useIconFile
Shall the icon file be used?
SoSFFloat showParallelThickness
Defines the thickness of a point cloud in which all points should be in the test of being parallel to...
SoSFFloat boundingBoxAlpha
The alpha value of the bounding box.
INTERACTION_MODES
Enumeration of the interaction modes.
SoSFBool setPastedCSOsSelected
If checked, all pasted CSOs will be set as selected (and the previous selection will be cleared).
LABEL_SHOW_MODES
Enumeration of the label show modes.
SoSFEnum ghostUnitMode
Defines the ghost unit mode. (ghostDepth in mm or slices.)
SoSFEnum multiSelectionKeyModifier
Field for adjusting the keyboard modifier for multi-selections.
void draw(View2DSliceList *slicelist, View2DSlice *, int z) override
Drawing on slices.
SoSFFloat selectedSeedPointSize
Sets the size for the selected seed point.
SoSFFloat selectionWidenLineWidth
Sets the widen value for the selection line width (deprecatedName: selectionFallbackWidth).
SoSFMLBase inProcessor
Base input node: a processor modules that evaluates interaction events and interpolates the contours ...
SoSFBool useInterpolationTargetColor
Shall the target interpolation color be used?
SoSFEnum pasteKey
Field for adjusting the key for the paste operation.
SoSFFloat fillingFromSideManualLineWidthX
Sets the x-width of the virtual voxel in mm.
SoSFEnum selectionLineWidthMode
Adjusts the selection line width mode (widen / fixed width).
SoSFEnum stylePaletteUseIndexAs
Defines the use of style palette indices (CSO / Group).
SoSFInt32 newCurrentTimePoint
Sets the new current time point.
SoSFBool combinePastedCSOsToGroupsOfOriginalCSOs
If checked, all pasted CSOs will be associated to all CSOGroups of the original CSOs.
SoSFBool shouldListenToRepaintEvents
Should the module touch itself on repaint events?
SoSFBool showSeedPoints
Shall seed points be drawn?
SoView2DCSOEditor()
Standard constructor.
SoSFEnum deleteCSOKeyModifier
Field for adjusting the keyboard modifier for the delete CSO operation.
SoSFFloat selectedSeedPointEnlargeSize
Sets the enlarge value for the size of the selected seed point.
SoSFEnum labelUnitScale
Field for adjusting the label's unit scale (for length and area).
SoSFEnum ghostMode
Defines the ghost mode. (Seeing the contour on a slice being further away.)
SoSFEnum generalInteractionMode
The general interaction mode: edit or move.
SoSFBool showOnlyParallelCSOs
Shows only CSOs that are parallel to the current viewing plane if checked.
SoSFFloat globalAlphaFactor
A factor multiplied to the alpha values of each path point and each seed point.
SoSFFloat fillingFromSideManualLineWidthY
Sets the y-width of the virtual voxel in mm.
SoSFEnum selectedSeedPointSizeMode
Adjusts the selected seed point size mode (enlarge / fixed size).
SoSFFloat tessellationAlpha
Alpha value for tessellation (multiplies with the CSO's alpha no matter what tessellation color mode)...
SoSFBool overwriteSelectionVisualizationSettings
Shall the visualization settings be used instead of the CSOManagers settings?
SoSFEnum cutCopyKey
Field for adjusting the key for the cut&copy operation.
SoSFColor mouseOverColorColor
Sets the mouse-over highlighting fixed color.
SoSFBool useFillingFromSide
Shall the CSOs' filling be shown from the side?
SoSFEnum labelShowMode
Field for setting the label show mode.
SoSFBool movingOn
If checked, moving in general is allowed.
SoSFColor interpolationTargetColor
The target color for positionValue interpolation.
TOGGLE_MODE_KEYS
Enumeration of the keyboard modifiers to use for toggling seed point / whole CSO interaction.
SoSFBool selectGroupsParsProToto
If checked, the module selects all Groups the just selected CSO is in as well.
SoSFEnum labelColorMode
Field for adjusting the label color mode (as CSO / general).
SoSFBool labelUseTextShadow
Field for toggling text shadow on/off for labels.
SoSFEnum pasteKeyModifier
Field for adjusting the keyboard modifier for the paste operation.
SoSFBool enableMouseOverHighlighting
Activates the mouse-over highlighting.
SoView2DExtension Base class for all View2DExtensions used for drawing and event handling on the View...
void doAction(SoAction *action) override
SoView2D is a 2D viewer for image data.
Definition: SoView2D.h:62
View2DEvent stores all information on an event on a SoView2D.
Abstract GL font drawing using FTGL.
Definition: View2DFont.h:30
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
The CSOBoundingBox defines an axis parallel bounding box with double precision.
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
Definition: CSOGroup.h:38
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 CSOProcesorData provides the network data interchange object for processing interaction events an...
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
Structure to hold visual parameters for the old editor.
Definition: SoCSODefines.h:200