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

Patented/vtkMarchingSquares.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMarchingSquares.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 =========================================================================*/
00084 #ifndef __vtkMarchingSquares_h
00085 #define __vtkMarchingSquares_h
00086 
00087 #include "vtkPolyDataSource.h"
00088 #include "vtkImageData.h"
00089 #include "vtkContourValues.h"
00090 
00091 class VTK_PATENTED_EXPORT vtkMarchingSquares : public vtkPolyDataSource
00092 {
00093 public:
00094   static vtkMarchingSquares *New();
00095   vtkTypeMacro(vtkMarchingSquares,vtkPolyDataSource);
00096   void PrintSelf(ostream& os, vtkIndent indent);
00097 
00099 
00100   void SetInput(vtkImageData *input);
00101   vtkImageData *GetInput();  
00103   
00105 
00109   vtkSetVectorMacro(ImageRange,int,6);
00110   vtkGetVectorMacro(ImageRange,int,6);
00111   void SetImageRange(int imin, int imax, int jmin, int jmax, 
00112                      int kmin, int kmax);
00114 
00115   // Methods to set contour values
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 
00125   // Because we delegate to vtkContourValues
00126   unsigned long int GetMTime();
00127 
00128   void SetLocator(vtkPointLocator *locator);
00129   vtkGetObjectMacro(Locator,vtkPointLocator);
00130 
00133   void CreateDefaultLocator();
00134 
00135 protected:
00136   vtkMarchingSquares();
00137   ~vtkMarchingSquares();
00138 
00139   void Execute();
00140 
00141   vtkContourValues *ContourValues;
00142   int ImageRange[6];
00143   vtkPointLocator *Locator;
00144 private:
00145   vtkMarchingSquares(const vtkMarchingSquares&);  // Not implemented.
00146   void operator=(const vtkMarchingSquares&);  // Not implemented.
00147 };
00148 
00151 inline void vtkMarchingSquares::SetValue(int i, float value)
00152 {this->ContourValues->SetValue(i,value);}
00153 
00155 
00156 inline float vtkMarchingSquares::GetValue(int i)
00157 {return this->ContourValues->GetValue(i);}
00159 
00161 
00163 inline float *vtkMarchingSquares::GetValues()
00164 {return this->ContourValues->GetValues();}
00166 
00170 inline void vtkMarchingSquares::GetValues(float *contourValues)
00171 {this->ContourValues->GetValues(contourValues);}
00172 
00176 inline void vtkMarchingSquares::SetNumberOfContours(int number)
00177 {this->ContourValues->SetNumberOfContours(number);}
00178 
00180 
00181 inline int vtkMarchingSquares::GetNumberOfContours()
00182 {return this->ContourValues->GetNumberOfContours();}
00184 
00186 
00188 inline void vtkMarchingSquares::GenerateValues(int numContours, float range[2])
00189 {this->ContourValues->GenerateValues(numContours, range);}
00191 
00193 
00195 inline void vtkMarchingSquares::GenerateValues(int numContours, float
00196                                              rangeStart, float rangeEnd)
00197 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00199 
00200 #endif
00201 

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