Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class 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 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
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 =========================================================================*/
00057 #ifndef __vtkMarchingSquares_h
00058 #define __vtkMarchingSquares_h
00059 
00060 #include "vtkPolyDataSource.h"
00061 
00062 #include "vtkContourValues.h" // Passes calls to vtkContourValues
00063 
00064 class vtkImageData;
00065 class vtkPointLocator;
00066 
00067 class VTK_PATENTED_EXPORT vtkMarchingSquares : public vtkPolyDataSource
00068 {
00069 public:
00070   static vtkMarchingSquares *New();
00071   vtkTypeRevisionMacro(vtkMarchingSquares,vtkPolyDataSource);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073 
00075 
00076   void SetInput(vtkImageData *input);
00077   vtkImageData *GetInput();  
00079   
00081 
00085   vtkSetVectorMacro(ImageRange,int,6);
00086   vtkGetVectorMacro(ImageRange,int,6);
00087   void SetImageRange(int imin, int imax, int jmin, int jmax, 
00088                      int kmin, int kmax);
00090 
00091   // Methods to set contour values
00092   void SetValue(int i, double value);
00093   double GetValue(int i);
00094   double *GetValues();
00095   void GetValues(double *contourValues);
00096   void SetNumberOfContours(int number);
00097   int GetNumberOfContours();
00098   void GenerateValues(int numContours, double range[2]);
00099   void GenerateValues(int numContours, double rangeStart, double rangeEnd);
00100 
00101   // Because we delegate to vtkContourValues
00102   unsigned long int GetMTime();
00103 
00104   void SetLocator(vtkPointLocator *locator);
00105   vtkGetObjectMacro(Locator,vtkPointLocator);
00106 
00109   void CreateDefaultLocator();
00110 
00111 protected:
00112   vtkMarchingSquares();
00113   ~vtkMarchingSquares();
00114 
00115   void Execute();
00116 
00117   vtkContourValues *ContourValues;
00118   int ImageRange[6];
00119   vtkPointLocator *Locator;
00120 private:
00121   vtkMarchingSquares(const vtkMarchingSquares&);  // Not implemented.
00122   void operator=(const vtkMarchingSquares&);  // Not implemented.
00123 };
00124 
00127 inline void vtkMarchingSquares::SetValue(int i, double value)
00128 {this->ContourValues->SetValue(i,value);}
00129 
00131 
00132 inline double vtkMarchingSquares::GetValue(int i)
00133 {return this->ContourValues->GetValue(i);}
00135 
00137 
00139 inline double *vtkMarchingSquares::GetValues()
00140 {return this->ContourValues->GetValues();}
00142 
00146 inline void vtkMarchingSquares::GetValues(double *contourValues)
00147 {this->ContourValues->GetValues(contourValues);}
00148 
00152 inline void vtkMarchingSquares::SetNumberOfContours(int number)
00153 {this->ContourValues->SetNumberOfContours(number);}
00154 
00156 
00157 inline int vtkMarchingSquares::GetNumberOfContours()
00158 {return this->ContourValues->GetNumberOfContours();}
00160 
00162 
00164 inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2])
00165 {this->ContourValues->GenerateValues(numContours, range);}
00167 
00169 
00171 inline void vtkMarchingSquares::GenerateValues(int numContours, double
00172                                              rangeStart, double rangeEnd)
00173 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00175 
00176 #endif
00177