VTK  9.0.1
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 =========================================================================*/
31 #ifndef vtkMaskPoints_h
32 #define vtkMaskPoints_h
33 
34 #include "vtkFiltersCoreModule.h" // For export macro
35 #include "vtkPolyDataAlgorithm.h"
36 
37 class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
38 {
39 public:
40  static vtkMaskPoints* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetClampMacro(OnRatio, int, 1, VTK_INT_MAX);
49  vtkGetMacro(OnRatio, int);
51 
53 
57  vtkSetClampMacro(MaximumNumberOfPoints, vtkIdType, 0, VTK_ID_MAX);
58  vtkGetMacro(MaximumNumberOfPoints, vtkIdType);
60 
62 
65  vtkSetClampMacro(Offset, vtkIdType, 0, VTK_ID_MAX);
66  vtkGetMacro(Offset, vtkIdType);
68 
70 
73  vtkSetMacro(RandomMode, vtkTypeBool);
74  vtkGetMacro(RandomMode, vtkTypeBool);
75  vtkBooleanMacro(RandomMode, vtkTypeBool);
77 
79 
100  vtkSetClampMacro(RandomModeType, int, 0, 2);
101  vtkGetMacro(RandomModeType, int);
103 
105 
118  vtkSetMacro(ProportionalMaximumNumberOfPoints, vtkTypeBool);
119  vtkGetMacro(ProportionalMaximumNumberOfPoints, vtkTypeBool);
120  vtkBooleanMacro(ProportionalMaximumNumberOfPoints, vtkTypeBool);
122 
124 
129  vtkSetMacro(GenerateVertices, vtkTypeBool);
130  vtkGetMacro(GenerateVertices, vtkTypeBool);
131  vtkBooleanMacro(GenerateVertices, vtkTypeBool);
133 
135 
140  vtkSetMacro(SingleVertexPerCell, vtkTypeBool);
141  vtkGetMacro(SingleVertexPerCell, vtkTypeBool);
142  vtkBooleanMacro(SingleVertexPerCell, vtkTypeBool);
144 
146 
151  vtkSetMacro(OutputPointsPrecision, int);
152  vtkGetMacro(OutputPointsPrecision, int);
154 
155 protected:
156  vtkMaskPoints();
157  ~vtkMaskPoints() override {}
158 
160  int FillInputPortInformation(int port, vtkInformation* info) override;
161 
162  int OnRatio; // every OnRatio point is on; all others are off.
163  vtkIdType Offset; // offset (or starting point id)
164  int RandomMode; // turn on/off randomization
166  vtkTypeBool GenerateVertices; // generate polydata verts
168  int RandomModeType; // choose the random sampling mode
171 
172  virtual void InternalScatter(unsigned long*, unsigned long*, int, int) {}
173  virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
174  virtual int InternalGetNumberOfProcesses() { return 1; }
175  virtual int InternalGetLocalProcessId() { return 0; }
176  virtual void InternalSplitController(int, int) {}
177  virtual void InternalResetController() {}
178  virtual void InternalBarrier() {}
179  unsigned long GetLocalSampleSize(vtkIdType, int);
180 
181 private:
182  vtkMaskPoints(const vtkMaskPoints&) = delete;
183  void operator=(const vtkMaskPoints&) = delete;
184 };
185 
186 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkMaskPoints::InternalGather
virtual void InternalGather(unsigned long *, unsigned long *, int, int)
Definition: vtkMaskPoints.h:173
vtkMaskPoints::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkMaskPoints.h:170
vtkMaskPoints::MaximumNumberOfPoints
vtkIdType MaximumNumberOfPoints
Definition: vtkMaskPoints.h:165
vtkMaskPoints::InternalBarrier
virtual void InternalBarrier()
Definition: vtkMaskPoints.h:178
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMaskPoints::RandomMode
int RandomMode
Definition: vtkMaskPoints.h:164
vtkMaskPoints::ProportionalMaximumNumberOfPoints
vtkTypeBool ProportionalMaximumNumberOfPoints
Definition: vtkMaskPoints.h:169
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkMaskPoints::GenerateVertices
vtkTypeBool GenerateVertices
Definition: vtkMaskPoints.h:166
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkMaskPoints::SingleVertexPerCell
vtkTypeBool SingleVertexPerCell
Definition: vtkMaskPoints.h:167
vtkMaskPoints::InternalGetNumberOfProcesses
virtual int InternalGetNumberOfProcesses()
Definition: vtkMaskPoints.h:174
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMaskPoints::~vtkMaskPoints
~vtkMaskPoints() override
Definition: vtkMaskPoints.h:157
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkMaskPoints
selectively filter points
Definition: vtkMaskPoints.h:37
vtkMaskPoints::InternalScatter
virtual void InternalScatter(unsigned long *, unsigned long *, int, int)
Definition: vtkMaskPoints.h:172
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
VTK_ID_MAX
#define VTK_ID_MAX
Definition: vtkType.h:342
vtkMaskPoints::Offset
vtkIdType Offset
Definition: vtkMaskPoints.h:163
vtkMaskPoints::InternalSplitController
virtual void InternalSplitController(int, int)
Definition: vtkMaskPoints.h:176
vtkMaskPoints::InternalGetLocalProcessId
virtual int InternalGetLocalProcessId()
Definition: vtkMaskPoints.h:175
vtkMaskPoints::InternalResetController
virtual void InternalResetController()
Definition: vtkMaskPoints.h:177
vtkMaskPoints::OnRatio
int OnRatio
Definition: vtkMaskPoints.h:162
vtkMaskPoints::RandomModeType
int RandomModeType
Definition: vtkMaskPoints.h:168
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41