VTK  9.2.5
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=========================================================================*/
34#ifndef vtkMaskPoints_h
35#define vtkMaskPoints_h
36
37#include "vtkFiltersCoreModule.h" // For export macro
39
40class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
41{
42public:
43 // Method used to pick points
45 {
51 UNIFORM_SPATIAL_VOLUME
52 };
53
54 static vtkMaskPoints* New();
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
62 vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
63 vtkGetMacro(OnRatio, int);
65
67
71 vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 0, VTK_ID_MAX);
72 vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
74
76
79 vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
80 vtkGetMacro(Offset, vtkIdType);
82
84
87 vtkSetMacro(RandomMode, bool);
88 vtkGetMacro(RandomMode, bool);
89 vtkBooleanMacro(RandomMode, bool);
91
93
97 vtkSetMacro(RandomSeed, int);
98 vtkGetMacro(RandomSeed, int);
100
102
132 vtkSetClampMacro(RandomModeType, int, RANDOMIZED_ID_STRIDES, UNIFORM_SPATIAL_VOLUME);
133 vtkGetMacro(RandomModeType, int);
135
137
150 vtkSetMacro(ProportionalMaximumNumberOfPoints, bool);
151 vtkGetMacro(ProportionalMaximumNumberOfPoints, bool);
152 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, bool);
154
156
161 vtkSetMacro(GenerateVertices, bool);
162 vtkGetMacro(GenerateVertices, bool);
163 vtkBooleanMacro(GenerateVertices, bool);
165
167
172 vtkSetMacro(SingleVertexPerCell, bool);
173 vtkGetMacro(SingleVertexPerCell, bool);
174 vtkBooleanMacro(SingleVertexPerCell, bool);
176
178
183 vtkSetMacro(OutputPointsPrecision, int);
184 vtkGetMacro(OutputPointsPrecision, int);
186
187protected:
189 ~vtkMaskPoints() override = default;
190
192 int FillInputPortInformation(int port, vtkInformation* info) override;
193
194 int OnRatio = 2; // every OnRatio point is on; all others are off.
195 vtkIdType Offset = 0; // or starting point id.
196 bool RandomMode = false; // turn on/off randomization.
197 int RandomSeed = 1;
199 bool GenerateVertices = false; // generate polydata verts
200 bool SingleVertexPerCell = false;
201 int RandomModeType = RANDOMIZED_ID_STRIDES;
202 bool ProportionalMaximumNumberOfPoints = false;
203 int OutputPointsPrecision = DEFAULT_PRECISION;
204
205 virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
206 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
207 virtual void InternalBroadcast(double*, int, int) {}
208 virtual void InternalGather(double*, double*, int, int) {}
209 virtual int InternalGetNumberOfProcesses() { return 1; }
210 virtual int InternalGetLocalProcessId() { return 0; }
211 virtual void InternalSplitController(int, int) {}
212 virtual void InternalResetController() {}
213 virtual void InternalBarrier() {}
214
215 unsigned long GetLocalSampleSize(vtkIdType, int);
216 double GetLocalAreaFactor(double, int);
217
218private:
219 vtkMaskPoints(const vtkMaskPoints&) = delete;
220 void operator=(const vtkMaskPoints&) = delete;
221};
222
223#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
selectively filter points
Definition: vtkMaskPoints.h:41
~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:332
#define VTK_ID_MAX
Definition: vtkType.h:336
#define VTK_INT_MAX
Definition: vtkType.h:155