13 #ifndef mitkReduceContourSetFilter_h
14 #define mitkReduceContourSetFilter_h
21 #include "vtkCellArray.h"
23 #include "vtkPoints.h"
24 #include "vtkPolyData.h"
25 #include "vtkPolygon.h"
26 #include "vtkSmartPointer.h"
68 itkFactorylessNewMacro(
Self);
70 itkSetMacro(MinSpacing,
double);
71 itkSetMacro(MaxSpacing,
double);
73 itkSetMacro(StepSize,
unsigned int);
74 itkSetMacro(Tolerance,
double);
76 itkGetMacro(NumberOfPointsAfterReduction,
unsigned int);
86 void SetUseProgressBar(
bool);
88 using itk::ProcessObject::SetInput;
90 void SetInput(
unsigned int idx,
const mitk::Surface *surface)
override;
97 void SetProgressStepSize(
unsigned int stepSize);
102 void GenerateData()
override;
103 void GenerateOutputInformation()
override;
106 void ReduceNumberOfPointsByNthPoint(
107 vtkIdType cellSize,
const vtkIdType *cell, vtkPoints *points, vtkPolygon *reducedPolygon, vtkPoints *reducedPoints);
109 void ReduceNumberOfPointsByDouglasPeucker(
110 vtkIdType cellSize,
const vtkIdType *cell, vtkPoints *points, vtkPolygon *reducedPolygon, vtkPoints *reducedPoints);
112 bool CheckForIntersection(
113 const vtkIdType *currentCell,
114 vtkIdType currentCellSize,
115 vtkPoints *currentPoints,
116 unsigned int currentInputIndex);
122 unsigned int m_StepSize;
124 unsigned int m_MaxSegmentLenght;
126 bool m_UseProgressBar;
127 unsigned int m_ProgressStepSize;
129 unsigned int m_NumberOfPointsAfterReduction;