VTK  9.3.20240416
vtkDecimatePolylineFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
54 #ifndef vtkDecimatePolylineFilter_h
55 #define vtkDecimatePolylineFilter_h
56 
57 #include "vtkFiltersCoreModule.h" // For export macro
58 #include "vtkSmartPointer.h" // Needed for SP ivars
59 
60 #include "vtkPolyDataAlgorithm.h"
61 
62 VTK_ABI_NAMESPACE_BEGIN
63 class vtkPriorityQueue;
64 
65 class VTKFILTERSCORE_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm
66 {
67 public:
69 
73  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
80 
82 
87  vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
88  vtkGetMacro(TargetReduction, double);
90 
92 
98  vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
99  vtkGetMacro(MaximumError, double);
101 
103 
108  vtkSetMacro(OutputPointsPrecision, int);
109  vtkGetMacro(OutputPointsPrecision, int);
111 
112 protected:
115 
117 
118  class Polyline;
119  double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
120 
123  double MaximumError;
125 
126 private:
128  void operator=(const vtkDecimatePolylineFilter&) = delete;
129 };
130 
131 VTK_ABI_NAMESPACE_END
132 #endif
reduce the number of lines in a polyline
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkDecimatePolylineFilter() override
static vtkDecimatePolylineFilter * New()
Instantiate this object with a target reduction of 0.90.
double ComputeError(vtkPolyData *input, Polyline *polyline, vtkIdType id)
vtkSmartPointer< vtkPriorityQueue > PriorityQueue
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:181
a list of ids arranged in priority order
int vtkIdType
Definition: vtkType.h:315
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154