VTK  9.5.20250910
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
62#include "vtkSmartPointer.h" // Needed for SP ivars
63#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
64
66
67VTK_ABI_NAMESPACE_BEGIN
69
71{
72public:
74
79 void PrintSelf(ostream& os, vtkIndent indent) override;
81
83
89 vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
90 vtkGetMacro(TargetReduction, double);
92
94
101 vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
102 vtkGetMacro(MaximumError, double);
104
106
112 vtkSetMacro(OutputPointsPrecision, int);
113 vtkGetMacro(OutputPointsPrecision, int);
115
117
122 vtkSetMacro(DecimationStrategy, vtkDecimatePolylineStrategy*);
123 vtkGetObjectMacro(DecimationStrategy, vtkDecimatePolylineStrategy);
125
126 /*
127 * Inherits from vtkObject GetMTime() but also checks for the DecimationStrategy
128 * member MTime.
129 * @return The last time the state of the DecimatePolylineFilter got modified.
130 */
132
133protected:
136
138 int RequestUpdateExtent(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector,
139 vtkInformationVector* outputVector) override;
140
141 class Polyline;
142 double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
143
145 double TargetReduction = 0.90;
146 double MaximumError = VTK_DOUBLE_MAX;
147 int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
148
149private:
151 void operator=(const vtkDecimatePolylineFilter&) = delete;
152
155};
156
157VTK_ABI_NAMESPACE_END
158#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()
Standard methods for type information and printing.
vtkMTimeType GetMTime() override
Return this object's modified time.
vtkNew< vtkPriorityQueue > PriorityQueue
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
double ComputeError(vtkPolyData *input, Polyline *polyline, vtkIdType id)
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:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_DOUBLE_MAX
Definition vtkType.h:171
#define VTK_MARSHALAUTO