/usr/include/vtk-7.1/vtkStatisticalOutlierRemoval.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkStatisticalOutlierRemoval.h
Copyright (c) Kitware, Inc.
All rights reserved.
See LICENSE file for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkStatisticalOutlierRemoval
* @brief remove sparse outlier points
*
*
* The vtkStatisticalOutlierRemoval filter removes sparse outlier points
* through statistical analysis. The average (mean) distance between points
* in the point cloud is computed (taking a local sample size around each
* point); followed by computation of the global standard deviation of
* distances between points. This global, statistical information is compared
* against the mean separation distance for each point; those points whose
* average separation is greater than the user-specified variation in
* a multiple of standard deviation are removed.
*
* Note that while any vtkPointSet type can be provided as input, the output is
* represented by an explicit representation of points via a
* vtkPolyData. This output polydata will populate its instance of vtkPoints,
* but no cells will be defined (i.e., no vtkVertex or vtkPolyVertex are
* contained in the output). Also, after filter execution, the user can
* request a vtkIdType* map which indicates how the input points were mapped
* to the output. A value of map[i] (where i is the ith input point) less
* than 0 means that the ith input point was removed. (See also the
* superclass documentation for accessing the removed points through the
* filter's second output.)
*
* @warning
* This class has been threaded with vtkSMPTools. Using TBB or other
* non-sequential type (set in the CMake variable
* VTK_SMP_IMPLEMENTATION_TYPE) may improve performance significantly.
*
* @sa
* vtkPointCloudFilter vtkRadiusOutlierRemoval vtkExtractPoints
* vtkThresholdPoints
*/
#ifndef vtkStatisticalOutlierRemoval_h
#define vtkStatisticalOutlierRemoval_h
#include "vtkFiltersPointsModule.h" // For export macro
#include "vtkPointCloudFilter.h"
class vtkAbstractPointLocator;
class vtkPointSet;
class VTKFILTERSPOINTS_EXPORT vtkStatisticalOutlierRemoval : public vtkPointCloudFilter
{
public:
//@{
/**
* Standard methods for instantiating, obtaining type information, and
* printing information.
*/
static vtkStatisticalOutlierRemoval *New();
vtkTypeMacro(vtkStatisticalOutlierRemoval,vtkPointCloudFilter);
void PrintSelf(ostream& os, vtkIndent indent);
//@}
//@{
/**
* For each point sampled, specify the number of the closest, surrounding
* points used to compute statistics. By default 25 points are used. Smaller
* numbers may speed performance.
*/
vtkSetClampMacro(SampleSize,int,1,VTK_INT_MAX);
vtkGetMacro(SampleSize,int);
//@}
//@{
/**
* The filter uses this specified standard deviation factor to extract
* points. By default, points within 1.0 standard deviations (i.e., a
* StandardDeviationFactor=1.0) of the mean distance to neighboring
* points are retained.
*/
vtkSetClampMacro(StandardDeviationFactor,double,0.0,VTK_FLOAT_MAX);
vtkGetMacro(StandardDeviationFactor,double);
//@}
//@{
/**
* Specify a point locator. By default a vtkStaticPointLocator is
* used. The locator performs efficient searches to locate points
* surroinding a sample point.
*/
void SetLocator(vtkAbstractPointLocator *locator);
vtkGetObjectMacro(Locator,vtkAbstractPointLocator);
//@}
//@{
/**
* After execution, return the value of the computed mean. Before execution
* the value returned is invalid.
*/
vtkSetClampMacro(ComputedMean,double,0.0,VTK_FLOAT_MAX);
vtkGetMacro(ComputedMean,double);
//@}
//@{
/**
* After execution, return the value of the computed sigma (standard
* deviation). Before execution the value returned is invalid.
*/
vtkSetClampMacro(ComputedStandardDeviation,double,0.0,VTK_FLOAT_MAX);
vtkGetMacro(ComputedStandardDeviation,double);
//@}
protected:
vtkStatisticalOutlierRemoval();
~vtkStatisticalOutlierRemoval();
int SampleSize;
double StandardDeviationFactor;
vtkAbstractPointLocator *Locator;
// Derived quantities
double ComputedMean;
double ComputedStandardDeviation;
// All derived classes must implement this method. Note that a side effect of
// the class is to populate the PointMap. Zero is returned if there is a failure.
virtual int FilterPoints(vtkPointSet *input);
private:
vtkStatisticalOutlierRemoval(const vtkStatisticalOutlierRemoval&) VTK_DELETE_FUNCTION;
void operator=(const vtkStatisticalOutlierRemoval&) VTK_DELETE_FUNCTION;
};
#endif
|