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 "vtkPolyDataAlgorithm.h"
40 
42 {
43 public:
44  static vtkMaskPoints *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
50  vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER);
51  vtkGetMacro(OnRatio,int);
53 
55 
57  vtkSetClampMacro(MaximumNumberOfPoints,vtkIdType,0,VTK_LARGE_ID);
58  vtkGetMacro(MaximumNumberOfPoints,vtkIdType);
60 
62 
63  vtkSetClampMacro(Offset,vtkIdType,0,VTK_LARGE_ID);
64  vtkGetMacro(Offset,vtkIdType);
66 
68 
69  vtkSetMacro(RandomMode,int);
70  vtkGetMacro(RandomMode,int);
71  vtkBooleanMacro(RandomMode,int);
73 
75 
92  vtkSetClampMacro(RandomModeType, int, 0, 2);
93  vtkGetMacro(RandomModeType, int);
95 
97 
106  vtkSetMacro(ProportionalMaximumNumberOfPoints, int);
107  vtkGetMacro(ProportionalMaximumNumberOfPoints, int);
108  vtkBooleanMacro(ProportionalMaximumNumberOfPoints, int);
110 
112 
116  vtkSetMacro(GenerateVertices,int);
117  vtkGetMacro(GenerateVertices,int);
118  vtkBooleanMacro(GenerateVertices,int);
120 
122 
125  vtkSetMacro(SingleVertexPerCell,int);
126  vtkGetMacro(SingleVertexPerCell,int);
127  vtkBooleanMacro(SingleVertexPerCell,int);
129 
130 protected:
131  vtkMaskPoints();
133 
137 
138  int OnRatio; // every OnRatio point is on; all others are off.
139  vtkIdType Offset; // offset (or starting point id)
140  int RandomMode; // turn on/off randomization
142  int GenerateVertices; //generate polydata verts
144  int RandomModeType; // choose the random sampling mode
146 
147  virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {};
148  virtual void InternalGather(unsigned long*, unsigned long*, int, int) {};
149  virtual int InternalGetNumberOfProcesses() { return 1; };
150  virtual int InternalGetLocalProcessId() { return 0; };
151  virtual void InternalBarrier() {};
152  unsigned long GetLocalSampleSize(vtkIdType, int);
153 
154 private:
155  vtkMaskPoints(const vtkMaskPoints&); // Not implemented.
156  void operator=(const vtkMaskPoints&); // Not implemented.
157 };
158 
159 #endif