VTK  9.4.20241117
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
57#ifndef vtkDecimatePolylineFilter_h
58#define vtkDecimatePolylineFilter_h
59
60#include "vtkDecimatePolylineDistanceStrategy.h" // Default decimation strategy
61#include "vtkFiltersCoreModule.h" // For export macro
63#include "vtkSmartPointer.h" // Needed for SP ivars
64
65VTK_ABI_NAMESPACE_BEGIN
67
68class VTKFILTERSCORE_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm
69{
70public:
72
77 void PrintSelf(ostream& os, vtkIndent indent) override;
79
81
87 vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
88 vtkGetMacro(TargetReduction, double);
90
92
99 vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
100 vtkGetMacro(MaximumError, double);
102
104
110 vtkSetMacro(OutputPointsPrecision, int);
111 vtkGetMacro(OutputPointsPrecision, int);
113
115
120 vtkSetMacro(DecimationStrategy, vtkDecimatePolylineStrategy*);
121 vtkGetObjectMacro(DecimationStrategy, vtkDecimatePolylineStrategy);
123
124 /*
125 * Inherits from vtkObject GetMTime() but also checks for the DecimationStrategy
126 * member MTime.
127 * @return The last time the state of the DecimatePolylineFilter got modified.
128 */
130
131protected:
133 ~vtkDecimatePolylineFilter() override = default;
134
136 int RequestUpdateExtent(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector,
137 vtkInformationVector* outputVector) override;
138
139 class Polyline;
140 double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
141
143 double TargetReduction = 0.90;
144 double MaximumError = VTK_DOUBLE_MAX;
145 int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
146
147private:
149 void operator=(const vtkDecimatePolylineFilter&) = delete;
150
153};
154
155VTK_ABI_NAMESPACE_END
156#endif
reduce the number of lines in a polyline
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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:167
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
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