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 =========================================================================*/
36 #ifndef vtkMaskPoints_h
37 #define vtkMaskPoints_h
38 
39 #include "vtkFiltersCoreModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 
43 {
44 public:
45  static vtkMaskPoints *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX);
52  vtkGetMacro(OnRatio,int);
54 
56 
58  vtkSetClampMacro(MaximumNumberOfPoints,vtkIdType,0,VTK_ID_MAX);
59  vtkGetMacro(MaximumNumberOfPoints,vtkIdType);
61 
63 
64  vtkSetClampMacro(Offset,vtkIdType,0,VTK_ID_MAX);
65  vtkGetMacro(Offset,vtkIdType);
67 
69 
70  vtkSetMacro(RandomMode,int);
71  vtkGetMacro(RandomMode,int);
72  vtkBooleanMacro(RandomMode,int);
74 
76 
93  vtkSetClampMacro(RandomModeType, int, 0, 2);
94  vtkGetMacro(RandomModeType, int);
96 
98 
107  vtkSetMacro(ProportionalMaximumNumberOfPoints, int);
108  vtkGetMacro(ProportionalMaximumNumberOfPoints, int);
109  vtkBooleanMacro(ProportionalMaximumNumberOfPoints, int);
111 
113 
117  vtkSetMacro(GenerateVertices,int);
118  vtkGetMacro(GenerateVertices,int);
119  vtkBooleanMacro(GenerateVertices,int);
121 
123 
126  vtkSetMacro(SingleVertexPerCell,int);
127  vtkGetMacro(SingleVertexPerCell,int);
128  vtkBooleanMacro(SingleVertexPerCell,int);
130 
132 
135  vtkSetMacro(OutputPointsPrecision,int);
136  vtkGetMacro(OutputPointsPrecision,int);
138 
139 protected:
140  vtkMaskPoints();
142 
146 
147  int OnRatio; // every OnRatio point is on; all others are off.
148  vtkIdType Offset; // offset (or starting point id)
149  int RandomMode; // turn on/off randomization
151  int GenerateVertices; //generate polydata verts
153  int RandomModeType; // choose the random sampling mode
156 
157  virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {}
158  virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}
159  virtual int InternalGetNumberOfProcesses() { return 1; };
160  virtual int InternalGetLocalProcessId() { return 0; };
161  virtual void InternalBarrier() {}
162  unsigned long GetLocalSampleSize(vtkIdType, int);
163 
164 private:
165  vtkMaskPoints(const vtkMaskPoints&); // Not implemented.
166  void operator=(const vtkMaskPoints&); // Not implemented.
167 };
168 
169 #endif
int ProportionalMaximumNumberOfPoints
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKFILTERSCORE_EXPORT
#define VTK_INT_MAX
Definition: vtkType.h:132
int OutputPointsPrecision
int vtkIdType
Definition: vtkType.h:275
virtual int InternalGetNumberOfProcesses()
virtual void InternalBarrier()
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIdType MaximumNumberOfPoints
selectively filter points
Definition: vtkMaskPoints.h:42
vtkIdType Offset
virtual int InternalGetLocalProcessId()
virtual void InternalGather(unsigned long *, unsigned long *, int, int)
#define VTK_ID_MAX
Definition: vtkType.h:278
Store zero or more vtkInformation instances.
virtual void InternalScatter(unsigned long *, unsigned long *, int, int)