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 "vtkPolyDataAlgorithm.h" 00040 00041 class VTK_GRAPHICS_EXPORT vtkMaskPoints : public vtkPolyDataAlgorithm 00042 { 00043 public: 00044 static vtkMaskPoints *New(); 00045 vtkTypeMacro(vtkMaskPoints,vtkPolyDataAlgorithm); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00050 vtkSetClampMacro(OnRatio,int,1,VTK_LARGE_INTEGER); 00051 vtkGetMacro(OnRatio,int); 00053 00055 00057 vtkSetClampMacro(MaximumNumberOfPoints,vtkIdType,0,VTK_LARGE_ID); 00058 vtkGetMacro(MaximumNumberOfPoints,vtkIdType); 00060 00062 00063 vtkSetClampMacro(Offset,vtkIdType,0,VTK_LARGE_ID); 00064 vtkGetMacro(Offset,vtkIdType); 00066 00068 00069 vtkSetMacro(RandomMode,int); 00070 vtkGetMacro(RandomMode,int); 00071 vtkBooleanMacro(RandomMode,int); 00073 00075 00092 vtkSetClampMacro(RandomModeType, int, 0, 2); 00093 vtkGetMacro(RandomModeType, int); 00095 00097 00106 vtkSetMacro(ProportionalMaximumNumberOfPoints, int); 00107 vtkGetMacro(ProportionalMaximumNumberOfPoints, int); 00108 vtkBooleanMacro(ProportionalMaximumNumberOfPoints, int); 00110 00112 00116 vtkSetMacro(GenerateVertices,int); 00117 vtkGetMacro(GenerateVertices,int); 00118 vtkBooleanMacro(GenerateVertices,int); 00120 00122 00125 vtkSetMacro(SingleVertexPerCell,int); 00126 vtkGetMacro(SingleVertexPerCell,int); 00127 vtkBooleanMacro(SingleVertexPerCell,int); 00129 00130 protected: 00131 vtkMaskPoints(); 00132 ~vtkMaskPoints() {}; 00133 00134 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00135 vtkInformationVector *); 00136 virtual int FillInputPortInformation(int port, vtkInformation *info); 00137 00138 int OnRatio; // every OnRatio point is on; all others are off. 00139 vtkIdType Offset; // offset (or starting point id) 00140 int RandomMode; // turn on/off randomization 00141 vtkIdType MaximumNumberOfPoints; 00142 int GenerateVertices; //generate polydata verts 00143 int SingleVertexPerCell; 00144 int RandomModeType; // choose the random sampling mode 00145 int ProportionalMaximumNumberOfPoints; 00146 00147 virtual void InternalScatter(unsigned long*, unsigned long *, int, int) {}; 00148 virtual void InternalGather(unsigned long*, unsigned long*, int, int) {}; 00149 virtual int InternalGetNumberOfProcesses() { return 1; }; 00150 virtual int InternalGetLocalProcessId() { return 0; }; 00151 virtual void InternalBarrier() {}; 00152 unsigned long GetLocalSampleSize(vtkIdType, int); 00153 00154 private: 00155 vtkMaskPoints(const vtkMaskPoints&); // Not implemented. 00156 void operator=(const vtkMaskPoints&); // Not implemented. 00157 }; 00158 00159 #endif