00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00055
#ifndef __vtkContourGrid_h
00056
#define __vtkContourGrid_h
00057
00058
#include "vtkUnstructuredGridToPolyDataFilter.h"
00059
00060
#include "vtkContourValues.h"
00061
00062
class vtkEdgeTable;
00063
class vtkPointLocator;
00064
class vtkScalarTree;
00065
00066 class VTK_GRAPHICS_EXPORT vtkContourGrid :
public vtkUnstructuredGridToPolyDataFilter
00067 {
00068
public:
00069 vtkTypeRevisionMacro(vtkContourGrid,
vtkUnstructuredGridToPolyDataFilter);
00070
void PrintSelf(ostream& os,
vtkIndent indent);
00071
00074
static vtkContourGrid *
New();
00075
00077
00078
void SetValue(
int i,
float value);
00079
float GetValue(
int i);
00080
float *GetValues();
00081
void GetValues(
float *contourValues);
00082
void SetNumberOfContours(
int number);
00083
int GetNumberOfContours();
00084
void GenerateValues(
int numContours,
float range[2]);
00085
void GenerateValues(
int numContours,
float rangeStart,
float rangeEnd);
00087
00089
unsigned long GetMTime();
00090
00092
00096 vtkSetMacro(ComputeNormals,
int);
00097 vtkGetMacro(ComputeNormals,
int);
00098 vtkBooleanMacro(ComputeNormals,
int);
00100
00102
00108 vtkSetMacro(ComputeGradients,
int);
00109 vtkGetMacro(ComputeGradients,
int);
00110 vtkBooleanMacro(ComputeGradients,
int);
00112
00114
00115 vtkSetMacro(ComputeScalars,
int);
00116 vtkGetMacro(ComputeScalars,
int);
00117 vtkBooleanMacro(ComputeScalars,
int);
00119
00121
00122 vtkSetMacro(UseScalarTree,
int);
00123 vtkGetMacro(UseScalarTree,
int);
00124 vtkBooleanMacro(UseScalarTree,
int);
00126
00128
00130
void SetLocator(
vtkPointLocator *locator);
00131 vtkGetObjectMacro(Locator,
vtkPointLocator);
00133
00136
void CreateDefaultLocator();
00137
00138
protected:
00139 vtkContourGrid();
00140 ~vtkContourGrid();
00141
00142
00143
00144
00145
00146
friend class vtkContourFilter;
00147
00149
00152 vtkGetStringMacro(InputScalarsSelection);
00153 void SelectInputScalars(
const char *fieldName)
00154 {this->SetInputScalarsSelection(fieldName);}
00156
00157
00158
00159
void Execute();
00160
00161 vtkContourValues *ContourValues;
00162 int ComputeNormals;
00163 int ComputeGradients;
00164 int ComputeScalars;
00165 vtkPointLocator *Locator;
00166 int UseScalarTree;
00167 vtkScalarTree *ScalarTree;
00168 vtkEdgeTable *EdgeTable;
00169
00170 char *InputScalarsSelection;
00171 vtkSetStringMacro(InputScalarsSelection);
00172
00173
private:
00174 vtkContourGrid(
const vtkContourGrid&);
00175
void operator=(
const vtkContourGrid&);
00176 };
00177
00180 inline void vtkContourGrid::SetValue(
int i,
float value)
00181 {this->
ContourValues->
SetValue(i,value);}
00182
00184
00185 inline float vtkContourGrid::GetValue(
int i)
00186 {
return this->
ContourValues->
GetValue(i);}
00188
00190
00192 inline float *
vtkContourGrid::GetValues()
00193 {
return this->
ContourValues->
GetValues();}
00195
00199 inline void vtkContourGrid::GetValues(
float *contourValues)
00200 {this->
ContourValues->
GetValues(contourValues);}
00201
00205 inline void vtkContourGrid::SetNumberOfContours(
int number)
00206 {this->
ContourValues->
SetNumberOfContours(number);}
00207
00209
00210 inline int vtkContourGrid::GetNumberOfContours()
00211 {
return this->
ContourValues->
GetNumberOfContours();}
00213
00215
00217 inline void vtkContourGrid::GenerateValues(
int numContours,
float range[2])
00218 {this->
ContourValues->
GenerateValues(numContours, range);}
00220
00222
00224 inline void vtkContourGrid::GenerateValues(
int numContours,
float
00225 rangeStart,
float rangeEnd)
00226 {this->
ContourValues->
GenerateValues(numContours, rangeStart, rangeEnd);}
00228
00229
00230
#endif
00231
00232