VTK  9.1.0
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=========================================================================*/
140#ifndef vtkMaskPoints_h
141#define vtkMaskPoints_h
142
143#include "vtkFiltersCoreModule.h" // For export macro
144#include "vtkPolyDataAlgorithm.h"
145
146class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
147{
148public:
149 // Method used to pick points
151 {
157 UNIFORM_SPATIAL_VOLUME
158 };
159
162 void PrintSelf(ostream& os, vtkIndent indent) override;
163
165
168 vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
169 vtkGetMacro(OnRatio, int);
171
173
177 vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 0, VTK_ID_MAX);
178 vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
180
182
185 vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
186 vtkGetMacro(Offset, vtkIdType);
188
190
193 vtkSetMacro(RandomMode, bool);
194 vtkGetMacro(RandomMode, bool);
195 vtkBooleanMacro(RandomMode, bool);
197
199
203 vtkSetMacro(RandomSeed, int);
204 vtkGetMacro(RandomSeed, int);
206
208
238 vtkSetClampMacro(RandomModeType, int, RANDOMIZED_ID_STRIDES, UNIFORM_SPATIAL_VOLUME);
239 vtkGetMacro(RandomModeType, int);
241
243
256 vtkSetMacro(ProportionalMaximumNumberOfPoints, bool);
257 vtkGetMacro(ProportionalMaximumNumberOfPoints, bool);
258 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, bool);
260
262
267 vtkSetMacro(GenerateVertices, bool);
268 vtkGetMacro(GenerateVertices, bool);
269 vtkBooleanMacro(GenerateVertices, bool);
271
273
278 vtkSetMacro(SingleVertexPerCell, bool);
279 vtkGetMacro(SingleVertexPerCell, bool);
280 vtkBooleanMacro(SingleVertexPerCell, bool);
282
284
289 vtkSetMacro(OutputPointsPrecision, int);
290 vtkGetMacro(OutputPointsPrecision, int);
292
293protected:
295 ~vtkMaskPoints() override = default;
296
299
300 int OnRatio = 2; // every OnRatio point is on; all others are off.
301 vtkIdType Offset = 0; // or starting point id.
302 bool RandomMode = false; // turn on/off randomization.
303 int RandomSeed = 1;
305 bool GenerateVertices = false; // generate polydata verts
306 bool SingleVertexPerCell = false;
307 int RandomModeType = RANDOMIZED_ID_STRIDES;
308 bool ProportionalMaximumNumberOfPoints = false;
309 int OutputPointsPrecision = DEFAULT_PRECISION;
310
311 virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
312 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
313 virtual void InternalBroadcast(double*, int, int) {}
314 virtual void InternalGather(double*, double*, int, int) {}
315 virtual int InternalGetNumberOfProcesses() { return 1; }
316 virtual int InternalGetLocalProcessId() { return 0; }
317 virtual void InternalSplitController(int, int) {}
318 virtual void InternalResetController() {}
319 virtual void InternalBarrier() {}
320
321 unsigned long GetLocalSampleSize(vtkIdType, int);
322 double GetLocalAreaFactor(double, int);
323
324private:
325 vtkMaskPoints(const vtkMaskPoints&) = delete;
326 void operator=(const vtkMaskPoints&) = delete;
327};
328
329#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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