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 =========================================================================*/
48 #ifndef __vtkContourGrid_h
49 #define __vtkContourGrid_h
50 
51 #include "vtkPolyDataAlgorithm.h"
52 
53 #include "vtkContourValues.h" // Needed for inline methods
54 
55 class vtkEdgeTable;
56 class vtkScalarTree;
58 
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
67  static vtkContourGrid *New();
68 
70 
71  void SetValue(int i, double value);
72  double GetValue(int i);
73  double *GetValues();
74  void GetValues(double *contourValues);
75  void SetNumberOfContours(int number);
76  int GetNumberOfContours();
77  void GenerateValues(int numContours, double range[2]);
78  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
80 
82  unsigned long GetMTime();
83 
85 
89  vtkSetMacro(ComputeNormals,int);
90  vtkGetMacro(ComputeNormals,int);
91  vtkBooleanMacro(ComputeNormals,int);
93 
95 
101  vtkSetMacro(ComputeGradients,int);
102  vtkGetMacro(ComputeGradients,int);
103  vtkBooleanMacro(ComputeGradients,int);
105 
107 
108  vtkSetMacro(ComputeScalars,int);
109  vtkGetMacro(ComputeScalars,int);
110  vtkBooleanMacro(ComputeScalars,int);
112 
114 
115  vtkSetMacro(UseScalarTree,int);
116  vtkGetMacro(UseScalarTree,int);
117  vtkBooleanMacro(UseScalarTree,int);
119 
121 
123  void SetLocator(vtkIncrementalPointLocator *locator);
124  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
126 
129  void CreateDefaultLocator();
130 
131 protected:
132  vtkContourGrid();
133  ~vtkContourGrid();
134 
137 
146 
147 private:
148  vtkContourGrid(const vtkContourGrid&); // Not implemented.
149  void operator=(const vtkContourGrid&); // Not implemented.
150 };
151 
153 
155 inline void vtkContourGrid::SetValue(int i, double value)
156 {this->ContourValues->SetValue(i,value);}
158 
160 
161 inline double vtkContourGrid::GetValue(int i)
162 {return this->ContourValues->GetValue(i);}
164 
166 
169 {return this->ContourValues->GetValues();}
171 
173 
176 inline void vtkContourGrid::GetValues(double *contourValues)
177 {this->ContourValues->GetValues(contourValues);}
179 
181 
184 inline void vtkContourGrid::SetNumberOfContours(int number)
185 {this->ContourValues->SetNumberOfContours(number);}
187 
189 
191 {return this->ContourValues->GetNumberOfContours();}
193 
195 
197 inline void vtkContourGrid::GenerateValues(int numContours, double range[2])
198 {this->ContourValues->GenerateValues(numContours, range);}
200 
202 
204 inline void vtkContourGrid::GenerateValues(int numContours, double
205  rangeStart, double rangeEnd)
206 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
208 
209 
210 #endif
211 
212 
vtkEdgeTable * EdgeTable
helper object to manage setting and generating contour values
#define VTK_GRAPHICS_EXPORT
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)
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:38
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:37
double GetValue(int i)
organize data according to scalar values (used to accelerate contouring operations) ...
Definition: vtkScalarTree.h:45
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])