VTK  9.6.20260308
vtkFillPointCloud.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
54
55#ifndef vtkFillPointCloud_h
56#define vtkFillPointCloud_h
57
58#include "vtkFiltersMeshingModule.h" // For export macro
59#include "vtkLabeledImagePointSampler.h" // For adaptive sampling
61#include "vtkSmartPointer.h" // For vtkSmartPointer
62#include "vtkStaticPointLocator.h" // For point locator
63
64VTK_ABI_NAMESPACE_BEGIN
65
66class VTKFILTERSMESHING_EXPORT vtkFillPointCloud : public vtkPolyDataAlgorithm
67{
68public:
70
76 void PrintSelf(ostream& os, vtkIndent indent) override;
78
80
87 {
90 };
91 vtkSetClampMacro(FillStrategy, int, UNIFORM, ADAPTIVE);
92 vtkGetMacro(FillStrategy, int);
96
98
104 vtkSetMacro(InLabel, int);
105 vtkGetMacro(InLabel, int);
107
109
115 vtkSetMacro(BackgroundLabel, int);
116 vtkGetMacro(BackgroundLabel, int);
118
120
127 vtkSetClampMacro(MaximumNumberOfPoints, int, 1, VTK_INT_MAX);
128 vtkGetMacro(MaximumNumberOfPoints, int);
130
132
142
144
151
153
162 {
163 this->PointSampler->SetJoggle(onoff);
164 this->UpdateJoggleInfo();
165 }
166 vtkTypeBool GetJoggle() const { return this->PointSampler->GetJoggle(); }
167 void JoggleOn()
168 {
169 this->PointSampler->JoggleOn();
170 this->UpdateJoggleInfo();
171 }
173 {
174 this->PointSampler->JoggleOff();
175 this->UpdateJoggleInfo();
176 }
177
179 {
180 this->PointSampler->SetJoggleRadiusIsAbsolute(onoff);
181 this->UpdateJoggleInfo();
182 }
184 {
185 return this->PointSampler->GetJoggleRadiusIsAbsolute();
186 }
188 {
189 this->PointSampler->JoggleRadiusIsAbsoluteOn();
190 this->UpdateJoggleInfo();
191 }
193 {
194 this->PointSampler->JoggleRadiusIsAbsoluteOff();
195 this->UpdateJoggleInfo();
196 }
197
198 void SetJoggleRadius(double r)
199 {
200 this->PointSampler->SetJoggleRadius(r);
201 this->UpdateJoggleInfo();
202 }
203 double GetJoggleRadius() const { return this->PointSampler->GetJoggleRadius(); }
205
207
213
219
225
226protected:
229
234
235 // These data members are maintained by the internal point sampler.
239
241 vtkSmartPointer<vtkStaticPointLocator> Locator; // locator for finding proximal points
242
244
246
247 // Internal helper methods
249
251 vtkIdType numNewPts, vtkPolyData* output);
252
253 // Support second input
255 int FillInputPortInformation(int port, vtkInformation* info) override;
256
257private:
258 vtkFillPointCloud(const vtkFillPointCloud&) = delete;
259 void operator=(const vtkFillPointCloud&) = delete;
260};
261
262VTK_ABI_NAMESPACE_END
263#endif
void SetFillStrategyToUniform()
Specify the fill strategy to use when generating new points.
vtkIdType GetNumberOfAddedPoints()
Get the number of points added.
vtkLabeledImagePointSampler * GetPointSampler()
Retrieve the internal instance of vtkLabeledImagePointSampler in order to better control the adaptive...
vtkStaticPointLocator * GetLocator()
Retrieve the internal locator to manually configure it, for example specifying the number of points p...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
void JoggleRadiusIsAbsoluteOff()
Enable/disable point joggling.
vtkPoints * CreatePointsAndRegions(vtkPointSet *input, vtkInformationVector **inputVector, vtkIdType numNewPts, vtkPolyData *output)
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator and point sampler.
void JoggleOn()
Enable/disable point joggling.
void JoggleRadiusIsAbsoluteOn()
Enable/disable point joggling.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkFillPointCloud * New()
Standard methods for instantiating, obtaining type information, and printing information.
~vtkFillPointCloud() override
void SetJoggleRadius(double r)
Enable/disable point joggling.
void JoggleOff()
Enable/disable point joggling.
vtkSmartPointer< vtkStaticPointLocator > Locator
vtkTypeBool ManualLocatorControl
vtkTypeBool GetJoggleRadiusIsAbsolute() const
Enable/disable point joggling.
void SetJoggle(vtkTypeBool onoff)
Enable/disable point joggling.
FillStrategyOptions
Specify the fill strategy to use when generating new points.
vtkSmartPointer< vtkLabeledImagePointSampler > PointSampler
virtual void SetFillStrategy(int)
Specify the fill strategy to use when generating new points.
void SetFillStrategyToAdaptive()
Specify the fill strategy to use when generating new points.
vtkTypeBool JoggleRadiusIsAbsolute
void SetJoggleRadiusIsAbsolute(vtkTypeBool onoff)
Enable/disable point joggling.
vtkTypeBool GetJoggle() const
Enable/disable point joggling.
double GetJoggleRadius() const
Enable/disable point joggling.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
produce sampled points from a segmented image
concrete class for storing a set of points
Definition vtkPointSet.h:98
represent and manipulate 3D points
Definition vtkPoints.h:140
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
quickly locate points in 3-space
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:363
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_INT_MAX
Definition vtkType.h:192