VTK
vtkPointCloudFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointCloudFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See LICENSE file 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 =========================================================================*/
57 #ifndef vtkPointCloudFilter_h
58 #define vtkPointCloudFilter_h
59 
60 #include "vtkFiltersPointsModule.h" // For export macro
61 #include "vtkPolyDataAlgorithm.h"
62 
63 class vtkPointSet;
64 class vtkPolyData;
65 
66 class VTKFILTERSPOINTS_EXPORT vtkPointCloudFilter : public vtkPolyDataAlgorithm
67 {
68 public:
70 
74  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
76 
85  const vtkIdType* GetPointMap();
86 
91  vtkIdType GetNumberOfPointsRemoved();
92 
94 
101  vtkSetMacro(GenerateOutliers,bool);
102  vtkGetMacro(GenerateOutliers,bool);
103  vtkBooleanMacro(GenerateOutliers,bool);
105 
107 
113  vtkSetMacro(GenerateVertices,bool);
114  vtkGetMacro(GenerateVertices,bool);
115  vtkBooleanMacro(GenerateVertices,bool);
117 
118 protected:
120  ~vtkPointCloudFilter() VTK_OVERRIDE;
121 
122  // All derived classes must implement this method. Note that a side effect of
123  // the class is to populate the PointMap. Zero is returned on error.
124  virtual int FilterPoints(vtkPointSet *input) = 0;
125 
126  // Keep track of which points are removed through the point map
127  vtkIdType *PointMap;
128  vtkIdType NumberOfPointsRemoved;
129 
130  // Does a second output need to be created?
131  bool GenerateOutliers;
132 
133  // Should output vertex cells be created?
134  bool GenerateVertices;
135 
136  int RequestData(vtkInformation *, vtkInformationVector **,
137  vtkInformationVector *) VTK_OVERRIDE;
138  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
139 
140  void GenerateVerticesIfRequested(vtkPolyData *output);
141 
142 private:
143  vtkPointCloudFilter(const vtkPointCloudFilter&) VTK_DELETE_FUNCTION;
144  void operator=(const vtkPointCloudFilter&) VTK_DELETE_FUNCTION;
145 
146 };
147 
148 #endif
Store vtkAlgorithm input/output information.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:39
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
abstract class for filtering a point cloud
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.