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
qSlicerSegmentEditorAbstractLabelEffect.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 __qSlicerSegmentEditorAbstractLabelEffect_h
22#define __qSlicerSegmentEditorAbstractLabelEffect_h
23
24// Segmentations Editor Effects includes
25#include "qSlicerSegmentationsEditorEffectsExport.h"
26
28
29class qSlicerSegmentEditorAbstractLabelEffectPrivate;
30
31class vtkMatrix4x4;
33class vtkPolyData;
36
40class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorAbstractLabelEffect :
42{
43public:
44 Q_OBJECT
45
46public:
48 qSlicerSegmentEditorAbstractLabelEffect(QObject* parent = nullptr);
50
51public:
55
57 void setupOptionsFrame() override;
58
60 void setMRMLDefaults() override;
61
63 void referenceGeometryChanged() override;
64
66 void sourceVolumeNodeChanged() override;
67
68public slots:
70 void updateGUIFromMRML() override;
71
73 void updateMRMLFromGUI() override;
74
75// Utility functions
76public:
77
79 Q_INVOKABLE static void appendPolyMask(vtkOrientedImageData* input, vtkPolyData* polyData, qMRMLSliceWidget* sliceWidget, vtkMRMLSegmentationNode* segmentationNode=nullptr);
80
82 Q_INVOKABLE static void createMaskImageFromPolyData(vtkPolyData* polyData, vtkOrientedImageData* outputMask, qMRMLSliceWidget* sliceWidget);
83
85 Q_INVOKABLE static void appendImage(vtkOrientedImageData* inputImage, vtkOrientedImageData* appendedImage);
86
89 Q_INVOKABLE static void imageToWorldMatrix(vtkMRMLVolumeNode* node, vtkMatrix4x4* ijkToRas);
90
93 Q_INVOKABLE static void imageToWorldMatrix(vtkOrientedImageData* image, vtkMRMLSegmentationNode* node, vtkMatrix4x4* ijkToRas);
94
95protected:
96 QScopedPointer<qSlicerSegmentEditorAbstractLabelEffectPrivate> d_ptr;
97
98private:
101};
102
103#endif
qSlicerSegmentEditorAbstractEffect(QObject *parent=nullptr)
static Q_INVOKABLE void imageToWorldMatrix(vtkOrientedImageData *image, vtkMRMLSegmentationNode *node, vtkMatrix4x4 *ijkToRas)
void setMRMLDefaults() override
Set default parameters in the parameter MRML node.
void sourceVolumeNodeChanged() override
Perform actions needed on source volume change.
QScopedPointer< qSlicerSegmentEditorAbstractLabelEffectPrivate > d_ptr
static Q_INVOKABLE void appendPolyMask(vtkOrientedImageData *input, vtkPolyData *polyData, qMRMLSliceWidget *sliceWidget, vtkMRMLSegmentationNode *segmentationNode=nullptr)
Rasterize a poly data onto the input image into the slice view.
qSlicerSegmentEditorAbstractEffect * clone() override=0
static Q_INVOKABLE void appendImage(vtkOrientedImageData *inputImage, vtkOrientedImageData *appendedImage)
Append image onto image. Resamples appended image and saves result in input image.
void setupOptionsFrame() override
Create options frame widgets, make connections, and add them to the main options frame using.
qSlicerSegmentEditorAbstractLabelEffect(QObject *parent=nullptr)
void updateMRMLFromGUI() override
Update parameter set node from user interface.
void referenceGeometryChanged() override
Perform actions needed on reference geometry change.
static Q_INVOKABLE void createMaskImageFromPolyData(vtkPolyData *polyData, vtkOrientedImageData *outputMask, qMRMLSliceWidget *sliceWidget)
Create a slice view screen space (2D) mask image for the given polydata.
void updateGUIFromMRML() override
Update user interface from parameter set node.
static Q_INVOKABLE void imageToWorldMatrix(vtkMRMLVolumeNode *node, vtkMatrix4x4 *ijkToRas)
MRML node containing segmentations.
MRML node for representing a volume (image stack).
Image data containing orientation information.