Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkCalculateOversamplingFactor.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 // .NAME vtkCalculateOversamplingFactor - Calculate oversampling factor based on model properties
22 // .SECTION Description
23 
24 #ifndef __vtkCalculateOversamplingFactor_h
25 #define __vtkCalculateOversamplingFactor_h
26 
27 // VTK includes
28 #include <vtkObject.h>
29 #include <vtkMassProperties.h>
30 #include <vtkPolyData.h>
31 
32 // SegmentationCore includes
33 #include "vtkOrientedImageData.h"
34 
35 #include "vtkSegmentationCoreConfigure.h"
36 
37 class vtkPiecewiseFunction;
38 
41 class vtkSegmentationCore_EXPORT vtkCalculateOversamplingFactor : public vtkObject
42 {
43 public:
44  static vtkCalculateOversamplingFactor *New();
45  vtkTypeMacro(vtkCalculateOversamplingFactor, vtkObject);
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
48 public:
51  bool CalculateOversamplingFactor();
52 
55  static void ApplyOversamplingOnImageGeometry(vtkOrientedImageData* imageData, double oversamplingFactor);
56 
57 protected:
60  bool CalculateRelativeStructureSize();
61 
64  bool CalculateComplexityMeasure();
65 
68  double DetermineOversamplingFactor();
69 
75  void ClipMembershipFunction(vtkPiecewiseFunction* membershipFunction, double clipValue);
76 
77 public:
78  vtkGetObjectMacro(InputPolyData, vtkPolyData);
79  vtkSetObjectMacro(InputPolyData, vtkPolyData);
80 
81  vtkGetObjectMacro(ReferenceGeometryImageData, vtkOrientedImageData);
82  vtkSetObjectMacro(ReferenceGeometryImageData, vtkOrientedImageData);
83 
84  vtkGetMacro(OutputOversamplingFactor, double);
85 
86  vtkGetMacro(OutputRelativeStructureSize, double);
87  vtkGetMacro(OutputComplexityMeasure, double);
88  vtkGetMacro(OutputNormalizedShapeIndex, double);
89 
90  vtkGetMacro(LogSpeedMeasurements, bool);
91  vtkSetMacro(LogSpeedMeasurements, bool);
92  vtkBooleanMacro(LogSpeedMeasurements, bool);
93 
94 protected:
95  vtkGetObjectMacro(MassPropertiesAlgorithm, vtkMassProperties);
96  vtkSetObjectMacro(MassPropertiesAlgorithm, vtkMassProperties);
97 
98 protected:
100  vtkPolyData* InputPolyData;
101 
104 
107 
114 
117 
120  vtkMassProperties* MassPropertiesAlgorithm;
121 
122 protected:
125 
126 private:
128  void operator=(const vtkCalculateOversamplingFactor&); // Not implemented
129  //ETX
130 };
131 
132 #endif
133 
double OutputOversamplingFactor
Calculated oversampling factor for the segmentation node and its reference volume.
double OutputRelativeStructureSize
Calculated relative structure size.
double OutputComplexityMeasure
Calculated complexity measure.
Image data containing orientation information.
double OutputNormalizedShapeIndex
Calculated normalized shape index (NSI), for debugging purposes.
Calculate oversampling factor based on model properties using fuzzy logics.
vtkOrientedImageData * ReferenceGeometryImageData
Image containing the rasterization reference geometry.
vtkPolyData * InputPolyData
Input poly data to rasterize.
bool LogSpeedMeasurements
Flag telling whether the speed measurements are logged on standard output.