00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00054 #ifndef __vtkGenericContourFilter_h
00055 #define __vtkGenericContourFilter_h
00056
00057 #include "vtkPolyDataAlgorithm.h"
00058
00059 class vtkContourValues;
00060 class vtkPointLocator;
00061 class vtkPointData;
00062 class vtkCellData;
00063
00064 class VTK_GENERIC_FILTERING_EXPORT vtkGenericContourFilter : public vtkPolyDataAlgorithm
00065 {
00066 public:
00067 vtkTypeRevisionMacro(vtkGenericContourFilter,
00068 vtkPolyDataAlgorithm);
00069
00070 void PrintSelf(ostream& os, vtkIndent indent);
00071
00074 static vtkGenericContourFilter *New();
00075
00076
00077 typedef double PointType[3];
00078
00079
00081
00082 void SetValue(int i, float value);
00083 double GetValue(int i);
00084 double *GetValues();
00085 void GetValues(double *contourValues);
00086 void SetNumberOfContours(int number);
00087 int GetNumberOfContours();
00088 void GenerateValues(int numContours, double range[2]);
00089 void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00091
00093 unsigned long GetMTime();
00094
00096
00100 vtkSetMacro(ComputeNormals,int);
00101 vtkGetMacro(ComputeNormals,int);
00102 vtkBooleanMacro(ComputeNormals,int);
00104
00106
00112 vtkSetMacro(ComputeGradients,int);
00113 vtkGetMacro(ComputeGradients,int);
00114 vtkBooleanMacro(ComputeGradients,int);
00116
00118
00119 vtkSetMacro(ComputeScalars,int);
00120 vtkGetMacro(ComputeScalars,int);
00121 vtkBooleanMacro(ComputeScalars,int);
00123
00125
00127 void SetLocator(vtkPointLocator *locator);
00128 vtkGetObjectMacro(Locator,vtkPointLocator);
00130
00133 void CreateDefaultLocator();
00134
00136
00139 vtkGetStringMacro(InputScalarsSelection);
00140 virtual void SelectInputScalars(const char *fieldName);
00142
00143 protected:
00144 vtkGenericContourFilter();
00145 ~vtkGenericContourFilter();
00146
00147 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00148
00149 int FillInputPortInformation(int, vtkInformation*);
00150
00151 vtkContourValues *ContourValues;
00152 int ComputeNormals;
00153 int ComputeGradients;
00154 int ComputeScalars;
00155 vtkPointLocator *Locator;
00156
00157 char *InputScalarsSelection;
00158 vtkSetStringMacro(InputScalarsSelection);
00159
00160
00161 vtkPointData *internalPD;
00162 vtkPointData *secondaryPD;
00163 vtkCellData *secondaryCD;
00164
00165 private:
00166 vtkGenericContourFilter(const vtkGenericContourFilter&);
00167 void operator=(const vtkGenericContourFilter&);
00168 };
00169 #endif