VTK: Filters/Points/vtkDensifyPointCloudFilter.h Source File

| VTK 9.3.1

vtkDensifyPointCloudFilter.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
48 #ifndef vtkDensifyPointCloudFilter_h
49 #define vtkDensifyPointCloudFilter_h
50
51 #include "vtkFiltersPointsModule.h" // For export macro
52 #include "vtkPolyDataAlgorithm.h"
53
54 VTK_ABI_NAMESPACE_BEGIN
55 class VTKFILTERSPOINTS_EXPORT vtkDensifyPointCloudFilter : public vtkPolyDataAlgorithm
56 {
57 public:
59
63 static vtkDensifyPointCloudFilter* New();
64 vtkTypeMacro(vtkDensifyPointCloudFilter, vtkPolyDataAlgorithm);
65 void PrintSelf(ostream& os, vtkIndent indent) override;
67
76 enum NeighborhoodType
77 {
78 RADIUS = 0,
79 N_CLOSEST = 1
80 };
81
83
88 vtkSetMacro(NeighborhoodType, int);
89 vtkGetMacro(NeighborhoodType, int);
90 void SetNeighborhoodTypeToRadius() { this->SetNeighborhoodType(RADIUS); }
91 void SetNeighborhoodTypeToNClosest() { this->SetNeighborhoodType(N_CLOSEST); }
93
95
100 vtkSetClampMacro(Radius, double, 1, VTK_DOUBLE_MAX);
101 vtkGetMacro(Radius, double);
103
105
110 vtkSetClampMacro(NumberOfClosestPoints, int, 1, VTK_INT_MAX);
111 vtkGetMacro(NumberOfClosestPoints, int);
113
115
123 vtkSetClampMacro(TargetDistance, double, 0.0, VTK_DOUBLE_MAX);
124 vtkGetMacro(TargetDistance, double);
126
128
132 vtkSetClampMacro(MaximumNumberOfIterations, int, 1, VTK_SHORT_MAX);
133 vtkGetMacro(MaximumNumberOfIterations, int);
135
137
144 vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
145 vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
147
149
153 vtkSetMacro(InterpolateAttributeData, bool);
154 vtkGetMacro(InterpolateAttributeData, bool);
155 vtkBooleanMacro(InterpolateAttributeData, bool);
157
158 protected:
159 vtkDensifyPointCloudFilter();
160 ~vtkDensifyPointCloudFilter() override;
161
162 // Data members
163 int NeighborhoodType;
164 double Radius;
165 int NumberOfClosestPoints;
166 double TargetDistance;
167 int MaximumNumberOfIterations;
168 bool InterpolateAttributeData;
169 vtkIdType MaximumNumberOfPoints;
170
171 // Pipeline management
172 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
173 int FillInputPortInformation(int port, vtkInformation* info) override;
174
175 private:
176 vtkDensifyPointCloudFilter(const vtkDensifyPointCloudFilter&) = delete;
177 void operator=(const vtkDensifyPointCloudFilter&) = delete;
178 };
179
180 VTK_ABI_NAMESPACE_END
181 #endif
vtkDensifyPointCloudFilter
add points to a point cloud to make it denser
Definition: vtkDensifyPointCloudFilter.h:56
vtkDensifyPointCloudFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDensifyPointCloudFilter::NeighborhoodType
int NeighborhoodType
Definition: vtkDensifyPointCloudFilter.h:163
vtkDensifyPointCloudFilter::vtkDensifyPointCloudFilter
vtkDensifyPointCloudFilter()
vtkDensifyPointCloudFilter::New
static vtkDensifyPointCloudFilter * New()
Standard methods for instantiating, obtaining type information, and printing information.
vtkDensifyPointCloudFilter::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkDensifyPointCloudFilter::TargetDistance
double TargetDistance
Definition: vtkDensifyPointCloudFilter.h:166
vtkDensifyPointCloudFilter::SetNeighborhoodTypeToRadius
void SetNeighborhoodTypeToRadius()
Specify how the local point neighborhood is defined.
Definition: vtkDensifyPointCloudFilter.h:90
vtkDensifyPointCloudFilter::NeighborhoodType
NeighborhoodType
This enum is used to specify how the local point neighborhood is defined.
Definition: vtkDensifyPointCloudFilter.h:77
vtkDensifyPointCloudFilter::MaximumNumberOfIterations
int MaximumNumberOfIterations
Definition: vtkDensifyPointCloudFilter.h:167
vtkDensifyPointCloudFilter::MaximumNumberOfPoints
vtkIdType MaximumNumberOfPoints
Definition: vtkDensifyPointCloudFilter.h:169
vtkDensifyPointCloudFilter::SetNeighborhoodTypeToNClosest
void SetNeighborhoodTypeToNClosest()
Specify how the local point neighborhood is defined.
Definition: vtkDensifyPointCloudFilter.h:91
vtkDensifyPointCloudFilter::~vtkDensifyPointCloudFilter
~vtkDensifyPointCloudFilter() override
vtkDensifyPointCloudFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
vtkDensifyPointCloudFilter::NumberOfClosestPoints
int NumberOfClosestPoints
Definition: vtkDensifyPointCloudFilter.h:165
vtkDensifyPointCloudFilter::Radius
double Radius
Definition: vtkDensifyPointCloudFilter.h:164
vtkDensifyPointCloudFilter::InterpolateAttributeData
bool InterpolateAttributeData
Definition: vtkDensifyPointCloudFilter.h:168
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_SHORT_MAX
#define VTK_SHORT_MAX
Definition: vtkType.h:140
VTK_ID_MAX
#define VTK_ID_MAX
Definition: vtkType.h:319
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:144