VTK  9.4.20251007
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
37
38#ifndef vtkDecimatePolylineFilter_h
39#define vtkDecimatePolylineFilter_h
40
41#include "vtkDecimatePolylineDistanceStrategy.h" // Default decimation strategy
42#include "vtkFiltersCoreModule.h" // For export macro
44#include "vtkSmartPointer.h" // Needed for SP ivars
45
46VTK_ABI_NAMESPACE_BEGIN
48
49class VTKFILTERSCORE_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm
50{
51public:
53
58 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
68 vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
69 vtkGetMacro(TargetReduction, double);
71
73
80 vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
81 vtkGetMacro(MaximumError, double);
83
85
91 vtkSetMacro(OutputPointsPrecision, int);
92 vtkGetMacro(OutputPointsPrecision, int);
94
96
101 vtkSetMacro(DecimationStrategy, vtkDecimatePolylineStrategy*);
102 vtkGetObjectMacro(DecimationStrategy, vtkDecimatePolylineStrategy);
104
105 /*
106 * Inherits from vtkObject GetMTime() but also checks for the DecimationStrategy
107 * member MTime.
108 * @return The last time the state of the DecimatePolylineFilter got modified.
109 */
111
112protected:
114 ~vtkDecimatePolylineFilter() override = default;
115
117 int RequestUpdateExtent(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector,
118 vtkInformationVector* outputVector) override;
119
120 class Polyline;
121 double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
122
124 double TargetReduction = 0.90;
127
128private:
130 void operator=(const vtkDecimatePolylineFilter&) = delete;
131
134};
135
136VTK_ABI_NAMESPACE_END
137#endif
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkDecimatePolylineFilter * New()
Standard methods for type information and printing.
vtkMTimeType GetMTime() override
Return this object's modified time.
vtkNew< vtkPriorityQueue > PriorityQueue
int RequestUpdateExtent(vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
~vtkDecimatePolylineFilter() override=default
double ComputeError(vtkPolyData *input, Polyline *polyline, vtkIdType id)
vtkDecimatePolylineFilter()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
abstract class to define a decimation strategy for the vtkDecimatePolylineFilter
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:58
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
a list of ids arranged in priority order
Hold a reference to a vtkObjectBase instance.
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_DOUBLE_MAX
Definition vtkType.h:154