VTK  9.1.0
vtkDecimatePolylineFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDecimatePolylineFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
44 #ifndef vtkDecimatePolylineFilter_h
45 #define vtkDecimatePolylineFilter_h
46 
47 #include "vtkFiltersCoreModule.h" // For export macro
48 #include "vtkSmartPointer.h" // Needed for SP ivars
49 
50 #include "vtkPolyDataAlgorithm.h"
51 
52 class vtkPriorityQueue;
53 
54 class VTKFILTERSCORE_EXPORT vtkDecimatePolylineFilter : public vtkPolyDataAlgorithm
55 {
56 public:
58 
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
69 
71 
76  vtkSetClampMacro(TargetReduction, double, 0.0, 1.0);
77  vtkGetMacro(TargetReduction, double);
79 
81 
87  vtkSetClampMacro(MaximumError, double, 0.0, VTK_DOUBLE_MAX);
88  vtkGetMacro(MaximumError, double);
90 
92 
97  vtkSetMacro(OutputPointsPrecision, int);
98  vtkGetMacro(OutputPointsPrecision, int);
100 
101 protected:
104 
106 
107  class Polyline;
108  double ComputeError(vtkPolyData* input, Polyline* polyline, vtkIdType id);
109 
112  double MaximumError;
114 
115 private:
117  void operator=(const vtkDecimatePolylineFilter&) = delete;
118 };
119 
120 #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:34
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:86
a list of ids arranged in priority order
int vtkIdType
Definition: vtkType.h:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165