VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Core/vtkContourFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkContourFilter.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 =========================================================================*/
00052 #ifndef vtkContourFilter_h
00053 #define vtkContourFilter_h
00054 
00055 #include "vtkFiltersCoreModule.h" // For export macro
00056 #include "vtkPolyDataAlgorithm.h"
00057 
00058 #include "vtkContourValues.h" // Needed for inline methods
00059 
00060 class vtkIncrementalPointLocator;
00061 class vtkScalarTree;
00062 class vtkSynchronizedTemplates2D;
00063 class vtkSynchronizedTemplates3D;
00064 class vtkGridSynchronizedTemplates3D;
00065 class vtkRectilinearSynchronizedTemplates;
00066 class vtkCallbackCommand;
00067 
00068 class VTKFILTERSCORE_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm
00069 {
00070 public:
00071   vtkTypeMacro(vtkContourFilter,vtkPolyDataAlgorithm);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073 
00076   static vtkContourFilter *New();
00077 
00079 
00080   void SetValue(int i, double value);
00081   double GetValue(int i);
00082   double *GetValues();
00083   void GetValues(double *contourValues);
00084   void SetNumberOfContours(int number);
00085   int GetNumberOfContours();
00086   void GenerateValues(int numContours, double range[2]);
00087   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00089 
00091   unsigned long GetMTime();
00092 
00094 
00102   vtkSetMacro(ComputeNormals,int);
00103   vtkGetMacro(ComputeNormals,int);
00104   vtkBooleanMacro(ComputeNormals,int);
00106 
00108 
00114   vtkSetMacro(ComputeGradients,int);
00115   vtkGetMacro(ComputeGradients,int);
00116   vtkBooleanMacro(ComputeGradients,int);
00118 
00120 
00121   vtkSetMacro(ComputeScalars,int);
00122   vtkGetMacro(ComputeScalars,int);
00123   vtkBooleanMacro(ComputeScalars,int);
00125 
00127 
00128   vtkSetMacro(UseScalarTree,int);
00129   vtkGetMacro(UseScalarTree,int);
00130   vtkBooleanMacro(UseScalarTree,int);
00132 
00134 
00135   virtual void SetScalarTree(vtkScalarTree*);
00136   vtkGetObjectMacro(ScalarTree,vtkScalarTree);
00138 
00140 
00142   void SetLocator(vtkIncrementalPointLocator *locator);
00143   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00145 
00148   void CreateDefaultLocator();
00149 
00151 
00154   void SetArrayComponent( int );
00155   int  GetArrayComponent();
00157 
00158 
00160 
00165   vtkSetMacro(GenerateTriangles,int);
00166   vtkGetMacro(GenerateTriangles,int);
00167   vtkBooleanMacro(GenerateTriangles,int);
00169 
00171 
00174   void SetOutputPointsPrecision(int precision);
00175   int GetOutputPointsPrecision() const;
00177 
00178 protected:
00179   vtkContourFilter();
00180   ~vtkContourFilter();
00181 
00182   virtual void ReportReferences(vtkGarbageCollector*);
00183 
00184   virtual int RequestData(vtkInformation* request,
00185                           vtkInformationVector** inputVector,
00186                           vtkInformationVector* outputVector);
00187   virtual int RequestUpdateExtent(vtkInformation*,
00188                                   vtkInformationVector**,
00189                                   vtkInformationVector*);
00190   virtual int FillInputPortInformation(int port, vtkInformation *info);
00191 
00192   vtkContourValues *ContourValues;
00193   int ComputeNormals;
00194   int ComputeGradients;
00195   int ComputeScalars;
00196   vtkIncrementalPointLocator *Locator;
00197   int UseScalarTree;
00198   vtkScalarTree *ScalarTree;
00199   int OutputPointsPrecision;
00200   int GenerateTriangles;
00201 
00202   vtkSynchronizedTemplates2D *SynchronizedTemplates2D;
00203   vtkSynchronizedTemplates3D *SynchronizedTemplates3D;
00204   vtkGridSynchronizedTemplates3D *GridSynchronizedTemplates;
00205   vtkRectilinearSynchronizedTemplates *RectilinearSynchronizedTemplates;
00206   vtkCallbackCommand *InternalProgressCallbackCommand;
00207 
00208   static void InternalProgressCallbackFunction(vtkObject *caller,
00209                                                unsigned long eid,
00210                                                void *clientData,
00211                                                void *callData);
00212 
00213 private:
00214   vtkContourFilter(const vtkContourFilter&);  // Not implemented.
00215   void operator=(const vtkContourFilter&);  // Not implemented.
00216 };
00217 
00219 
00221 inline void vtkContourFilter::SetValue(int i, double value)
00222 {this->ContourValues->SetValue(i,value);}
00224 
00226 
00227 inline double vtkContourFilter::GetValue(int i)
00228 {return this->ContourValues->GetValue(i);}
00230 
00232 
00234 inline double *vtkContourFilter::GetValues()
00235 {return this->ContourValues->GetValues();}
00237 
00239 
00242 inline void vtkContourFilter::GetValues(double *contourValues)
00243 {this->ContourValues->GetValues(contourValues);}
00245 
00247 
00250 inline void vtkContourFilter::SetNumberOfContours(int number)
00251 {this->ContourValues->SetNumberOfContours(number);}
00253 
00255 
00256 inline int vtkContourFilter::GetNumberOfContours()
00257 {return this->ContourValues->GetNumberOfContours();}
00259 
00261 
00263 inline void vtkContourFilter::GenerateValues(int numContours, double range[2])
00264 {this->ContourValues->GenerateValues(numContours, range);}
00266 
00268 
00270 inline void vtkContourFilter::GenerateValues(int numContours, double
00271                                              rangeStart, double rangeEnd)
00272 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00274 
00275 
00276 #endif
00277 
00278