Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
29 class qSlicerSegmentEditorAbstractLabelEffectPrivate;
30 
31 class vtkMatrix4x4;
33 class vtkPolyData;
34 class vtkMRMLVolumeNode;
36 
41 class Q_SLICER_SEGMENTATIONS_EFFECTS_EXPORT qSlicerSegmentEditorAbstractLabelEffect :
43 {
44 public:
45  Q_OBJECT
46 
47 public:
49  qSlicerSegmentEditorAbstractLabelEffect(QObject* parent = nullptr);
51 
52 public:
56 
58  void setupOptionsFrame() override;
59 
61  void setMRMLDefaults() override;
62 
64  void referenceGeometryChanged() override;
65 
67  void sourceVolumeNodeChanged() override;
68 
69 public slots:
71  void updateGUIFromMRML() override;
72 
74  void updateMRMLFromGUI() override;
75 
76 // Utility functions
77 public:
78 
80  Q_INVOKABLE static void appendPolyMask(vtkOrientedImageData* input, vtkPolyData* polyData, qMRMLSliceWidget* sliceWidget, vtkMRMLSegmentationNode* segmentationNode=nullptr);
81 
83  Q_INVOKABLE static void createMaskImageFromPolyData(vtkPolyData* polyData, vtkOrientedImageData* outputMask, qMRMLSliceWidget* sliceWidget);
84 
86  Q_INVOKABLE static void appendImage(vtkOrientedImageData* inputImage, vtkOrientedImageData* appendedImage);
87 
90  Q_INVOKABLE static void imageToWorldMatrix(vtkMRMLVolumeNode* node, vtkMatrix4x4* ijkToRas);
91 
94  Q_INVOKABLE static void imageToWorldMatrix(vtkOrientedImageData* image, vtkMRMLSegmentationNode* node, vtkMatrix4x4* ijkToRas);
95 
96 protected:
97  QScopedPointer<qSlicerSegmentEditorAbstractLabelEffectPrivate> d_ptr;
98 
99 private:
100  Q_DECLARE_PRIVATE(qSlicerSegmentEditorAbstractLabelEffect);
102 };
103 
104 #endif
Abstract class for segment editor effects.
Image data containing orientation information.
MRML node for representing a volume (image stack).
QScopedPointer< qSlicerSegmentEditorAbstractLabelEffectPrivate > d_ptr
virtual qSlicerSegmentEditorAbstractEffect * clone()=0
Clone editor effect. Override to return a new instance of the effect sub-class.
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...