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   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 =========================================================================*/
00073 #ifndef __vtkMarchingSquares_h
00074 #define __vtkMarchingSquares_h
00075 
00076 #include "vtkPolyDataSource.h"
00077 
00078 #include "vtkContourValues.h" // Passes calls to vtkContourValues
00079 
00080 class vtkImageData;
00081 class vtkPointLocator;
00082 
00083 class VTK_PATENTED_EXPORT vtkMarchingSquares : public vtkPolyDataSource
00084 {
00085 public:
00086   static vtkMarchingSquares *New();
00087   vtkTypeRevisionMacro(vtkMarchingSquares,vtkPolyDataSource);
00088   void PrintSelf(ostream& os, vtkIndent indent);
00089 
00091 
00092   void SetInput(vtkImageData *input);
00093   vtkImageData *GetInput();  
00095   
00097 
00101   vtkSetVectorMacro(ImageRange,int,6);
00102   vtkGetVectorMacro(ImageRange,int,6);
00103   void SetImageRange(int imin, int imax, int jmin, int jmax, 
00104                      int kmin, int kmax);
00106 
00107   // Methods to set contour values
00108   void SetValue(int i, float value);
00109   float GetValue(int i);
00110   float *GetValues();
00111   void GetValues(float *contourValues);
00112   void SetNumberOfContours(int number);
00113   int GetNumberOfContours();
00114   void GenerateValues(int numContours, float range[2]);
00115   void GenerateValues(int numContours, float rangeStart, float rangeEnd);
00116 
00117   // Because we delegate to vtkContourValues
00118   unsigned long int GetMTime();
00119 
00120   void SetLocator(vtkPointLocator *locator);
00121   vtkGetObjectMacro(Locator,vtkPointLocator);
00122 
00125   void CreateDefaultLocator();
00126 
00127 protected:
00128   vtkMarchingSquares();
00129   ~vtkMarchingSquares();
00130 
00131   void Execute();
00132 
00133   vtkContourValues *ContourValues;
00134   int ImageRange[6];
00135   vtkPointLocator *Locator;
00136 private:
00137   vtkMarchingSquares(const vtkMarchingSquares&);  // Not implemented.
00138   void operator=(const vtkMarchingSquares&);  // Not implemented.
00139 };
00140 
00143 inline void vtkMarchingSquares::SetValue(int i, float value)
00144 {this->ContourValues->SetValue(i,value);}
00145 
00147 
00148 inline float vtkMarchingSquares::GetValue(int i)
00149 {return this->ContourValues->GetValue(i);}
00151 
00153 
00155 inline float *vtkMarchingSquares::GetValues()
00156 {return this->ContourValues->GetValues();}
00158 
00162 inline void vtkMarchingSquares::GetValues(float *contourValues)
00163 {this->ContourValues->GetValues(contourValues);}
00164 
00168 inline void vtkMarchingSquares::SetNumberOfContours(int number)
00169 {this->ContourValues->SetNumberOfContours(number);}
00170 
00172 
00173 inline int vtkMarchingSquares::GetNumberOfContours()
00174 {return this->ContourValues->GetNumberOfContours();}
00176 
00178 
00180 inline void vtkMarchingSquares::GenerateValues(int numContours, float range[2])
00181 {this->ContourValues->GenerateValues(numContours, range);}
00183 
00185 
00187 inline void vtkMarchingSquares::GenerateValues(int numContours, float
00188                                              rangeStart, float rangeEnd)
00189 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00191 
00192 #endif
00193