Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerSegmentEditorPaintEffect.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Csaba Pinter, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __qSlicerSegmentEditorPaintEffect_h
22#define __qSlicerSegmentEditorPaintEffect_h
23
24// Segmentations Editor Effects includes
25#include "qSlicerSegmentationsEditorEffectsExport.h"
26
28
29class qSlicerSegmentEditorPaintEffectPrivate;
30class vtkPolyData;
31
32class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorPaintEffect :
34{
35 Q_OBJECT
36
37public:
38 Q_PROPERTY(double minimumPaintPointDistance READ minimumPaintPointDistance WRITE setMinimumPaintPointDistance)
39 Q_PROPERTY(bool delayedPaint READ delayedPaint WRITE setDelayedPaint)
40
42 qSlicerSegmentEditorPaintEffect(QObject* parent = nullptr);
44
45public:
47 QIcon icon() override;
48
50 const QString helpText()const override;
51
54
56 void deactivate() override;
57
62 bool processInteractionEvents(vtkRenderWindowInteractor* callerInteractor, unsigned long eid, qMRMLWidget* viewWidget) override;
63
68 void processViewNodeEvents(vtkMRMLAbstractViewNode* callerViewNode, unsigned long eid, qMRMLWidget* viewWidget) override;
69
71 void setupOptionsFrame() override;
72
74 void setMRMLDefaults() override;
75
77 void referenceGeometryChanged() override;
78
84 Q_INVOKABLE double minimumPaintPointDistance();
85
87 Q_INVOKABLE bool delayedPaint();
88
89 // returns extent of the brushes
90 Q_INVOKABLE QList<int> paintBrushesIntoLabelmap(vtkOrientedImageData* labelmap, qMRMLWidget* viewWidget);
91
92 Q_INVOKABLE void clearBrushes();
93
96 Q_INVOKABLE QFrame* paintOptionsFrame();
97
98 Q_INVOKABLE void setColorSmudgeCheckboxVisible(bool show);
99
101 Q_INVOKABLE virtual void paintApply(qMRMLWidget* viewWidget);
102
103public slots:
105 void updateGUIFromMRML() override;
106
108 void updateMRMLFromGUI() override;
109
111 void setMinimumPaintPointDistance(double dist);
112
114 void setDelayedPaint(bool delayed);
115
116protected:
119 bool m_AlwaysErase;
120
122 bool m_Erase;
123
124protected:
125 QScopedPointer<qSlicerSegmentEditorPaintEffectPrivate> d_ptr;
126
127private:
128 Q_DECLARE_PRIVATE(qSlicerSegmentEditorPaintEffect);
129 Q_DISABLE_COPY(qSlicerSegmentEditorPaintEffect);
130};
131
132#endif
Base class for any widget that requires a MRML Scene.
Definition qMRMLWidget.h:36
Abstract class for segment editor effects.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Image data containing orientation information.