VTK
|
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 00132 00135 vtkSetMacro(OutputPointsPrecision,int); 00136 vtkGetMacro(OutputPointsPrecision,int); 00138 00139 protected: 00140 vtkMaskPoints(); 00141 ~vtkMaskPoints() {} 00142 00143 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00144 vtkInformationVector *); 00145 virtual int FillInputPortInformation(int port, vtkInformation *info); 00146 00147 int OnRatio; // every OnRatio point is on; all others are off. 00148 vtkIdType Offset; // offset (or starting point id) 00149 int RandomMode; // turn on/off randomization 00150 vtkIdType MaximumNumberOfPoints; 00151 int GenerateVertices; //generate polydata verts 00152 int SingleVertexPerCell; 00153 int RandomModeType; // choose the random sampling mode 00154 int ProportionalMaximumNumberOfPoints; 00155 int OutputPointsPrecision; 00156 00157 virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {} 00158 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {} 00159 virtual int InternalGetNumberOfProcesses() { return 1; }; 00160 virtual int InternalGetLocalProcessId() { return 0; }; 00161 virtual void InternalBarrier() {} 00162 unsigned long GetLocalSampleSize(vtkIdType, int); 00163 00164 private: 00165 vtkMaskPoints(const vtkMaskPoints&); // Not implemented. 00166 void operator=(const vtkMaskPoints&); // Not implemented. 00167 }; 00168 00169 #endif