VTK  9.6.1
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
21
22#ifndef vtkMaskPoints_h
23#define vtkMaskPoints_h
24
25#include "vtkFiltersCoreModule.h" // For export macro
27#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28
29VTK_ABI_NAMESPACE_BEGIN
30class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkMaskPoints : public vtkPolyDataAlgorithm
31{
32public:
33 // Method used to pick points
43
44 static vtkMaskPoints* New();
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
52 vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
53 vtkGetMacro(OnRatio, int);
55
57
64
66
69 vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
70 vtkGetMacro(Offset, vtkIdType);
72
74
77 vtkSetMacro(RandomMode, bool);
78 vtkGetMacro(RandomMode, bool);
79 vtkBooleanMacro(RandomMode, bool);
81
83
87 vtkSetMacro(RandomSeed, int);
88 vtkGetMacro(RandomSeed, int);
90
92
123 vtkGetMacro(RandomModeType, int);
125
127
142 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, bool);
144
146
151 vtkSetMacro(GenerateVertices, bool);
152 vtkGetMacro(GenerateVertices, bool);
153 vtkBooleanMacro(GenerateVertices, bool);
155
157
162 vtkSetMacro(SingleVertexPerCell, bool);
163 vtkGetMacro(SingleVertexPerCell, bool);
164 vtkBooleanMacro(SingleVertexPerCell, bool);
166
168
173 vtkSetMacro(OutputPointsPrecision, int);
174 vtkGetMacro(OutputPointsPrecision, int);
176
177protected:
179 ~vtkMaskPoints() override = default;
180
182 int FillInputPortInformation(int port, vtkInformation* info) override;
183
184 int OnRatio = 2; // every OnRatio point is on; all others are off.
185 vtkIdType Offset = 0; // or starting point id.
186 bool RandomMode = false; // turn on/off randomization.
187 int RandomSeed = 1;
189 bool GenerateVertices = false; // generate polydata verts
194
195 virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
196 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
197 virtual void InternalBroadcast(double*, int, int) {}
198 virtual void InternalGather(double*, double*, int, int) {}
199 virtual int InternalGetNumberOfProcesses() { return 1; }
200 virtual int InternalGetLocalProcessId() { return 0; }
201 virtual void InternalSplitController(int, int) {}
202 virtual void InternalResetController() {}
203 virtual void InternalBarrier() {}
204
205 unsigned long GetLocalSampleSize(vtkIdType, int);
206 double GetLocalAreaFactor(double, int);
207
208private:
209 vtkMaskPoints(const vtkMaskPoints&) = delete;
210 void operator=(const vtkMaskPoints&) = delete;
211};
212
213VTK_ABI_NAMESPACE_END
214#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
~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()
vtkIdType Offset
int FillInputPortInformation(int port, vtkInformation *info) override
virtual int InternalGetLocalProcessId()
bool ProportionalMaximumNumberOfPoints
double GetLocalAreaFactor(double, int)
virtual void InternalBarrier()
static vtkMaskPoints * New()
virtual void InternalResetController()
int vtkIdType
Definition vtkType.h:368
#define VTK_ID_MAX
Definition vtkType.h:372
#define VTK_INT_MAX
Definition vtkType.h:197
#define VTK_MARSHALAUTO