Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkMarchingContourFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMarchingContourFilter.h,v $
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 =========================================================================*/
00056 #ifndef __vtkMarchingContourFilter_h
00057 #define __vtkMarchingContourFilter_h
00058 
00059 #include "vtkPolyDataAlgorithm.h"
00060 
00061 #include "vtkContourValues.h" // Needed for direct access to ContourValues
00062 
00063 class vtkPointLocator;
00064 class vtkScalarTree;
00065 
00066 class VTK_GRAPHICS_EXPORT vtkMarchingContourFilter : public vtkPolyDataAlgorithm
00067 {
00068 public:
00069   vtkTypeRevisionMacro(vtkMarchingContourFilter,vtkPolyDataAlgorithm);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00074   static vtkMarchingContourFilter *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 
00130   void SetLocator(vtkPointLocator *locator);
00131   vtkGetObjectMacro(Locator,vtkPointLocator);
00133 
00136   void CreateDefaultLocator();
00137 
00138 protected:
00139   vtkMarchingContourFilter();
00140   ~vtkMarchingContourFilter();
00141 
00142   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00143   virtual int FillInputPortInformation(int port, vtkInformation *info);
00144 
00145   vtkContourValues *ContourValues;
00146   int ComputeNormals;
00147   int ComputeGradients;
00148   int ComputeScalars;
00149   vtkPointLocator *Locator;
00150   int UseScalarTree;
00151   vtkScalarTree *ScalarTree;
00152   
00153   //special contouring for structured points
00154   void StructuredPointsContour(int dim, vtkDataSet *input, vtkPolyData *output); 
00155   //special contouring for image data
00156   void ImageContour(int dim, vtkDataSet *input, vtkPolyData *output);
00157   //default if not structured data
00158   void DataSetContour(vtkDataSet *input, vtkPolyData *output);
00159 private:
00160   vtkMarchingContourFilter(const vtkMarchingContourFilter&);  // Not implemented.
00161   void operator=(const vtkMarchingContourFilter&);  // Not implemented.
00162 };
00163 
00166 inline void vtkMarchingContourFilter::SetValue(int i, double value)
00167 {
00168   this->ContourValues->SetValue(i,value);
00169 }
00170 
00172 inline double vtkMarchingContourFilter::GetValue(int i)
00173 {
00174   return this->ContourValues->GetValue(i);
00175 }
00176 
00179 inline double *vtkMarchingContourFilter::GetValues()
00180 {
00181   return this->ContourValues->GetValues();
00182 }
00183 
00187 inline void vtkMarchingContourFilter::GetValues(double *contourValues)
00188 {
00189   this->ContourValues->GetValues(contourValues);
00190 }
00191 
00195 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00196 {
00197   this->ContourValues->SetNumberOfContours(number);
00198 }
00199 
00201 inline int vtkMarchingContourFilter::GetNumberOfContours()
00202 {
00203   return this->ContourValues->GetNumberOfContours();
00204 }
00205 
00207 
00209 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00210                                                      double range[2])
00212 {
00213   this->ContourValues->GenerateValues(numContours, range);
00214 }
00215 
00217 
00219 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00220                                                      double rangeStart,
00221                                                      double rangeEnd)
00223 {
00224   this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
00225 }
00226 
00227 #endif

Generated on Mon Jan 21 23:07:25 2008 for VTK by  doxygen 1.4.3-20050530