Slicer 5.7
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkSlicerSegmentationGeometryLogic.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 CANARIE and the Applied Cancer Research Unit program
17 of Cancer Care Ontario with funds provided by the Ontario Ministry of Health and
18 Long-Term Care
19
20==============================================================================*/
21
22// .NAME vtkSlicerSegmentationGeometryLogic
23// .SECTION Description
24// This class manages the logic associated with converting and handling
25// segmentation node objects.
26
27#ifndef __vtkSlicerSegmentationGeometryLogic_h
28#define __vtkSlicerSegmentationGeometryLogic_h
29
30// Slicer includes
31#include "vtkSlicerSegmentationsModuleLogicExport.h"
32
33// Segmentations includes
35
36// vtkSegmentationCore includes
38
39class VTK_SLICER_SEGMENTATIONS_LOGIC_EXPORT vtkSlicerSegmentationGeometryLogic : public vtkObject
40{
41public:
43 vtkTypeMacro(vtkSlicerSegmentationGeometryLogic, vtkObject);
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
49
52
55
59
66
72
74 vtkGetObjectMacro(OutputGeometryImageData, vtkOrientedImageData);
75
78
80
81 vtkGetObjectMacro(InputSegmentationNode, vtkMRMLSegmentationNode);
82 vtkSetObjectMacro(InputSegmentationNode, vtkMRMLSegmentationNode);
84
86 vtkGetObjectMacro(SourceGeometryNode, vtkMRMLDisplayableNode);
88
90
93 vtkGetMacro(IsotropicSpacing, bool);
94 vtkSetMacro(IsotropicSpacing, bool);
95 vtkBooleanMacro(IsotropicSpacing, bool);
97
99
102 vtkGetMacro(OversamplingFactor, double);
103 vtkSetMacro(OversamplingFactor, double);
105
107
109 vtkGetVectorMacro(UserSpacing, double, 3);
110 vtkSetVectorMacro(UserSpacing, double, 3);
112
114 vtkGetVectorMacro(InputAxisIndexForSourceAxis, int, 3);
115
117 vtkGetVectorMacro(SourceAxisIndexForInputAxis, int, 3);
118
120
122 vtkGetMacro(PadOutputGeometry, bool);
123 vtkSetMacro(PadOutputGeometry, bool);
124 vtkBooleanMacro(PadOutputGeometry, bool);
126
127protected:
130
131protected:
132
137
142 std::string CalculateOutputGeometryFromBounds(bool keepCurrentAxisDirections);
143
145
146 vtkMRMLSegmentationNode* InputSegmentationNode{ nullptr };
147 vtkMRMLDisplayableNode* SourceGeometryNode{ nullptr };
148 bool IsotropicSpacing{ false };
149 double OversamplingFactor{ 1.0 };
150 bool PadOutputGeometry{ true };
151 double UserSpacing[3]{ 1.0, 1.0, 1.0 };
152 vtkOrientedImageData* OutputGeometryImageData{ nullptr };
153 int InputAxisIndexForSourceAxis[3]{ 0, 1, 2 };
154 int SourceAxisIndexForInputAxis[3]{ 0, 1, 2 };
155
156private:
158 void operator=(const vtkSlicerSegmentationGeometryLogic&) = delete;
159};
160
161#endif
MRML node containing segmentations.
Image data containing orientation information.
bool IsSourceSegmentationWithBinaryLabelmapMaster()
Determine if source node is a non-empty segmentation with a labelmap master.
bool InputSegmentationCanBeResampled()
Determine if input segmentation is non-empty, and with binary labelmap master.
std::string CalculateOutputGeometryFromBounds(bool keepCurrentAxisDirections)
virtual void SetSourceGeometryNode(vtkMRMLDisplayableNode *node)
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerSegmentationGeometryLogic * New()
std::string CalculateOutputGeometryFromImage()
void ResetGeometryImageData()
Reset geometry image data.