VTK  9.7.1
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
38 #ifndef vtkDecimatePolylineFilter_h
39 #define vtkDecimatePolylineFilter_h
40 
41 #include "vtkDecimatePolylineDistanceStrategy.h" // Default decimation strategy
42 #include "vtkFiltersCoreModule.h" // For export macro
43 #include "vtkSmartPointer.h" // Needed for SP ivars
44 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
45 
46 #include "vtkPolyDataAlgorithm.h"
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class vtkPriorityQueue;
50 
52 {
53 public:
55 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
70  vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
71  vtkGetMacro(TargetReduction, double);
73 
75 
82  vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
83  vtkGetMacro(MaximumError, double);
85 
87 
93  vtkSetMacro(OutputPointsPrecision, int);
94  vtkGetMacro(OutputPointsPrecision, int);
96 
98 
103  vtkSetMacro(DecimationStrategy, vtkDecimatePolylineStrategy*);
104  vtkGetObjectMacro(DecimationStrategy, vtkDecimatePolylineStrategy);
106 
107  /*
108  * Inherits from vtkObject GetMTime() but also checks for the DecimationStrategy
109  * member MTime.
110  * @return The last time the state of the DecimatePolylineFilter got modified.
111  */
112  vtkMTimeType GetMTime() override;
113 
114 protected:
116  ~vtkDecimatePolylineFilter() override;
117 
119  int RequestUpdateExtent(vtkInformation* vtkNotUsed(request), vtkInformationVector** inputVector,
120  vtkInformationVector* outputVector) override;
121 
122  class Polyline;
123  double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
124 
126  double TargetReduction = 0.90;
127  double MaximumError = VTK_DOUBLE_MAX;
128  int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
129 
130 private:
132  void operator=(const vtkDecimatePolylineFilter&) = delete;
133 
136 };
137 
138 VTK_ABI_NAMESPACE_END
139 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:363
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
static vtkSmartPointer< T > New()
Create an instance of a VTK object.
reduce the number of lines in a polyline
a list of ids arranged in priority order
static vtkPolyDataAlgorithm * New()
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkNew< vtkPriorityQueue > PriorityQueue
abstract class to define a decimation strategy for the vtkDecimatePolylineFilter
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.