MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
CSOLabelRenderer.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, 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 <mlModuleIncludes.h>
20
21#include "SoCSOLabelRenderer.h"
22
26 // FixedVoxelPosition
27};
28
29
35
37
40{
41public:
43
44
45protected:
47
49 void activateAttachments() override;
50
51private:
52 // generates the label string and name with Python
53 void generateLabelString(CSO* cso, std::string& labelString, std::string& labelName, std::string& labelCaption,
54 int& deviceOffsetX, int& deviceOffsetY);
55
56 BaseField* _inVisualizationSettingsFld;
57 BaseField* _inLabelPlacementFld;
58
59 StringField* _extensionIdFld;
60 BoolField* _allowModificationFld;
61 BoolField* _shouldRenderFld;
62
63 BoolField* _shouldOnlyRenderLabelForOnSliceCSOsFld;
64
65 BoolField* _shouldRenderLabelNameFld;
66
67 BoolField* _shouldDrawConnectingLineFld;
68 BoolField* _shouldHighlightBorderOnMouseOverFld;
69 FloatField* _connectingLineAlphaFld;
70 BoolField* _drawConnectingLineToCenterOfCSOFld;
71 IntField* _minConnectingLineLengthFld;
72
73 BoolField* _shouldDrawLabelBorderForSelectedCSOFld;
74
75 IntField* _labelBorderMarginXFld;
76 IntField* _labelBorderMarginYFld;
77
78 IntField* _fontSizeFld;
79
80 EnumField* _movePossibleCursorFld;
81 EnumField* _movePerformCursorFld;
82
83 EnumField* _scaleNCursorFld;
84 EnumField* _scaleNWCursorFld;
85 EnumField* _scaleWCursorFld;
86 EnumField* _scaleSWCursorFld;
87 EnumField* _scaleSCursorFld;
88 EnumField* _scaleSECursorFld;
89 EnumField* _scaleECursorFld;
90 EnumField* _scaleNECursorFld;
91
92 BoolField* _allowLabelResizeFld;
93 BoolField* _shouldDrawResizeHandlersFld;
94
95 SoNodeField* _outSceneFld;
96 BaseField* _outCSOListFld;
97 IntField* _currentCSOIdFld;
98
99 StringField* _labelNameFld;
100 StringField* _labelCaptionFld;
101 StringField* _labelStringFld;
102 StringField* _labelCodeFld;
103
104 IntField* _deviceOffsetXFld;
105 IntField* _deviceOffsetYFld;
106
107 StringField* _userDataFields[8];
108
109 NotifyField* _redrawAllLabelsFld;
110
111 NotifyField* _needsNewLabelStringFld;
112
113 BoolField* _tryToPlaceLabelsWithoutOverlapFld;
114
115 TypedEnumField<DetachedLabelPlacement>* _detachedLabelPlacementFld;
116 TypedEnumField<ViewerBorderHandling>* _viewerBorderHandlingFld;
117
118 IntField* _csoIdOfLabelUnderMouseCursorFld;
119
120
121 IntField* _inputInfoCSOIdFld;
122 StringField* _inputInfoViewerIdFld;
123
124 Vector2Field* _outputInfoLabelBoundingBoxStartFld;
125 Vector2Field* _outputInfoLabelBoundingBoxEndFld;
126 StringField* _outputInfoLabelCaptionFld;
127 StringField* _outputInfoLabelStringFld;
128 IntField* _outputInfoLabelCaptionWidthFld;
129 BoolField* _outputInfoIsValidFld;
130
131 NotifyField* _updateOutputLabelInfos;
132
133 BoolField* _shouldShowLabelStringOfOutputInfoLabelFld;
134
135 void computeOutputInformation();
136
137 void setLabelBorderMargins();
138
139 void setCursorFields();
140 EnumField* addCursorShapeEnumField(const std::string& name);
141
142 void setCSOIdOfLabelUnderMouseCursor(int csoId);
143
144 SoRef<SoCSOLabelRenderer> _soCSOLabelRenderer;
145
146 friend class ::SoCSOLabelRenderer;
147
149};
150
DetachedLabelPlacement
Module encapsulation the SoView2D extension for rendering labels for CSOs.
@ RelativeToCSO
@ RelativeToViewer
ViewerBorderHandling
@ MoveOverViewerBorder
@ ClampToViewerBorder
@ DoNotRenderOutsideViewer
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition SoCSOSystem.h:21
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Field to encapsulate a boolean value.
Definition mlFields.h:56
Module encapsulation the SoView2D extension for rendering labels for CSOs.
~CSOLabelRenderer() override
void handleNotification(Field *field) override
Called when any field data in the field container of this module is modified.
void activateAttachments() override
Reactivates notification handling, i.e., all fields of this module will send notifications again to a...
The CSO represents a contour segmentation object.
Definition CSO.h:44
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate a float value.
Definition mlFields.h:449
Field to encapsulate an integer value.
Definition mlFields.h:123
Base class for an image processing module of the ML.
Definition mlModule.h:150
Field without value for notifications.
Definition mlFields.h:687
Field to encapsulate a pointer to an SoNode instance of OpenInventor.
Definition mlFields.h:986
Field to encapsulate a string value.
Definition mlFields.h:634
TypedEnumField is used to encapsulate a C++ enum value and work with a real enum value instead of int...
Definition mlFields.h:398
Field to encapsulate a vector of two double values.
Definition mlFields.h:1091
#define ML_MODULE_CLASS_HEADER(className)
Similar to ML_CLASS_HEADER for the usage of derived classes from Module.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.