VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkGenericCutter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericCutter.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 =========================================================================*/
48 #ifndef __vtkGenericCutter_h
49 #define __vtkGenericCutter_h
50 
51 #include "vtkFiltersGenericModule.h" // For export macro
52 #include "vtkPolyDataAlgorithm.h"
53 
54 class vtkContourValues;
55 
56 class vtkImplicitFunction;
57 class vtkIncrementalPointLocator;
58 class vtkPointData;
59 class vtkCellData;
60 
61 class VTKFILTERSGENERIC_EXPORT vtkGenericCutter : public vtkPolyDataAlgorithm
62 {
63 public:
64  vtkTypeMacro(vtkGenericCutter,vtkPolyDataAlgorithm);
65  void PrintSelf(ostream& os, vtkIndent indent);
66 
69  static vtkGenericCutter *New();
70 
73  void SetValue(int i, double value);
74 
76  double GetValue(int i);
77 
80  double *GetValues();
81 
85  void GetValues(double *contourValues);
86 
90  void SetNumberOfContours(int number);
91 
93  int GetNumberOfContours();
94 
97  void GenerateValues(int numContours, double range[2]);
98 
101  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
102 
105  unsigned long GetMTime();
106 
108 
109  virtual void SetCutFunction(vtkImplicitFunction*);
110  vtkGetObjectMacro(CutFunction,vtkImplicitFunction);
112 
114 
117  vtkSetMacro(GenerateCutScalars,int);
118  vtkGetMacro(GenerateCutScalars,int);
119  vtkBooleanMacro(GenerateCutScalars,int);
121 
123 
125  void SetLocator(vtkIncrementalPointLocator *locator);
126  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
128 
131  void CreateDefaultLocator();
132 
133 protected:
134  vtkGenericCutter(vtkImplicitFunction *cf=NULL);
135  ~vtkGenericCutter();
136 
138 
139  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
140  int FillInputPortInformation(int, vtkInformation*);
142 
143  vtkImplicitFunction *CutFunction;
144  vtkIncrementalPointLocator *Locator;
145  vtkContourValues *ContourValues;
147 
148  // Used internal by vtkGenericAdaptorCell::Contour()
149  vtkPointData *InternalPD;
150  vtkPointData *SecondaryPD;
151  vtkCellData *SecondaryCD;
152 
153 private:
154  vtkGenericCutter(const vtkGenericCutter&); // Not implemented.
155  void operator=(const vtkGenericCutter&); // Not implemented.
156 };
157 
158 #endif
159 
160 
cut a vtkGenericDataSet with an implicit function or scalar data
vtkCellData * SecondaryCD
vtkImplicitFunction * CutFunction
vtkContourValues * ContourValues
vtkPointData * InternalPD
vtkIncrementalPointLocator * Locator
vtkPointData * SecondaryPD