00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00061
#ifndef __vtkContourFilter_h
00062
#define __vtkContourFilter_h
00063
00064
#include "vtkDataSetToPolyDataFilter.h"
00065
00066
#include "vtkContourValues.h"
00067
00068
class vtkPointLocator;
00069
class vtkScalarTree;
00070
00071 class VTK_GRAPHICS_EXPORT vtkContourFilter :
public vtkDataSetToPolyDataFilter
00072 {
00073
public:
00074 vtkTypeRevisionMacro(vtkContourFilter,
vtkDataSetToPolyDataFilter);
00075
void PrintSelf(ostream& os,
vtkIndent indent);
00076
00079
static vtkContourFilter *
New();
00080
00082
00083
void SetValue(
int i,
float value);
00084
float GetValue(
int i);
00085
float *GetValues();
00086
void GetValues(
float *contourValues);
00087
void SetNumberOfContours(
int number);
00088
int GetNumberOfContours();
00089
void GenerateValues(
int numContours,
float range[2]);
00090
void GenerateValues(
int numContours,
float rangeStart,
float rangeEnd);
00092
00094
unsigned long GetMTime();
00095
00097
00101 vtkSetMacro(ComputeNormals,
int);
00102 vtkGetMacro(ComputeNormals,
int);
00103 vtkBooleanMacro(ComputeNormals,
int);
00105
00107
00113 vtkSetMacro(ComputeGradients,
int);
00114 vtkGetMacro(ComputeGradients,
int);
00115 vtkBooleanMacro(ComputeGradients,
int);
00117
00119
00120 vtkSetMacro(ComputeScalars,
int);
00121 vtkGetMacro(ComputeScalars,
int);
00122 vtkBooleanMacro(ComputeScalars,
int);
00124
00126
00127 vtkSetMacro(UseScalarTree,
int);
00128 vtkGetMacro(UseScalarTree,
int);
00129 vtkBooleanMacro(UseScalarTree,
int);
00131
00133
00134
virtual void SetScalarTree(
vtkScalarTree*);
00135 vtkGetObjectMacro(ScalarTree,
vtkScalarTree);
00137
00139
00141
void SetLocator(
vtkPointLocator *locator);
00142 vtkGetObjectMacro(Locator,
vtkPointLocator);
00144
00147
void CreateDefaultLocator();
00148
00149
protected:
00150 vtkContourFilter();
00151 ~vtkContourFilter();
00152
00153
void Execute();
00154
00155 vtkContourValues *ContourValues;
00156 int ComputeNormals;
00157 int ComputeGradients;
00158 int ComputeScalars;
00159 vtkPointLocator *Locator;
00160 int UseScalarTree;
00161 vtkScalarTree *ScalarTree;
00162
00163 char *InputScalarsSelection;
00164 vtkSetStringMacro(InputScalarsSelection);
00165
00166
00167
00168
00169
00170
friend class vtkKitwareContourFilter;
00171
00173
00176 vtkGetStringMacro(InputScalarsSelection);
00177 virtual void SelectInputScalars(
const char *fieldName)
00178 {this->SetInputScalarsSelection(fieldName);}
00180
00181
00182
00183
private:
00184 vtkContourFilter(
const vtkContourFilter&);
00185
void operator=(
const vtkContourFilter&);
00186 };
00187
00190 inline void vtkContourFilter::SetValue(
int i,
float value)
00191 {this->
ContourValues->
SetValue(i,value);}
00192
00194
00195 inline float vtkContourFilter::GetValue(
int i)
00196 {
return this->
ContourValues->
GetValue(i);}
00198
00200
00202 inline float *
vtkContourFilter::GetValues()
00203 {
return this->
ContourValues->
GetValues();}
00205
00209 inline void vtkContourFilter::GetValues(
float *contourValues)
00210 {this->
ContourValues->
GetValues(contourValues);}
00211
00215 inline void vtkContourFilter::SetNumberOfContours(
int number)
00216 {this->
ContourValues->
SetNumberOfContours(number);}
00217
00219
00220 inline int vtkContourFilter::GetNumberOfContours()
00221 {
return this->
ContourValues->
GetNumberOfContours();}
00223
00225
00227 inline void vtkContourFilter::GenerateValues(
int numContours,
float range[2])
00228 {this->
ContourValues->
GenerateValues(numContours, range);}
00230
00232
00234 inline void vtkContourFilter::GenerateValues(
int numContours,
float
00235 rangeStart,
float rangeEnd)
00236 {this->
ContourValues->
GenerateValues(numContours, rangeStart, rangeEnd);}
00238
00239
00240
#endif
00241
00242