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 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011     THIS CLASS IS PATENTED UNDER UNITED STATES PATENT NUMBER 4,710,876
00012     "System and Method for the Display of Surface Structures Contained
00013     Within the Interior Region of a Solid Body".
00014     Application of this software for commercial purposes requires 
00015     a license grant from GE. Contact:
00016 
00017         Carl B. Horton
00018         Sr. Counsel, Intellectual Property
00019         3000 N. Grandview Blvd., W-710
00020         Waukesha, WI  53188
00021         Phone:  (262) 513-4022
00022         E-Mail: Carl.Horton@med.ge.com
00023 
00024     for more information.
00025 
00026 Redistribution and use in source and binary forms, with or without
00027 modification, are permitted provided that the following conditions are met:
00028 
00029  * Redistributions of source code must retain the above copyright notice,
00030    this list of conditions and the following disclaimer.
00031 
00032  * Redistributions in binary form must reproduce the above copyright notice,
00033    this list of conditions and the following disclaimer in the documentation
00034    and/or other materials provided with the distribution.
00035 
00036  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00037    of any contributors may be used to endorse or promote products derived
00038    from this software without specific prior written permission.
00039 
00040  * Modified source versions must be plainly marked as such, and must not be
00041    misrepresented as being the original software.
00042 
00043 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00044 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00045 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00046 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00047 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00048 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00049 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00050 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00051 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00052 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00053 
00054 =========================================================================*/
00078 #ifndef __vtkMarchingCubes_h
00079 #define __vtkMarchingCubes_h
00080 
00081 #include "vtkStructuredPointsToPolyDataFilter.h"
00082 #include "vtkContourValues.h"
00083 
00084 class VTK_PATENTED_EXPORT vtkMarchingCubes : public vtkStructuredPointsToPolyDataFilter
00085 {
00086 public:
00087   static vtkMarchingCubes *New();
00088   vtkTypeMacro(vtkMarchingCubes,vtkStructuredPointsToPolyDataFilter);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00091   // Methods to set contour values
00092   void SetValue(int i, float value);
00093   float GetValue(int i);
00094   float *GetValues();
00095   void GetValues(float *contourValues);
00096   void SetNumberOfContours(int number);
00097   int GetNumberOfContours();
00098   void GenerateValues(int numContours, float range[2]);
00099   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00100 
00101   // Because we delegate to vtkContourValues
00102   unsigned long int GetMTime();
00103 
00105 
00109   vtkSetMacro(ComputeNormals,int);
00110   vtkGetMacro(ComputeNormals,int);
00111   vtkBooleanMacro(ComputeNormals,int);
00113 
00115 
00121   vtkSetMacro(ComputeGradients,int);
00122   vtkGetMacro(ComputeGradients,int);
00123   vtkBooleanMacro(ComputeGradients,int);
00125 
00127 
00128   vtkSetMacro(ComputeScalars,int);
00129   vtkGetMacro(ComputeScalars,int);
00130   vtkBooleanMacro(ComputeScalars,int);
00132 
00133   void SetLocator(vtkPointLocator *locator);
00134   vtkGetObjectMacro(Locator,vtkPointLocator);
00135 
00138   void CreateDefaultLocator();
00139 
00140 protected:
00141   vtkMarchingCubes();
00142   ~vtkMarchingCubes();
00143 
00144   void Execute();
00145 
00146   vtkContourValues *ContourValues;
00147   int ComputeNormals;
00148   int ComputeGradients;
00149   int ComputeScalars;
00150   vtkPointLocator *Locator;
00151 private:
00152   vtkMarchingCubes(const vtkMarchingCubes&);  // Not implemented.
00153   void operator=(const vtkMarchingCubes&);  // Not implemented.
00154 };
00155 
00158 inline void vtkMarchingCubes::SetValue(int i, float value)
00159 {this->ContourValues->SetValue(i,value);}
00160 
00162 
00163 inline float vtkMarchingCubes::GetValue(int i)
00164 {return this->ContourValues->GetValue(i);}
00166 
00168 
00170 inline float *vtkMarchingCubes::GetValues()
00171 {return this->ContourValues->GetValues();}
00173 
00177 inline void vtkMarchingCubes::GetValues(float *contourValues)
00178 {this->ContourValues->GetValues(contourValues);}
00179 
00183 inline void vtkMarchingCubes::SetNumberOfContours(int number)
00184 {this->ContourValues->SetNumberOfContours(number);}
00185 
00187 
00188 inline int vtkMarchingCubes::GetNumberOfContours()
00189 {return this->ContourValues->GetNumberOfContours();}
00191 
00193 
00195 inline void vtkMarchingCubes::GenerateValues(int numContours, float range[2])
00196 {this->ContourValues->GenerateValues(numContours, range);}
00198 
00200 
00202 inline void vtkMarchingCubes::GenerateValues(int numContours, float
00203                                              rangeStart, float rangeEnd)
00204 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00206 
00207 #endif
00208 
00209 

Generated on Thu Mar 28 14:19:31 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001