VTK
dox/Graphics/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 "vtkPolyDataAlgorithm.h"
00056 
00057 #include "vtkContourValues.h" // Needed for inline methods
00058 
00059 class vtkIncrementalPointLocator;
00060 class vtkScalarTree;
00061 class vtkSynchronizedTemplates2D;
00062 class vtkSynchronizedTemplates3D;
00063 class vtkGridSynchronizedTemplates3D;
00064 class vtkRectilinearSynchronizedTemplates;
00065 
00066 class VTK_GRAPHICS_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm
00067 {
00068 public:
00069   vtkTypeMacro(vtkContourFilter,vtkPolyDataAlgorithm);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00074   static vtkContourFilter *New();
00075 
00077 
00078   void SetValue(int i, double value);
00079   double GetValue(int i);
00080   double *GetValues();
00081   void GetValues(double *contourValues);
00082   void SetNumberOfContours(int number);
00083   int GetNumberOfContours();
00084   void GenerateValues(int numContours, double range[2]);
00085   void GenerateValues(int numContours, double rangeStart, double 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 
00129   virtual void SetScalarTree(vtkScalarTree*);
00130   vtkGetObjectMacro(ScalarTree,vtkScalarTree);
00132 
00134 
00136   void SetLocator(vtkIncrementalPointLocator *locator);
00137   vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
00139 
00142   void CreateDefaultLocator();
00143 
00145 
00148   void SetArrayComponent( int );
00149   int  GetArrayComponent();
00151 
00153 
00154   virtual int ProcessRequest(vtkInformation*,
00155                              vtkInformationVector**,
00156                              vtkInformationVector*);
00158 
00159 protected:
00160   vtkContourFilter();
00161   ~vtkContourFilter();
00162 
00163   virtual void ReportReferences(vtkGarbageCollector*);
00164 
00165   virtual int RequestData(vtkInformation* request,
00166                           vtkInformationVector** inputVector,
00167                           vtkInformationVector* outputVector);
00168   virtual int RequestUpdateExtent(vtkInformation*,
00169                                   vtkInformationVector**,
00170                                   vtkInformationVector*);
00171   virtual int FillInputPortInformation(int port, vtkInformation *info);
00172 
00173   vtkContourValues *ContourValues;
00174   int ComputeNormals;
00175   int ComputeGradients;
00176   int ComputeScalars;
00177   vtkIncrementalPointLocator *Locator;
00178   int UseScalarTree;
00179   vtkScalarTree *ScalarTree;
00180   
00181   vtkSynchronizedTemplates2D *SynchronizedTemplates2D;
00182   vtkSynchronizedTemplates3D *SynchronizedTemplates3D;
00183   vtkGridSynchronizedTemplates3D *GridSynchronizedTemplates;
00184   vtkRectilinearSynchronizedTemplates *RectilinearSynchronizedTemplates;
00185   
00186 private:
00187   vtkContourFilter(const vtkContourFilter&);  // Not implemented.
00188   void operator=(const vtkContourFilter&);  // Not implemented.
00189 };
00190 
00192 
00194 inline void vtkContourFilter::SetValue(int i, double value)
00195 {this->ContourValues->SetValue(i,value);}
00197 
00199 
00200 inline double vtkContourFilter::GetValue(int i)
00201 {return this->ContourValues->GetValue(i);}
00203 
00205 
00207 inline double *vtkContourFilter::GetValues()
00208 {return this->ContourValues->GetValues();}
00210 
00212 
00215 inline void vtkContourFilter::GetValues(double *contourValues)
00216 {this->ContourValues->GetValues(contourValues);}
00218 
00220 
00223 inline void vtkContourFilter::SetNumberOfContours(int number)
00224 {this->ContourValues->SetNumberOfContours(number);}
00226 
00228 
00229 inline int vtkContourFilter::GetNumberOfContours()
00230 {return this->ContourValues->GetNumberOfContours();}
00232 
00234 
00236 inline void vtkContourFilter::GenerateValues(int numContours, double range[2])
00237 {this->ContourValues->GenerateValues(numContours, range);}
00239 
00241 
00243 inline void vtkContourFilter::GenerateValues(int numContours, double
00244                                              rangeStart, double rangeEnd)
00245 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00247 
00248 
00249 #endif
00250 
00251