MeVisLab Toolbox Reference
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
24{
27 // FixedVoxelPosition
28};
29
30
37
38ML_START_NAMESPACE
39
42{
43public:
44
46
47
48protected:
49
51
52 void handleNotification(Field* field) override;
53 void activateAttachments() override;
54
55private:
56
57 // generates the label string and name with Python
58 void generateLabelString(CSO* cso, std::string& labelString, std::string& labelName, std::string& labelCaption,
59 int& deviceOffsetX, int& deviceOffsetY);
60
61 BaseField* _inVisualizationSettingsFld;
62 BaseField* _inLabelPlacementFld;
63
64 StringField* _extensionIdFld;
65 BoolField* _allowModificationFld;
66 BoolField* _shouldRenderFld;
67
68 BoolField* _shouldRenderLabelNameFld;
69
70 BoolField* _shouldDrawConnectingLineFld;
71 BoolField* _shouldHighlightBorderOnMouseOverFld;
72 FloatField* _connectingLineAlphaFld;
73 BoolField* _drawConnectingLineToCenterOfCSOFld;
74 IntField* _minConnectingLineLengthFld;
75
76 BoolField* _shouldDrawLabelBorderForSelectedCSOFld;
77
78 IntField* _labelBorderMarginXFld;
79 IntField* _labelBorderMarginYFld;
80
81 IntField* _fontSizeFld;
82
83 EnumField* _movePossibleCursorFld;
84 EnumField* _movePerformCursorFld;
85
86 EnumField* _scaleNCursorFld;
87 EnumField* _scaleNWCursorFld;
88 EnumField* _scaleWCursorFld;
89 EnumField* _scaleSWCursorFld;
90 EnumField* _scaleSCursorFld;
91 EnumField* _scaleSECursorFld;
92 EnumField* _scaleECursorFld;
93 EnumField* _scaleNECursorFld;
94
95 BoolField* _allowLabelResizeFld;
96 BoolField* _shouldDrawResizeHandlersFld;
97
98 SoNodeField* _outSceneFld;
99 BaseField* _outCSOListFld;
100 IntField* _currentCSOIdFld;
101
102 StringField* _labelNameFld;
103 StringField* _labelCaptionFld;
104 StringField* _labelStringFld;
105 StringField* _labelCodeFld;
106
107 IntField* _deviceOffsetXFld;
108 IntField* _deviceOffsetYFld;
109
110 StringField* _userDataFields[8];
111
112 NotifyField* _redrawAllLabelsFld;
113
114 NotifyField* _needsNewLabelStringFld;
115
116 BoolField* _tryToPlaceLabelsWithoutOverlapFld;
117
118 TypedEnumField<DetachedLabelPlacement>* _detachedLabelPlacementFld;
119 TypedEnumField<ViewerBorderHandling>* _viewerBorderHandlingFld;
120
121 IntField* _csoIdOfLabelUnderMouseCursorFld;
122
123
124 IntField* _inputInfoCSOIdFld;
125 StringField* _inputInfoViewerIdFld;
126
127 Vector2Field* _outputInfoLabelBoundingBoxStartFld;
128 Vector2Field* _outputInfoLabelBoundingBoxEndFld;
129 StringField* _outputInfoLabelCaptionFld;
130 StringField* _outputInfoLabelStringFld;
131 IntField* _outputInfoLabelCaptionWidthFld;
132 BoolField* _outputInfoIsValidFld;
133
134 NotifyField* _updateOutputLabelInfos;
135
136 BoolField* _shouldShowLabelStringOfOutputInfoLabelFld;
137
138 void computeOutputInformation();
139
140 void setLabelBorderMargins();
141
142 void setCursorFields();
143 EnumField* addCursorShapeEnumField(const std::string& name);
144
145 void setCSOIdOfLabelUnderMouseCursor(int csoId);
146
147 SoRef<SoCSOLabelRenderer> _soCSOLabelRenderer;
148
149 friend class ::SoCSOLabelRenderer;
150
152};
153
154ML_END_NAMESPACE
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
~CSOLabelRenderer() override
void handleNotification(Field *field) override
void activateAttachments() override
Definition CSO.h:44
Module(int numInputImages, int numOutputImages)
#define ML_MODULE_CLASS_HEADER(className)