Slicer 5.4
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
40class VTK_SLICER_SEGMENTATIONS_LOGIC_EXPORT vtkSlicerSegmentationGeometryLogic : public vtkObject
41{
42public:
44 vtkTypeMacro(vtkSlicerSegmentationGeometryLogic, vtkObject);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
50
53
56
60
64
66 vtkGetObjectMacro(OutputGeometryImageData, vtkOrientedImageData);
67
70
72
73 vtkGetObjectMacro(InputSegmentationNode, vtkMRMLSegmentationNode);
74 vtkSetObjectMacro(InputSegmentationNode, vtkMRMLSegmentationNode);
76
78 vtkGetObjectMacro(SourceGeometryNode, vtkMRMLDisplayableNode);
80
82
85 vtkGetMacro(IsotropicSpacing, bool);
86 vtkSetMacro(IsotropicSpacing, bool);
87 vtkBooleanMacro(IsotropicSpacing, bool);
89
91
94 vtkGetMacro(OversamplingFactor, double);
95 vtkSetMacro(OversamplingFactor, double);
97
99
101 vtkGetVectorMacro(UserSpacing, double, 3);
102 vtkSetVectorMacro(UserSpacing, double, 3);
104
106 vtkGetVectorMacro(InputAxisIndexForSourceAxis, int, 3);
107
109 vtkGetVectorMacro(SourceAxisIndexForInputAxis, int, 3);
110
112
114 vtkGetMacro(PadOutputGeometry, bool);
115 vtkSetMacro(PadOutputGeometry, bool);
116 vtkBooleanMacro(PadOutputGeometry, bool);
118
119protected:
122
123protected:
124
129
134 std::string CalculateOutputGeometryFromBounds(bool keepCurrentAxisDirections);
135
137
138 vtkMRMLSegmentationNode* InputSegmentationNode{ nullptr };
139 vtkMRMLDisplayableNode* SourceGeometryNode{ nullptr };
140 bool IsotropicSpacing{ false };
141 double OversamplingFactor{ 1.0 };
142 bool PadOutputGeometry{ true };
143 double UserSpacing[3]{ 1.0, 1.0, 1.0 };
144 vtkOrientedImageData* OutputGeometryImageData{ nullptr };
145 int InputAxisIndexForSourceAxis[3]{ 0, 1, 2 };
146 int SourceAxisIndexForInputAxis[3]{ 0, 1, 2 };
147
148private:
150 void operator=(const vtkSlicerSegmentationGeometryLogic&) = delete;
151};
152
153#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.