VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
42 class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
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 
131 protected:
132  vtkMaskPoints();
134 
135  virtual int RequestData(vtkInformation *, vtkInformationVector **,
136  vtkInformationVector *);
137  virtual int FillInputPortInformation(int port, vtkInformation *info);
138 
139  int OnRatio; // every OnRatio point is on; all others are off.
140  vtkIdType Offset; // offset (or starting point id)
141  int RandomMode; // turn on/off randomization
143  int GenerateVertices; //generate polydata verts
145  int RandomModeType; // choose the random sampling mode
147 
148  virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {};
149  virtual void InternalGather(unsigned long*, unsigned long*, int, int) {};
150  virtual int InternalGetNumberOfProcesses() { return 1; };
151  virtual int InternalGetLocalProcessId() { return 0; };
152  virtual void InternalBarrier() {};
153  unsigned long GetLocalSampleSize(vtkIdType, int);
154 
155 private:
156  vtkMaskPoints(const vtkMaskPoints&); // Not implemented.
157  void operator=(const vtkMaskPoints&); // Not implemented.
158 };
159 
160 #endif
int ProportionalMaximumNumberOfPoints
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int InternalGetNumberOfProcesses()
virtual void InternalBarrier()
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
vtkIdType MaximumNumberOfPoints
selectively filter points
Definition: vtkMaskPoints.h:42
vtkIdType Offset
virtual int InternalGetLocalProcessId()
virtual void InternalGather(unsigned long *, unsigned long *, int, int)
virtual void InternalScatter(unsigned long *, unsigned long *, int, int)