VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkContourFilter.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 =========================================================================*/ 00049 #ifndef __vtkContourFilter_h 00050 #define __vtkContourFilter_h 00051 00052 #include "vtkPolyDataAlgorithm.h" 00053 00054 #include "vtkContourValues.h" // Needed for inline methods 00055 00056 class vtkPointLocator; 00057 class vtkScalarTree; 00058 class vtkSynchronizedTemplates2D; 00059 class vtkSynchronizedTemplates3D; 00060 class vtkGridSynchronizedTemplates3D; 00061 class vtkRectilinearSynchronizedTemplates; 00062 00063 class VTK_GRAPHICS_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm 00064 { 00065 public: 00066 vtkTypeRevisionMacro(vtkContourFilter,vtkPolyDataAlgorithm); 00067 void PrintSelf(ostream& os, vtkIndent indent); 00068 00071 static vtkContourFilter *New(); 00072 00074 00075 void SetValue(int i, double value); 00076 double GetValue(int i); 00077 double *GetValues(); 00078 void GetValues(double *contourValues); 00079 void SetNumberOfContours(int number); 00080 int GetNumberOfContours(); 00081 void GenerateValues(int numContours, double range[2]); 00082 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00084 00086 unsigned long GetMTime(); 00087 00089 00093 vtkSetMacro(ComputeNormals,int); 00094 vtkGetMacro(ComputeNormals,int); 00095 vtkBooleanMacro(ComputeNormals,int); 00097 00099 00105 vtkSetMacro(ComputeGradients,int); 00106 vtkGetMacro(ComputeGradients,int); 00107 vtkBooleanMacro(ComputeGradients,int); 00109 00111 00112 vtkSetMacro(ComputeScalars,int); 00113 vtkGetMacro(ComputeScalars,int); 00114 vtkBooleanMacro(ComputeScalars,int); 00116 00118 00119 vtkSetMacro(UseScalarTree,int); 00120 vtkGetMacro(UseScalarTree,int); 00121 vtkBooleanMacro(UseScalarTree,int); 00123 00125 00126 virtual void SetScalarTree(vtkScalarTree*); 00127 vtkGetObjectMacro(ScalarTree,vtkScalarTree); 00129 00131 00133 void SetLocator(vtkPointLocator *locator); 00134 vtkGetObjectMacro(Locator,vtkPointLocator); 00136 00139 void CreateDefaultLocator(); 00140 00142 00145 void SetArrayComponent( int ); 00146 int GetArrayComponent(); 00148 00150 00151 virtual int ProcessRequest(vtkInformation*, 00152 vtkInformationVector**, 00153 vtkInformationVector*); 00155 00156 protected: 00157 vtkContourFilter(); 00158 ~vtkContourFilter(); 00159 00160 virtual void ReportReferences(vtkGarbageCollector*); 00161 00162 virtual int RequestData(vtkInformation* request, 00163 vtkInformationVector** inputVector, 00164 vtkInformationVector* outputVector); 00165 virtual int RequestUpdateExtent(vtkInformation*, 00166 vtkInformationVector**, 00167 vtkInformationVector*); 00168 virtual int FillInputPortInformation(int port, vtkInformation *info); 00169 00170 vtkContourValues *ContourValues; 00171 int ComputeNormals; 00172 int ComputeGradients; 00173 int ComputeScalars; 00174 vtkPointLocator *Locator; 00175 int UseScalarTree; 00176 vtkScalarTree *ScalarTree; 00177 00178 vtkSynchronizedTemplates2D *SynchronizedTemplates2D; 00179 vtkSynchronizedTemplates3D *SynchronizedTemplates3D; 00180 vtkGridSynchronizedTemplates3D *GridSynchronizedTemplates; 00181 vtkRectilinearSynchronizedTemplates *RectilinearSynchronizedTemplates; 00182 00183 private: 00184 vtkContourFilter(const vtkContourFilter&); // Not implemented. 00185 void operator=(const vtkContourFilter&); // Not implemented. 00186 }; 00187 00190 inline void vtkContourFilter::SetValue(int i, double value) 00191 {this->ContourValues->SetValue(i,value);} 00192 00194 00195 inline double vtkContourFilter::GetValue(int i) 00196 {return this->ContourValues->GetValue(i);} 00198 00200 00202 inline double *vtkContourFilter::GetValues() 00203 {return this->ContourValues->GetValues();} 00205 00209 inline void vtkContourFilter::GetValues(double *contourValues) 00210 {this->ContourValues->GetValues(contourValues);} 00211 00215 inline void vtkContourFilter::SetNumberOfContours(int number) 00216 {this->ContourValues->SetNumberOfContours(number);} 00217 00219 00220 inline int vtkContourFilter::GetNumberOfContours() 00221 {return this->ContourValues->GetNumberOfContours();} 00223 00225 00227 inline void vtkContourFilter::GenerateValues(int numContours, double range[2]) 00228 {this->ContourValues->GenerateValues(numContours, range);} 00230 00232 00234 inline void vtkContourFilter::GenerateValues(int numContours, double 00235 rangeStart, double rangeEnd) 00236 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00238 00239 00240 #endif 00241 00242