Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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   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         Jerald Roehling
00017         GE Licensing
00018         One Independence Way
00019         PO Box 2023
00020         Princeton, N.J. 08540
00021         phone 609-734-9823
00022         e-mail:Roehlinj@gerlmo.ge.com
00023     for more information.
00024 
00025 Redistribution and use in source and binary forms, with or without
00026 modification, are permitted provided that the following conditions are met:
00027 
00028  * Redistributions of source code must retain the above copyright notice,
00029    this list of conditions and the following disclaimer.
00030 
00031  * Redistributions in binary form must reproduce the above copyright notice,
00032    this list of conditions and the following disclaimer in the documentation
00033    and/or other materials provided with the distribution.
00034 
00035  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00036    of any contributors may be used to endorse or promote products derived
00037    from this software without specific prior written permission.
00038 
00039  * Modified source versions must be plainly marked as such, and must not be
00040    misrepresented as being the original software.
00041 
00042 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00043 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00044 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00045 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00046 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00047 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00048 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00049 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00050 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00051 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00052 
00053 =========================================================================*/
00097 #ifndef __vtkMarchingContourFilter_h
00098 #define __vtkMarchingContourFilter_h
00099 
00100 #include "vtkDataSetToPolyDataFilter.h"
00101 #include "vtkContourValues.h"
00102 
00103 class vtkScalarTree;
00104 
00105 class VTK_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00106 {
00107 public:
00108   vtkTypeMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00109   void PrintSelf(ostream& os, vtkIndent indent);
00110 
00113   static vtkMarchingContourFilter *New();
00114 
00116   void SetValue(int i, float value);
00117   float GetValue(int i);
00118   float *GetValues();
00119   void GetValues(float *contourValues);
00120   void SetNumberOfContours(int number);
00121   int GetNumberOfContours();
00122   void GenerateValues(int numContours, float range[2]);
00123   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00124 
00126   unsigned long GetMTime();
00127 
00132   vtkSetMacro(ComputeNormals,int);
00133   vtkGetMacro(ComputeNormals,int);
00134   vtkBooleanMacro(ComputeNormals,int);
00135 
00142   vtkSetMacro(ComputeGradients,int);
00143   vtkGetMacro(ComputeGradients,int);
00144   vtkBooleanMacro(ComputeGradients,int);
00145 
00147   vtkSetMacro(ComputeScalars,int);
00148   vtkGetMacro(ComputeScalars,int);
00149   vtkBooleanMacro(ComputeScalars,int);
00150 
00152   vtkSetMacro(UseScalarTree,int);
00153   vtkGetMacro(UseScalarTree,int);
00154   vtkBooleanMacro(UseScalarTree,int);
00155 
00158   void SetLocator(vtkPointLocator *locator);
00159   vtkGetObjectMacro(Locator,vtkPointLocator);
00160 
00163   void CreateDefaultLocator();
00164 
00165 #ifndef VTK_REMOVE_LEGACY_CODE
00166 
00167   void SetLocator(vtkPointLocator& locator) 
00168     {VTK_LEGACY_METHOD(SetLocator,"3.2"); this->SetLocator(&locator);}
00169 #endif
00170   
00171 protected:
00172   vtkMarchingContourFilter();
00173   ~vtkMarchingContourFilter();
00174   vtkMarchingContourFilter(const vtkMarchingContourFilter&) {};
00175   void operator=(const vtkMarchingContourFilter&) {};
00176 
00177   void Execute();
00178 
00179   vtkContourValues *ContourValues;
00180   int ComputeNormals;
00181   int ComputeGradients;
00182   int ComputeScalars;
00183   vtkPointLocator *Locator;
00184   int UseScalarTree;
00185   vtkScalarTree *ScalarTree;
00186   
00187   //special contouring for structured points
00188   void StructuredPointsContour(int dim); 
00189   //special contouring for image data
00190   void ImageContour(int dim);
00191   //default if not structured data
00192   void DataSetContour();
00193 };
00194 
00197 inline void vtkMarchingContourFilter::SetValue(int i, float value)
00198 {this->ContourValues->SetValue(i,value);}
00199 
00201 inline float vtkMarchingContourFilter::GetValue(int i)
00202 {return this->ContourValues->GetValue(i);}
00203 
00206 inline float *vtkMarchingContourFilter::GetValues()
00207 {return this->ContourValues->GetValues();}
00208 
00212 inline void vtkMarchingContourFilter::GetValues(float *contourValues)
00213 {this->ContourValues->GetValues(contourValues);}
00214 
00218 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00219 {this->ContourValues->SetNumberOfContours(number);}
00220 
00222 inline int vtkMarchingContourFilter::GetNumberOfContours()
00223 {return this->ContourValues->GetNumberOfContours();}
00224 
00227 inline void vtkMarchingContourFilter::GenerateValues(int numContours, float range[2])
00228 {this->ContourValues->GenerateValues(numContours, range);}
00229 
00232 inline void vtkMarchingContourFilter::GenerateValues(int numContours, float
00233                                              rangeStart, float rangeEnd)
00234 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00235 
00236 
00237 #endif
00238 
00239 

Generated on Wed Nov 21 12:27:09 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001