Patented/vtkMarchingCubes.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    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 =========================================================================*/
    00066 #ifndef __vtkMarchingCubes_h
    00067 #define __vtkMarchingCubes_h
    00068
    00069 #include "vtkStructuredPointsToPolyDataFilter.h"
    00070
    00071 #include "vtkContourValues.h" // Needed for direct access to ContourValues
    00072
    00073 class vtkPointLocator;
    00074
    00075 class VTK_PATENTED_EXPORT vtkMarchingCubes : public vtkStructuredPointsToPolyDataFilter
    00076 {
    00077 public:
    00078   static vtkMarchingCubes *New();
    00079   vtkTypeRevisionMacro(vtkMarchingCubes,vtkStructuredPointsToPolyDataFilter);
    00080   void PrintSelf(ostream& os, vtkIndent indent);
    00081
    00082   // Methods to set contour values
    00083   void SetValue(int i, float value);
    00084   float GetValue(int i);
    00085   float *GetValues();
    00086   void GetValues(float *contourValues);
    00087   void SetNumberOfContours(int number);
    00088   int GetNumberOfContours();
    00089   void GenerateValues(int numContours, float range[2]);
    00090   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
    00091
    00092   // Because we delegate to vtkContourValues
    00093   unsigned long int GetMTime();
    00094
    00096
    00100   vtkSetMacro(ComputeNormals,int);
    00101   vtkGetMacro(ComputeNormals,int);
    00102   vtkBooleanMacro(ComputeNormals,int);
    00104
    00106
    00112   vtkSetMacro(ComputeGradients,int);
    00113   vtkGetMacro(ComputeGradients,int);
    00114   vtkBooleanMacro(ComputeGradients,int);
    00116
    00118
    00119   vtkSetMacro(ComputeScalars,int);
    00120   vtkGetMacro(ComputeScalars,int);
    00121   vtkBooleanMacro(ComputeScalars,int);
    00123
    00125
    00127   void SetLocator(vtkPointLocator *locator);
    00128   vtkGetObjectMacro(Locator,vtkPointLocator);
    00130
    00133   void CreateDefaultLocator();
    00134
    00135 protected:
    00136   vtkMarchingCubes();
    00137   ~vtkMarchingCubes();
    00138
    00139   void Execute();
    00140
    00141   vtkContourValues *ContourValues;
    00142   int ComputeNormals;
    00143   int ComputeGradients;
    00144   int ComputeScalars;
    00145   vtkPointLocator *Locator;
    00146 private:
    00147   vtkMarchingCubes(const vtkMarchingCubes&);  // Not implemented.
    00148   void operator=(const vtkMarchingCubes&);  // Not implemented.
    00149 };
    00150
    00153 inline void vtkMarchingCubes::SetValue(int i, float value)
    00154 {this->ContourValues->SetValue(i,value);}
    00155
    00157
    00158 inline float vtkMarchingCubes::GetValue(int i)
    00159 {return this->ContourValues->GetValue(i);}
    00161
    00163
    00165 inline float *vtkMarchingCubes::GetValues()
    00166 {return this->ContourValues->GetValues();}
    00168
    00172 inline void vtkMarchingCubes::GetValues(float *contourValues)
    00173 {this->ContourValues->GetValues(contourValues);}
    00174
    00178 inline void vtkMarchingCubes::SetNumberOfContours(int number)
    00179 {this->ContourValues->SetNumberOfContours(number);}
    00180
    00182
    00183 inline int vtkMarchingCubes::GetNumberOfContours()
    00184 {return this->ContourValues->GetNumberOfContours();}
    00186
    00188
    00190 inline void vtkMarchingCubes::GenerateValues(int numContours, float range[2])
    00191 {this->ContourValues->GenerateValues(numContours, range);}
    00193
    00195
    00197 inline void vtkMarchingCubes::GenerateValues(int numContours, float
    00198                                              rangeStart, float rangeEnd)
    00199 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
    00201
    00202 #endif
    00203
    00204