Slicer 5.9
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 : public qSlicerSegmentEditorAbstractLabelEffect
33{
34 Q_OBJECT
35
36public:
38 Q_PROPERTY(bool delayedPaint READ delayedPaint WRITE setDelayedPaint)
39
41 qSlicerSegmentEditorPaintEffect(QObject* parent = nullptr);
43
44public:
46 QIcon icon() override;
47
49 const QString helpText() const override;
50
53
55 void deactivate() override;
56
61 bool processInteractionEvents(vtkRenderWindowInteractor* callerInteractor, unsigned long eid, qMRMLWidget* viewWidget) override;
62
67 void processViewNodeEvents(vtkMRMLAbstractViewNode* callerViewNode, unsigned long eid, qMRMLWidget* viewWidget) override;
68
70 void setupOptionsFrame() override;
71
73 void setMRMLDefaults() override;
74
76 void referenceGeometryChanged() override;
77
83 Q_INVOKABLE double minimumPaintPointDistance();
84
86 Q_INVOKABLE bool delayedPaint();
87
88 // returns extent of the brushes
89 Q_INVOKABLE QList<int> paintBrushesIntoLabelmap(vtkOrientedImageData* labelmap, qMRMLWidget* viewWidget);
90
91 Q_INVOKABLE void clearBrushes();
92
95 Q_INVOKABLE QFrame* paintOptionsFrame();
96
97 Q_INVOKABLE void setColorSmudgeCheckboxVisible(bool show);
98
100 Q_INVOKABLE virtual void paintApply(qMRMLWidget* viewWidget);
101
102public slots:
104 void updateGUIFromMRML() override;
105
107 void updateMRMLFromGUI() override;
108
111
113 void setDelayedPaint(bool delayed);
114
115protected:
119
122
123protected:
124 QScopedPointer<qSlicerSegmentEditorPaintEffectPrivate> d_ptr;
125
126private:
127 Q_DECLARE_PRIVATE(qSlicerSegmentEditorPaintEffect);
128 Q_DISABLE_COPY(qSlicerSegmentEditorPaintEffect);
129};
130
131#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.