VTK  9.2.6
vtkMaskPoints.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMaskPoints.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
143#ifndef vtkMaskPoints_h
144#define vtkMaskPoints_h
145
146#include "vtkFiltersCoreModule.h" // For export macro
147#include "vtkPolyDataAlgorithm.h"
148
149class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
150{
151public:
152 // Method used to pick points
154 {
160 UNIFORM_SPATIAL_VOLUME
161 };
162
165 void PrintSelf(ostream& os, vtkIndent indent) override;
166
168
171 vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
172 vtkGetMacro(OnRatio, int);
174
176
180 vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 0, VTK_ID_MAX);
181 vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
183
185
188 vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
189 vtkGetMacro(Offset, vtkIdType);
191
193
196 vtkSetMacro(RandomMode, bool);
197 vtkGetMacro(RandomMode, bool);
198 vtkBooleanMacro(RandomMode, bool);
200
202
206 vtkSetMacro(RandomSeed, int);
207 vtkGetMacro(RandomSeed, int);
209
211
241 vtkSetClampMacro(RandomModeType, int, RANDOMIZED_ID_STRIDES, UNIFORM_SPATIAL_VOLUME);
242 vtkGetMacro(RandomModeType, int);
244
246
259 vtkSetMacro(ProportionalMaximumNumberOfPoints, bool);
260 vtkGetMacro(ProportionalMaximumNumberOfPoints, bool);
261 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, bool);
263
265
270 vtkSetMacro(GenerateVertices, bool);
271 vtkGetMacro(GenerateVertices, bool);
272 vtkBooleanMacro(GenerateVertices, bool);
274
276
281 vtkSetMacro(SingleVertexPerCell, bool);
282 vtkGetMacro(SingleVertexPerCell, bool);
283 vtkBooleanMacro(SingleVertexPerCell, bool);
285
287
292 vtkSetMacro(OutputPointsPrecision, int);
293 vtkGetMacro(OutputPointsPrecision, int);
295
296protected:
298 ~vtkMaskPoints() override = default;
299
302
303 int OnRatio = 2; // every OnRatio point is on; all others are off.
304 vtkIdType Offset = 0; // or starting point id.
305 bool RandomMode = false; // turn on/off randomization.
306 int RandomSeed = 1;
308 bool GenerateVertices = false; // generate polydata verts
309 bool SingleVertexPerCell = false;
310 int RandomModeType = RANDOMIZED_ID_STRIDES;
311 bool ProportionalMaximumNumberOfPoints = false;
312 int OutputPointsPrecision = DEFAULT_PRECISION;
313
314 virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
315 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
316 virtual void InternalBroadcast(double*, int, int) {}
317 virtual void InternalGather(double*, double*, int, int) {}
318 virtual int InternalGetNumberOfProcesses() { return 1; }
319 virtual int InternalGetLocalProcessId() { return 0; }
320 virtual void InternalSplitController(int, int) {}
321 virtual void InternalResetController() {}
322 virtual void InternalBarrier() {}
323
324 unsigned long GetLocalSampleSize(vtkIdType, int);
325 double GetLocalAreaFactor(double, int);
326
327private:
328 vtkMaskPoints(const vtkMaskPoints&) = delete;
329 void operator=(const vtkMaskPoints&) = delete;
330};
331
332#endif
a simple class to control print indentation
Definition: vtkIndent.h:119
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.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkIdType
Definition: vtkType.h:332
#define VTK_ID_MAX
Definition: vtkType.h:336
#define VTK_INT_MAX
Definition: vtkType.h:155