VTK  9.3.0
vtkMaskPoints.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
22#ifndef vtkMaskPoints_h
23#define vtkMaskPoints_h
24
25#include "vtkFiltersCoreModule.h" // For export macro
27
28VTK_ABI_NAMESPACE_BEGIN
29class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
30{
31public:
32 // Method used to pick points
34 {
40 UNIFORM_SPATIAL_VOLUME
41 };
42
43 static vtkMaskPoints* New();
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
51 vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
52 vtkGetMacro(OnRatio, int);
54
56
60 vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 0, VTK_ID_MAX);
61 vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
63
65
68 vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
69 vtkGetMacro(Offset, vtkIdType);
71
73
76 vtkSetMacro(RandomMode, bool);
77 vtkGetMacro(RandomMode, bool);
78 vtkBooleanMacro(RandomMode, bool);
80
82
86 vtkSetMacro(RandomSeed, int);
87 vtkGetMacro(RandomSeed, int);
89
91
121 vtkSetClampMacro(RandomModeType, int, RANDOMIZED_ID_STRIDES, UNIFORM_SPATIAL_VOLUME);
122 vtkGetMacro(RandomModeType, int);
124
126
139 vtkSetMacro(ProportionalMaximumNumberOfPoints, bool);
140 vtkGetMacro(ProportionalMaximumNumberOfPoints, bool);
141 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, bool);
143
145
150 vtkSetMacro(GenerateVertices, bool);
151 vtkGetMacro(GenerateVertices, bool);
152 vtkBooleanMacro(GenerateVertices, bool);
154
156
161 vtkSetMacro(SingleVertexPerCell, bool);
162 vtkGetMacro(SingleVertexPerCell, bool);
163 vtkBooleanMacro(SingleVertexPerCell, bool);
165
167
172 vtkSetMacro(OutputPointsPrecision, int);
173 vtkGetMacro(OutputPointsPrecision, int);
175
176protected:
178 ~vtkMaskPoints() override = default;
179
181 int FillInputPortInformation(int port, vtkInformation* info) override;
182
183 int OnRatio = 2; // every OnRatio point is on; all others are off.
184 vtkIdType Offset = 0; // or starting point id.
185 bool RandomMode = false; // turn on/off randomization.
186 int RandomSeed = 1;
188 bool GenerateVertices = false; // generate polydata verts
189 bool SingleVertexPerCell = false;
190 int RandomModeType = RANDOMIZED_ID_STRIDES;
191 bool ProportionalMaximumNumberOfPoints = false;
192 int OutputPointsPrecision = DEFAULT_PRECISION;
193
194 virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
195 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
196 virtual void InternalBroadcast(double*, int, int) {}
197 virtual void InternalGather(double*, double*, int, int) {}
198 virtual int InternalGetNumberOfProcesses() { return 1; }
199 virtual int InternalGetLocalProcessId() { return 0; }
200 virtual void InternalSplitController(int, int) {}
201 virtual void InternalResetController() {}
202 virtual void InternalBarrier() {}
203
204 unsigned long GetLocalSampleSize(vtkIdType, int);
205 double GetLocalAreaFactor(double, int);
206
207private:
208 vtkMaskPoints(const vtkMaskPoints&) = delete;
209 void operator=(const vtkMaskPoints&) = delete;
210};
211
212VTK_ABI_NAMESPACE_END
213#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
selectively filter points
~vtkMaskPoints() override=default
virtual void InternalSplitController(int, int)
vtkIdType MaximumNumberOfPoints
virtual void InternalGather(unsigned long *, unsigned long *, int, int)
virtual void InternalScatter(unsigned long *, unsigned long *, int, int)
virtual void InternalBroadcast(double *, int, int)
unsigned long GetLocalSampleSize(vtkIdType, int)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void InternalGather(double *, double *, int, int)
virtual int InternalGetNumberOfProcesses()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual int InternalGetLocalProcessId()
double GetLocalAreaFactor(double, int)
virtual void InternalBarrier()
static vtkMaskPoints * New()
virtual void InternalResetController()
Superclass for algorithms that produce only polydata as output.
int vtkIdType
Definition vtkType.h:315
#define VTK_ID_MAX
Definition vtkType.h:319
#define VTK_INT_MAX
Definition vtkType.h:144