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

Patented/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 
00015      THIS CLASS IS PATENTED UNDER UNITED STATES PATENT NUMBER 4,710,876
00016      "System and Method for the Display of Surface Structures Contained
00017      Within the Interior Region of a Solid Body".
00018      Application of this software for commercial purposes requires 
00019      a license grant from GE. Contact:
00020 
00021          Carl B. Horton
00022          Sr. Counsel, Intellectual Property
00023          3000 N. Grandview Blvd., W-710
00024          Waukesha, WI  53188
00025          Phone:  (262) 513-4022
00026          E-Mail: Carl.Horton@med.ge.com
00027 
00028      for more information.
00029 
00030 =========================================================================*/
00072 #ifndef __vtkMarchingContourFilter_h
00073 #define __vtkMarchingContourFilter_h
00074 
00075 #include "vtkDataSetToPolyDataFilter.h"
00076 
00077 #include "vtkContourValues.h" // Needed for direct access to ContourValues
00078 
00079 class vtkPointLocator;
00080 class vtkScalarTree;
00081 
00082 class VTK_PATENTED_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00083 {
00084 public:
00085   vtkTypeRevisionMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087 
00090   static vtkMarchingContourFilter *New();
00091 
00093 
00094   void SetValue(int i, double value);
00095   double GetValue(int i);
00096   double *GetValues();
00097   void GetValues(double *contourValues);
00098   void SetNumberOfContours(int number);
00099   int GetNumberOfContours();
00100   void GenerateValues(int numContours, double range[2]);
00101   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00103 
00105   unsigned long GetMTime();
00106 
00108 
00112   vtkSetMacro(ComputeNormals,int);
00113   vtkGetMacro(ComputeNormals,int);
00114   vtkBooleanMacro(ComputeNormals,int);
00116 
00118 
00124   vtkSetMacro(ComputeGradients,int);
00125   vtkGetMacro(ComputeGradients,int);
00126   vtkBooleanMacro(ComputeGradients,int);
00128 
00130 
00131   vtkSetMacro(ComputeScalars,int);
00132   vtkGetMacro(ComputeScalars,int);
00133   vtkBooleanMacro(ComputeScalars,int);
00135 
00137 
00138   vtkSetMacro(UseScalarTree,int);
00139   vtkGetMacro(UseScalarTree,int);
00140   vtkBooleanMacro(UseScalarTree,int);
00142 
00144 
00146   void SetLocator(vtkPointLocator *locator);
00147   vtkGetObjectMacro(Locator,vtkPointLocator);
00149 
00152   void CreateDefaultLocator();
00153 
00154 protected:
00155   vtkMarchingContourFilter();
00156   ~vtkMarchingContourFilter();
00157 
00158   void Execute();
00159 
00160   vtkContourValues *ContourValues;
00161   int ComputeNormals;
00162   int ComputeGradients;
00163   int ComputeScalars;
00164   vtkPointLocator *Locator;
00165   int UseScalarTree;
00166   vtkScalarTree *ScalarTree;
00167   
00168   //special contouring for structured points
00169   void StructuredPointsContour(int dim); 
00170   //special contouring for image data
00171   void ImageContour(int dim);
00172   //default if not structured data
00173   void DataSetContour();
00174 private:
00175   vtkMarchingContourFilter(const vtkMarchingContourFilter&);  // Not implemented.
00176   void operator=(const vtkMarchingContourFilter&);  // Not implemented.
00177 };
00178 
00181 inline void vtkMarchingContourFilter::SetValue(int i, double value)
00182 {
00183   this->ContourValues->SetValue(i,value);
00184 }
00185 
00187 inline double vtkMarchingContourFilter::GetValue(int i)
00188 {
00189   return this->ContourValues->GetValue(i);
00190 }
00191 
00194 inline double *vtkMarchingContourFilter::GetValues()
00195 {
00196   return this->ContourValues->GetValues();
00197 }
00198 
00202 inline void vtkMarchingContourFilter::GetValues(double *contourValues)
00203 {
00204   this->ContourValues->GetValues(contourValues);
00205 }
00206 
00210 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00211 {
00212   this->ContourValues->SetNumberOfContours(number);
00213 }
00214 
00216 inline int vtkMarchingContourFilter::GetNumberOfContours()
00217 {
00218   return this->ContourValues->GetNumberOfContours();
00219 }
00220 
00222 
00224 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00225                                                      double range[2])
00227 {
00228   this->ContourValues->GenerateValues(numContours, range);
00229 }
00230 
00232 
00234 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00235                                                      double rangeStart,
00236                                                      double rangeEnd)
00238 {
00239   this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
00240 }
00241 
00242 #endif