VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkGeometryFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeometryFilter.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 =========================================================================*/
58 #ifndef __vtkGeometryFilter_h
59 #define __vtkGeometryFilter_h
60 
61 #include "vtkFiltersGeometryModule.h" // For export macro
62 #include "vtkPolyDataAlgorithm.h"
63 
64 class vtkIncrementalPointLocator;
65 
66 class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
67 {
68 public:
69  static vtkGeometryFilter *New();
70  vtkTypeMacro(vtkGeometryFilter,vtkPolyDataAlgorithm);
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
74 
75  vtkSetMacro(PointClipping,int);
76  vtkGetMacro(PointClipping,int);
77  vtkBooleanMacro(PointClipping,int);
79 
81 
82  vtkSetMacro(CellClipping,int);
83  vtkGetMacro(CellClipping,int);
84  vtkBooleanMacro(CellClipping,int);
86 
88 
89  vtkSetMacro(ExtentClipping,int);
90  vtkGetMacro(ExtentClipping,int);
91  vtkBooleanMacro(ExtentClipping,int);
93 
95 
96  vtkSetClampMacro(PointMinimum,vtkIdType,0,VTK_ID_MAX);
97  vtkGetMacro(PointMinimum,vtkIdType);
99 
101 
102  vtkSetClampMacro(PointMaximum,vtkIdType,0,VTK_ID_MAX);
103  vtkGetMacro(PointMaximum,vtkIdType);
105 
107 
108  vtkSetClampMacro(CellMinimum,vtkIdType,0,VTK_ID_MAX);
109  vtkGetMacro(CellMinimum,vtkIdType);
111 
113 
114  vtkSetClampMacro(CellMaximum,vtkIdType,0,VTK_ID_MAX);
115  vtkGetMacro(CellMaximum,vtkIdType);
117 
119 
121  void SetExtent(double xMin, double xMax, double yMin, double yMax,
122  double zMin, double zMax);
124 
126 
128  void SetExtent(double extent[6]);
129  double *GetExtent() { return this->Extent;};
131 
133 
136  vtkSetMacro(Merging,int);
137  vtkGetMacro(Merging,int);
138  vtkBooleanMacro(Merging,int);
140 
142 
144  void SetLocator(vtkIncrementalPointLocator *locator);
145  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
147 
149  void CreateDefaultLocator();
150 
152  unsigned long GetMTime();
153 
154 protected:
157 
158  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
159  virtual int FillInputPortInformation(int port, vtkInformation *info);
160 
161  //special cases for performance
162  void PolyDataExecute(vtkDataSet *, vtkPolyData *, vtkInformation *);
163  void UnstructuredGridExecute(vtkDataSet *, vtkPolyData *, vtkInformation *);
164  void StructuredGridExecute(vtkDataSet *, vtkPolyData *, vtkInformation *);
165  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
166 
167  vtkIdType PointMaximum;
168  vtkIdType PointMinimum;
169  vtkIdType CellMinimum;
170  vtkIdType CellMaximum;
171  double Extent[6];
175 
176  int Merging;
177  vtkIncrementalPointLocator *Locator;
178 private:
179  vtkGeometryFilter(const vtkGeometryFilter&); // Not implemented.
180  void operator=(const vtkGeometryFilter&); // Not implemented.
181 };
182 
183 #endif
184 
185 
extract geometry from data (or convert data to polygonal type)
vtkIncrementalPointLocator * Locator