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 
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 =========================================================================*/
00099 #ifndef __vtkMarchingContourFilter_h
00100 #define __vtkMarchingContourFilter_h
00101 
00102 #include "vtkDataSetToPolyDataFilter.h"
00103 #include "vtkContourValues.h"
00104 
00105 class vtkScalarTree;
00106 
00107 class VTK_PATENTED_EXPORT vtkMarchingContourFilter : public vtkDataSetToPolyDataFilter
00108 {
00109 public:
00110   vtkTypeMacro(vtkMarchingContourFilter,vtkDataSetToPolyDataFilter);
00111   void PrintSelf(ostream& os, vtkIndent indent);
00112 
00115   static vtkMarchingContourFilter *New();
00116 
00118 
00119   void SetValue(int i, float value);
00120   float GetValue(int i);
00121   float *GetValues();
00122   void GetValues(float *contourValues);
00123   void SetNumberOfContours(int number);
00124   int GetNumberOfContours();
00125   void GenerateValues(int numContours, float range[2]);
00126   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00128 
00130   unsigned long GetMTime();
00131 
00133 
00137   vtkSetMacro(ComputeNormals,int);
00138   vtkGetMacro(ComputeNormals,int);
00139   vtkBooleanMacro(ComputeNormals,int);
00141 
00143 
00149   vtkSetMacro(ComputeGradients,int);
00150   vtkGetMacro(ComputeGradients,int);
00151   vtkBooleanMacro(ComputeGradients,int);
00153 
00155 
00156   vtkSetMacro(ComputeScalars,int);
00157   vtkGetMacro(ComputeScalars,int);
00158   vtkBooleanMacro(ComputeScalars,int);
00160 
00162 
00163   vtkSetMacro(UseScalarTree,int);
00164   vtkGetMacro(UseScalarTree,int);
00165   vtkBooleanMacro(UseScalarTree,int);
00167 
00169 
00171   void SetLocator(vtkPointLocator *locator);
00172   vtkGetObjectMacro(Locator,vtkPointLocator);
00174 
00177   void CreateDefaultLocator();
00178 
00179 protected:
00180   vtkMarchingContourFilter();
00181   ~vtkMarchingContourFilter();
00182 
00183   void Execute();
00184 
00185   vtkContourValues *ContourValues;
00186   int ComputeNormals;
00187   int ComputeGradients;
00188   int ComputeScalars;
00189   vtkPointLocator *Locator;
00190   int UseScalarTree;
00191   vtkScalarTree *ScalarTree;
00192   
00193   //special contouring for structured points
00194   void StructuredPointsContour(int dim); 
00195   //special contouring for image data
00196   void ImageContour(int dim);
00197   //default if not structured data
00198   void DataSetContour();
00199 private:
00200   vtkMarchingContourFilter(const vtkMarchingContourFilter&);  // Not implemented.
00201   void operator=(const vtkMarchingContourFilter&);  // Not implemented.
00202 };
00203 
00206 inline void vtkMarchingContourFilter::SetValue(int i, float value)
00207 {
00208   this->ContourValues->SetValue(i,value);
00209 }
00210 
00212 inline float vtkMarchingContourFilter::GetValue(int i)
00213 {
00214   return this->ContourValues->GetValue(i);
00215 }
00216 
00219 inline float *vtkMarchingContourFilter::GetValues()
00220 {
00221   return this->ContourValues->GetValues();
00222 }
00223 
00227 inline void vtkMarchingContourFilter::GetValues(float *contourValues)
00228 {
00229   this->ContourValues->GetValues(contourValues);
00230 }
00231 
00235 inline void vtkMarchingContourFilter::SetNumberOfContours(int number)
00236 {
00237   this->ContourValues->SetNumberOfContours(number);
00238 }
00239 
00241 inline int vtkMarchingContourFilter::GetNumberOfContours()
00242 {
00243   return this->ContourValues->GetNumberOfContours();
00244 }
00245 
00247 
00249 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00250                                                      float range[2])
00252 {
00253   this->ContourValues->GenerateValues(numContours, range);
00254 }
00255 
00257 
00259 inline void vtkMarchingContourFilter::GenerateValues(int numContours,
00260                                                      float rangeStart,
00261                                                      float rangeEnd)
00263 {
00264   this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);
00265 }
00266 
00267 #endif

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