VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkContourGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContourGrid.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 __vtkContourGrid_h
49 #define __vtkContourGrid_h
50 
51 #include "vtkFiltersCoreModule.h" // For export macro
52 #include "vtkPolyDataAlgorithm.h"
53 
54 #include "vtkContourValues.h" // Needed for inline methods
55 
56 class vtkEdgeTable;
57 class vtkScalarTree;
59 
60 class VTKFILTERSCORE_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
68  static vtkContourGrid *New();
69 
71 
72  void SetValue(int i, double value);
73  double GetValue(int i);
74  double *GetValues();
75  void GetValues(double *contourValues);
76  void SetNumberOfContours(int number);
77  int GetNumberOfContours();
78  void GenerateValues(int numContours, double range[2]);
79  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
81 
83  unsigned long GetMTime();
84 
86 
90  vtkSetMacro(ComputeNormals,int);
91  vtkGetMacro(ComputeNormals,int);
92  vtkBooleanMacro(ComputeNormals,int);
94 
96 
103  vtkSetMacro(ComputeGradients,int);
104  vtkGetMacro(ComputeGradients,int);
105  vtkBooleanMacro(ComputeGradients,int);
107 
109 
110  vtkSetMacro(ComputeScalars,int);
111  vtkGetMacro(ComputeScalars,int);
112  vtkBooleanMacro(ComputeScalars,int);
114 
116 
117  vtkSetMacro(UseScalarTree,int);
118  vtkGetMacro(UseScalarTree,int);
119  vtkBooleanMacro(UseScalarTree,int);
121 
123 
125  void SetLocator(vtkIncrementalPointLocator *locator);
126  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
128 
129 
131 
135  vtkSetMacro(GenerateTriangles,int);
136  vtkGetMacro(GenerateTriangles,int);
137  vtkBooleanMacro(GenerateTriangles,int);
139 
140 
143  void CreateDefaultLocator();
144 
146 
149  void SetOutputPointsPrecision(int precision);
150  int GetOutputPointsPrecision() const;
152 
153 protected:
154  vtkContourGrid();
155  ~vtkContourGrid();
156 
157  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
158  virtual int FillInputPortInformation(int port, vtkInformation *info);
159 
165 
170  vtkEdgeTable *EdgeTable;
171 
172 private:
173  vtkContourGrid(const vtkContourGrid&); // Not implemented.
174  void operator=(const vtkContourGrid&); // Not implemented.
175 };
176 
178 
180 inline void vtkContourGrid::SetValue(int i, double value)
181 {this->ContourValues->SetValue(i,value);}
183 
185 
186 inline double vtkContourGrid::GetValue(int i)
187 {return this->ContourValues->GetValue(i);}
189 
191 
194 {return this->ContourValues->GetValues();}
196 
198 
201 inline void vtkContourGrid::GetValues(double *contourValues)
202 {this->ContourValues->GetValues(contourValues);}
204 
206 
209 inline void vtkContourGrid::SetNumberOfContours(int number)
210 {this->ContourValues->SetNumberOfContours(number);}
212 
214 
216 {return this->ContourValues->GetNumberOfContours();}
218 
220 
222 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
223 {this->ContourValues->GenerateValues(numContours, range);}
225 
227 
229 inline void vtkContourGrid::GenerateValues(int numContours, double
230  rangeStart, double rangeEnd)
231 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
233 
234 
235 #endif
236 
237 
vtkEdgeTable * EdgeTable
helper object to manage setting and generating contour values
virtual int FillInputPortInformation(int port, vtkInformation *info)
generate isosurfaces/isolines from scalar values (specialized for unstructured grids) ...
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetNumberOfContours(const int number)
vtkContourValues * ContourValues
Abstract class in support of both point location and point insertion.
int GetNumberOfContours()
void GenerateValues(int numContours, double range[2])
double GetValue(int i)
void SetValue(int i, double value)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
double * GetValues()
Superclass for algorithms that produce only polydata as output.
double * GetValues()
double GetValue(int i)
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:46
vtkIncrementalPointLocator * Locator
void SetNumberOfContours(int number)
vtkScalarTree * ScalarTree
int GetNumberOfContours()
void SetValue(int i, double value)
void GenerateValues(int numContours, double range[2])