VTK
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 =========================================================================*/
51 #ifndef vtkContourGrid_h
52 #define vtkContourGrid_h
53 
54 #include "vtkFiltersCoreModule.h" // For export macro
55 #include "vtkPolyDataAlgorithm.h"
56 
57 #include "vtkContourValues.h" // Needed for inline methods
58 
59 class vtkEdgeTable;
60 class vtkScalarTree;
62 
64 {
65 public:
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
71  static vtkContourGrid *New();
72 
74 
75  void SetValue(int i, double value);
76  double GetValue(int i);
77  double *GetValues();
78  void GetValues(double *contourValues);
79  void SetNumberOfContours(int number);
80  int GetNumberOfContours();
81  void GenerateValues(int numContours, double range[2]);
82  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
84 
86  unsigned long GetMTime();
87 
89 
93  vtkSetMacro(ComputeNormals,int);
94  vtkGetMacro(ComputeNormals,int);
95  vtkBooleanMacro(ComputeNormals,int);
97 
99 
106  vtkSetMacro(ComputeGradients,int);
107  vtkGetMacro(ComputeGradients,int);
108  vtkBooleanMacro(ComputeGradients,int);
110 
112 
113  vtkSetMacro(ComputeScalars,int);
114  vtkGetMacro(ComputeScalars,int);
115  vtkBooleanMacro(ComputeScalars,int);
117 
119 
120  vtkSetMacro(UseScalarTree,int);
121  vtkGetMacro(UseScalarTree,int);
122  vtkBooleanMacro(UseScalarTree,int);
124 
126 
128  void SetLocator(vtkIncrementalPointLocator *locator);
129  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
131 
132 
134 
138  vtkSetMacro(GenerateTriangles,int);
139  vtkGetMacro(GenerateTriangles,int);
140  vtkBooleanMacro(GenerateTriangles,int);
142 
143 
146  void CreateDefaultLocator();
147 
149 
152  void SetOutputPointsPrecision(int precision);
153  int GetOutputPointsPrecision() const;
155 
156 protected:
157  vtkContourGrid();
158  ~vtkContourGrid();
159 
162 
168 
174 
175 private:
176  vtkContourGrid(const vtkContourGrid&); // Not implemented.
177  void operator=(const vtkContourGrid&); // Not implemented.
178 };
179 
181 
183 inline void vtkContourGrid::SetValue(int i, double value)
184 {this->ContourValues->SetValue(i,value);}
186 
188 
189 inline double vtkContourGrid::GetValue(int i)
190 {return this->ContourValues->GetValue(i);}
192 
194 
197 {return this->ContourValues->GetValues();}
199 
201 
204 inline void vtkContourGrid::GetValues(double *contourValues)
205 {this->ContourValues->GetValues(contourValues);}
207 
209 
212 inline void vtkContourGrid::SetNumberOfContours(int number)
213 {this->ContourValues->SetNumberOfContours(number);}
215 
217 
219 {return this->ContourValues->GetNumberOfContours();}
221 
223 
225 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
226 {this->ContourValues->GenerateValues(numContours, range);}
228 
230 
232 inline void vtkContourGrid::GenerateValues(int numContours, double
233  rangeStart, double rangeEnd)
234 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
236 
237 
238 #endif
239 
240 
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) ...
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetNumberOfContours(const int number)
#define VTKFILTERSCORE_EXPORT
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)
keep track of edges (edge is pair of integer id's)
Definition: vtkEdgeTable.h:39
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()
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
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
Store zero or more vtkInformation instances.
int GetNumberOfContours()
void SetValue(int i, double value)
void GenerateValues(int numContours, double range[2])