VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMarchingSquares.h 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 =========================================================================*/ 00041 #ifndef vtkMarchingSquares_h 00042 #define vtkMarchingSquares_h 00043 00044 #include "vtkFiltersCoreModule.h" // For export macro 00045 #include "vtkPolyDataAlgorithm.h" 00046 00047 #include "vtkContourValues.h" // Passes calls to vtkContourValues 00048 00049 class vtkImageData; 00050 class vtkIncrementalPointLocator; 00051 00052 class VTKFILTERSCORE_EXPORT vtkMarchingSquares : public vtkPolyDataAlgorithm 00053 { 00054 public: 00055 static vtkMarchingSquares *New(); 00056 vtkTypeMacro(vtkMarchingSquares,vtkPolyDataAlgorithm); 00057 void PrintSelf(ostream& os, vtkIndent indent); 00058 00060 00064 vtkSetVectorMacro(ImageRange,int,6); 00065 vtkGetVectorMacro(ImageRange,int,6); 00066 void SetImageRange(int imin, int imax, int jmin, int jmax, 00067 int kmin, int kmax); 00069 00071 00072 void SetValue(int i, double value); 00073 double GetValue(int i); 00074 double *GetValues(); 00075 void GetValues(double *contourValues); 00076 void SetNumberOfContours(int number); 00077 int GetNumberOfContours(); 00078 void GenerateValues(int numContours, double range[2]); 00079 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00081 00083 unsigned long int GetMTime(); 00084 00085 void SetLocator(vtkIncrementalPointLocator *locator); 00086 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00087 00090 void CreateDefaultLocator(); 00091 00092 protected: 00093 vtkMarchingSquares(); 00094 ~vtkMarchingSquares(); 00095 00096 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00097 virtual int FillInputPortInformation(int port, vtkInformation *info); 00098 00099 vtkContourValues *ContourValues; 00100 int ImageRange[6]; 00101 vtkIncrementalPointLocator *Locator; 00102 00103 private: 00104 vtkMarchingSquares(const vtkMarchingSquares&); // Not implemented. 00105 void operator=(const vtkMarchingSquares&); // Not implemented. 00106 }; 00107 00109 00111 inline void vtkMarchingSquares::SetValue(int i, double value) 00112 {this->ContourValues->SetValue(i,value);} 00114 00116 00117 inline double vtkMarchingSquares::GetValue(int i) 00118 {return this->ContourValues->GetValue(i);} 00120 00122 00124 inline double *vtkMarchingSquares::GetValues() 00125 {return this->ContourValues->GetValues();} 00127 00129 00132 inline void vtkMarchingSquares::GetValues(double *contourValues) 00133 {this->ContourValues->GetValues(contourValues);} 00135 00137 00140 inline void vtkMarchingSquares::SetNumberOfContours(int number) 00141 {this->ContourValues->SetNumberOfContours(number);} 00143 00145 00146 inline int vtkMarchingSquares::GetNumberOfContours() 00147 {return this->ContourValues->GetNumberOfContours();} 00149 00151 00153 inline void vtkMarchingSquares::GenerateValues(int numContours, double range[2]) 00154 {this->ContourValues->GenerateValues(numContours, range);} 00156 00158 00160 inline void vtkMarchingSquares::GenerateValues(int numContours, double 00161 rangeStart, double rangeEnd) 00162 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00164 00165 #endif