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

Patented/vtkMarchingCubes.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMarchingCubes.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 =========================================================================*/
00051 #ifndef __vtkMarchingCubes_h
00052 #define __vtkMarchingCubes_h
00053 
00054 #include "vtkStructuredPointsToPolyDataFilter.h"
00055 
00056 #include "vtkContourValues.h" // Needed for direct access to ContourValues
00057 
00058 class vtkPointLocator;
00059 
00060 class VTK_PATENTED_EXPORT vtkMarchingCubes : public vtkStructuredPointsToPolyDataFilter
00061 {
00062 public:
00063   static vtkMarchingCubes *New();
00064   vtkTypeRevisionMacro(vtkMarchingCubes,vtkStructuredPointsToPolyDataFilter);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066 
00067   // Methods to set contour values
00068   void SetValue(int i, double value);
00069   double GetValue(int i);
00070   double *GetValues();
00071   void GetValues(double *contourValues);
00072   void SetNumberOfContours(int number);
00073   int GetNumberOfContours();
00074   void GenerateValues(int numContours, double range[2]);
00075   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00076 
00077   // Because we delegate to vtkContourValues
00078   unsigned long int GetMTime();
00079 
00081 
00085   vtkSetMacro(ComputeNormals,int);
00086   vtkGetMacro(ComputeNormals,int);
00087   vtkBooleanMacro(ComputeNormals,int);
00089 
00091 
00097   vtkSetMacro(ComputeGradients,int);
00098   vtkGetMacro(ComputeGradients,int);
00099   vtkBooleanMacro(ComputeGradients,int);
00101 
00103 
00104   vtkSetMacro(ComputeScalars,int);
00105   vtkGetMacro(ComputeScalars,int);
00106   vtkBooleanMacro(ComputeScalars,int);
00108 
00110 
00112   void SetLocator(vtkPointLocator *locator);
00113   vtkGetObjectMacro(Locator,vtkPointLocator);
00115 
00118   void CreateDefaultLocator();
00119 
00120 protected:
00121   vtkMarchingCubes();
00122   ~vtkMarchingCubes();
00123 
00124   void Execute();
00125 
00126   vtkContourValues *ContourValues;
00127   int ComputeNormals;
00128   int ComputeGradients;
00129   int ComputeScalars;
00130   vtkPointLocator *Locator;
00131 private:
00132   vtkMarchingCubes(const vtkMarchingCubes&);  // Not implemented.
00133   void operator=(const vtkMarchingCubes&);  // Not implemented.
00134 };
00135 
00138 inline void vtkMarchingCubes::SetValue(int i, double value)
00139 {this->ContourValues->SetValue(i,value);}
00140 
00142 
00143 inline double vtkMarchingCubes::GetValue(int i)
00144 {return this->ContourValues->GetValue(i);}
00146 
00148 
00150 inline double *vtkMarchingCubes::GetValues()
00151 {return this->ContourValues->GetValues();}
00153 
00157 inline void vtkMarchingCubes::GetValues(double *contourValues)
00158 {this->ContourValues->GetValues(contourValues);}
00159 
00163 inline void vtkMarchingCubes::SetNumberOfContours(int number)
00164 {this->ContourValues->SetNumberOfContours(number);}
00165 
00167 
00168 inline int vtkMarchingCubes::GetNumberOfContours()
00169 {return this->ContourValues->GetNumberOfContours();}
00171 
00173 
00175 inline void vtkMarchingCubes::GenerateValues(int numContours, double range[2])
00176 {this->ContourValues->GenerateValues(numContours, range);}
00178 
00180 
00182 inline void vtkMarchingCubes::GenerateValues(int numContours, double
00183                                              rangeStart, double rangeEnd)
00184 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00186 
00187 #endif
00188 
00189