VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Generic/vtkGenericContourFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGenericContourFilter.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00045 #ifndef vtkGenericContourFilter_h
00046 #define vtkGenericContourFilter_h
00047 
00048 #include "vtkFiltersGenericModule.h" // For export macro
00049 #include "vtkPolyDataAlgorithm.h"
00050 
00051 class vtkContourValues;
00052 class vtkIncrementalPointLocator;
00053 class vtkPointData;
00054 class vtkCellData;
00055 
00056 class VTKFILTERSGENERIC_EXPORT vtkGenericContourFilter : public vtkPolyDataAlgorithm
00057 {
00058 public:
00059   vtkTypeMacro(vtkGenericContourFilter,
00060                        vtkPolyDataAlgorithm);
00061 
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00066   static vtkGenericContourFilter *New();
00067 
00068   //BTX
00069   typedef double PointType[3];  // Arbitrary definition of a point
00070   //ETX
00071 
00073 
00074   void SetValue(int i, float value);
00075   double GetValue(int i);
00076   double *GetValues();
00077   void GetValues(double *contourValues);
00078   void SetNumberOfContours(int number);
00079   int GetNumberOfContours();
00080   void GenerateValues(int numContours, double range[2]);
00081   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00083 
00085   unsigned long GetMTime();
00086 
00088 
00092   vtkSetMacro(ComputeNormals,int);
00093   vtkGetMacro(ComputeNormals,int);
00094   vtkBooleanMacro(ComputeNormals,int);
00096 
00098 
00104   vtkSetMacro(ComputeGradients,int);
00105   vtkGetMacro(ComputeGradients,int);
00106   vtkBooleanMacro(ComputeGradients,int);
00108 
00110 
00111   vtkSetMacro(ComputeScalars,int);
00112   vtkGetMacro(ComputeScalars,int);
00113   vtkBooleanMacro(ComputeScalars,int);
00115 
00117 
00119   void SetLocator(vtkIncrementalPointLocator *locator);
00120   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00122 
00125   void CreateDefaultLocator();
00126 
00128 
00131   vtkGetStringMacro(InputScalarsSelection);
00132   virtual void SelectInputScalars(const char *fieldName);
00134 
00135 protected:
00136   vtkGenericContourFilter();
00137   ~vtkGenericContourFilter();
00138 
00139   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00140 
00141   int FillInputPortInformation(int, vtkInformation*);
00142 
00143   vtkContourValues *ContourValues;
00144   int ComputeNormals;
00145   int ComputeGradients;
00146   int ComputeScalars;
00147   vtkIncrementalPointLocator *Locator;
00148 
00149   char *InputScalarsSelection;
00150   vtkSetStringMacro(InputScalarsSelection);
00151 
00152   // Used internal by vtkGenericAdaptorCell::Contour()
00153   vtkPointData *InternalPD;
00154   vtkPointData *SecondaryPD;
00155   vtkCellData  *SecondaryCD;
00156 
00157 private:
00158   vtkGenericContourFilter(const vtkGenericContourFilter&);  // Not implemented.
00159   void operator=(const vtkGenericContourFilter&);  // Not implemented.
00160 };
00161 #endif