VTK
dox/Filters/Core/vtkMaskPoints.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMaskPoints.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00036 #ifndef __vtkMaskPoints_h
00037 #define __vtkMaskPoints_h
00038 
00039 #include "vtkFiltersCoreModule.h" // For export macro
00040 #include "vtkPolyDataAlgorithm.h"
00041 
00042 class VTKFILTERSCORE_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm
00043 {
00044 public:
00045   static vtkMaskPoints *New();
00046   vtkTypeMacro(vtkMaskPoints,vtkPolyDataAlgorithm);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00051   vtkSetClampMacro(OnRatio,int,1,VTK_INT_MAX);
00052   vtkGetMacro(OnRatio,int);
00054 
00056 
00058   vtkSetClampMacro(MaximumNumberOfPoints,vtkIdType,0,VTK_ID_MAX);
00059   vtkGetMacro(MaximumNumberOfPoints,vtkIdType);
00061 
00063 
00064   vtkSetClampMacro(Offset,vtkIdType,0,VTK_ID_MAX);
00065   vtkGetMacro(Offset,vtkIdType);
00067 
00069 
00070   vtkSetMacro(RandomMode,int);
00071   vtkGetMacro(RandomMode,int);
00072   vtkBooleanMacro(RandomMode,int);
00074 
00076 
00093   vtkSetClampMacro(RandomModeType, int, 0, 2);
00094   vtkGetMacro(RandomModeType, int);
00096 
00098 
00107   vtkSetMacro(ProportionalMaximumNumberOfPoints, int);
00108   vtkGetMacro(ProportionalMaximumNumberOfPoints, int);
00109   vtkBooleanMacro(ProportionalMaximumNumberOfPoints, int);
00111 
00113 
00117   vtkSetMacro(GenerateVertices,int);
00118   vtkGetMacro(GenerateVertices,int);
00119   vtkBooleanMacro(GenerateVertices,int);
00121 
00123 
00126   vtkSetMacro(SingleVertexPerCell,int);
00127   vtkGetMacro(SingleVertexPerCell,int);
00128   vtkBooleanMacro(SingleVertexPerCell,int);
00130 
00131 protected:
00132   vtkMaskPoints();
00133   ~vtkMaskPoints() {};
00134 
00135   virtual int RequestData(vtkInformation *, vtkInformationVector **,
00136                           vtkInformationVector *);
00137   virtual int FillInputPortInformation(int port, vtkInformation *info);
00138 
00139   int OnRatio;     // every OnRatio point is on; all others are off.
00140   vtkIdType Offset;      // offset (or starting point id)
00141   int RandomMode;  // turn on/off randomization
00142   vtkIdType MaximumNumberOfPoints;
00143   int GenerateVertices; //generate polydata verts
00144   int SingleVertexPerCell;
00145   int RandomModeType; // choose the random sampling mode
00146   int ProportionalMaximumNumberOfPoints;
00147 
00148   virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {};
00149   virtual void InternalGather(unsigned long*, unsigned long*, int, int) {};
00150   virtual int InternalGetNumberOfProcesses() { return 1; };
00151   virtual int InternalGetLocalProcessId() { return 0; };
00152   virtual void InternalBarrier() {};
00153   unsigned long GetLocalSampleSize(vtkIdType, int);
00154 
00155 private:
00156   vtkMaskPoints(const vtkMaskPoints&);  // Not implemented.
00157   void operator=(const vtkMaskPoints&);  // Not implemented.
00158 };
00159 
00160 #endif