Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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:
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
112
114 void setDelayedPaint(bool delayed);
115
116protected:
120
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
qSlicerSegmentEditorAbstractEffect(QObject *parent=nullptr)
qSlicerSegmentEditorAbstractLabelEffect(QObject *parent=nullptr)
void setDelayedPaint(bool delayed)
void deactivate() override
Perform actions to deactivate the effect (such as destroy actors, etc.)
bool m_Erase
Flag determining whether to paint or erase.
const QString helpText() const override
Get help text for effect to be displayed in the help box.
Q_INVOKABLE void clearBrushes()
bool processInteractionEvents(vtkRenderWindowInteractor *callerInteractor, unsigned long eid, qMRMLWidget *viewWidget) override
void updateGUIFromMRML() override
Update user interface from parameter set node.
Q_INVOKABLE QList< int > paintBrushesIntoLabelmap(vtkOrientedImageData *labelmap, qMRMLWidget *viewWidget)
void setupOptionsFrame() override
Create options frame widgets, make connections, and add them to the main options frame using.
virtual Q_INVOKABLE void paintApply(qMRMLWidget *viewWidget)
Paint labelmap.
void updateMRMLFromGUI() override
Update parameter set node from user interface.
Q_INVOKABLE void setColorSmudgeCheckboxVisible(bool show)
void processViewNodeEvents(vtkMRMLAbstractViewNode *callerViewNode, unsigned long eid, qMRMLWidget *viewWidget) override
Q_INVOKABLE QFrame * paintOptionsFrame()
QIcon icon() override
Get icon for effect to be displayed in segment editor.
qSlicerSegmentEditorAbstractEffect * clone() override
Clone editor effect.
void setMRMLDefaults() override
Set default parameters in the parameter MRML node.
QScopedPointer< qSlicerSegmentEditorPaintEffectPrivate > d_ptr
qSlicerSegmentEditorAbstractLabelEffect Superclass
void setMinimumPaintPointDistance(double dist)
qSlicerSegmentEditorPaintEffect(QObject *parent=nullptr)
void referenceGeometryChanged() override
Perform actions needed on reference geometry change.
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Image data containing orientation information.