VTK
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 =========================================================================*/
37 #ifndef vtkMaskPoints_h
38 #define vtkMaskPoints_h
39 
40 #include "vtkFiltersCoreModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
44 {
45 public:
46  static vtkMaskPoints *New();
48  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49 
51 
54  vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX);
55  vtkGetMacro(OnRatio,int);
57 
59 
63  vtkSetClampMacro(MaximumNumberOfPoints,vtkIdType,0,VTK_ID_MAX);
64  vtkGetMacro(MaximumNumberOfPoints,vtkIdType);
66 
68 
71  vtkSetClampMacro(Offset,vtkIdType,0,VTK_ID_MAX);
72  vtkGetMacro(Offset,vtkIdType);
74 
76 
79  vtkSetMacro(RandomMode,int);
80  vtkGetMacro(RandomMode,int);
81  vtkBooleanMacro(RandomMode,int);
83 
85 
106  vtkSetClampMacro(RandomModeType, int, 0, 2);
107  vtkGetMacro(RandomModeType, int);
109 
111 
124  vtkSetMacro(ProportionalMaximumNumberOfPoints, int);
125  vtkGetMacro(ProportionalMaximumNumberOfPoints, int);
126  vtkBooleanMacro(ProportionalMaximumNumberOfPoints, int);
128 
130 
135  vtkSetMacro(GenerateVertices,int);
136  vtkGetMacro(GenerateVertices,int);
137  vtkBooleanMacro(GenerateVertices,int);
139 
141 
146  vtkSetMacro(SingleVertexPerCell,int);
147  vtkGetMacro(SingleVertexPerCell,int);
148  vtkBooleanMacro(SingleVertexPerCell,int);
150 
152 
157  vtkSetMacro(OutputPointsPrecision,int);
158  vtkGetMacro(OutputPointsPrecision,int);
160 
161 protected:
162  vtkMaskPoints();
163  ~vtkMaskPoints() VTK_OVERRIDE {}
164 
166  vtkInformationVector *) VTK_OVERRIDE;
167  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
168 
169  int OnRatio; // every OnRatio point is on; all others are off.
170  vtkIdType Offset; // offset (or starting point id)
171  int RandomMode; // turn on/off randomization
173  int GenerateVertices; //generate polydata verts
175  int RandomModeType; // choose the random sampling mode
178 
179  virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {}
180  virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
181  virtual int InternalGetNumberOfProcesses() { return 1; };
182  virtual int InternalGetLocalProcessId() { return 0; };
183  virtual void InternalBarrier() {}
184  unsigned long GetLocalSampleSize(vtkIdType, int);
185 
186 private:
187  vtkMaskPoints(const vtkMaskPoints&) VTK_DELETE_FUNCTION;
188  void operator=(const vtkMaskPoints&) VTK_DELETE_FUNCTION;
189 };
190 
191 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:153
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkMaskPoints::InternalGather
virtual void InternalGather(unsigned long *, unsigned long *, int, int)
Definition: vtkMaskPoints.h:180
vtkMaskPoints::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkMaskPoints.h:177
vtkMaskPoints::MaximumNumberOfPoints
vtkIdType MaximumNumberOfPoints
Definition: vtkMaskPoints.h:172
vtkMaskPoints::InternalBarrier
virtual void InternalBarrier()
Definition: vtkMaskPoints.h:183
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMaskPoints::SingleVertexPerCell
int SingleVertexPerCell
Definition: vtkMaskPoints.h:174
vtkMaskPoints::RandomMode
int RandomMode
Definition: vtkMaskPoints.h:171
vtkPolyDataAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkMaskPoints::InternalGetNumberOfProcesses
virtual int InternalGetNumberOfProcesses()
Definition: vtkMaskPoints.h:181
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMaskPoints::ProportionalMaximumNumberOfPoints
int ProportionalMaximumNumberOfPoints
Definition: vtkMaskPoints.h:176
vtkMaskPoints::GenerateVertices
int GenerateVertices
Definition: vtkMaskPoints.h:173
vtkMaskPoints::~vtkMaskPoints
~vtkMaskPoints() override
Definition: vtkMaskPoints.h:163
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:43
vtkMaskPoints::InternalScatter
virtual void InternalScatter(unsigned long *, unsigned long *, int, int)
Definition: vtkMaskPoints.h:179
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkX3D::info
@ info
Definition: vtkX3D.h:376
VTK_ID_MAX
#define VTK_ID_MAX
Definition: vtkType.h:291
vtkMaskPoints::Offset
vtkIdType Offset
Definition: vtkMaskPoints.h:170
vtkMaskPoints::InternalGetLocalProcessId
virtual int InternalGetLocalProcessId()
Definition: vtkMaskPoints.h:182
vtkMaskPoints::OnRatio
int OnRatio
Definition: vtkMaskPoints.h:169
vtkMaskPoints::RandomModeType
int RandomModeType
Definition: vtkMaskPoints.h:175
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44