VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContourFilter.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 =========================================================================*/ 00052 #ifndef __vtkContourFilter_h 00053 #define __vtkContourFilter_h 00054 00055 #include "vtkFiltersCoreModule.h" // For export macro 00056 #include "vtkPolyDataAlgorithm.h" 00057 00058 #include "vtkContourValues.h" // Needed for inline methods 00059 00060 class vtkIncrementalPointLocator; 00061 class vtkScalarTree; 00062 class vtkSynchronizedTemplates2D; 00063 class vtkSynchronizedTemplates3D; 00064 class vtkGridSynchronizedTemplates3D; 00065 class vtkRectilinearSynchronizedTemplates; 00066 class vtkCallbackCommand; 00067 00068 class VTKFILTERSCORE_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm 00069 { 00070 public: 00071 vtkTypeMacro(vtkContourFilter,vtkPolyDataAlgorithm); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 00076 static vtkContourFilter *New(); 00077 00079 00080 void SetValue(int i, double value); 00081 double GetValue(int i); 00082 double *GetValues(); 00083 void GetValues(double *contourValues); 00084 void SetNumberOfContours(int number); 00085 int GetNumberOfContours(); 00086 void GenerateValues(int numContours, double range[2]); 00087 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00089 00091 unsigned long GetMTime(); 00092 00094 00102 vtkSetMacro(ComputeNormals,int); 00103 vtkGetMacro(ComputeNormals,int); 00104 vtkBooleanMacro(ComputeNormals,int); 00106 00108 00114 vtkSetMacro(ComputeGradients,int); 00115 vtkGetMacro(ComputeGradients,int); 00116 vtkBooleanMacro(ComputeGradients,int); 00118 00120 00121 vtkSetMacro(ComputeScalars,int); 00122 vtkGetMacro(ComputeScalars,int); 00123 vtkBooleanMacro(ComputeScalars,int); 00125 00127 00128 vtkSetMacro(UseScalarTree,int); 00129 vtkGetMacro(UseScalarTree,int); 00130 vtkBooleanMacro(UseScalarTree,int); 00132 00134 00135 virtual void SetScalarTree(vtkScalarTree*); 00136 vtkGetObjectMacro(ScalarTree,vtkScalarTree); 00138 00140 00142 void SetLocator(vtkIncrementalPointLocator *locator); 00143 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00145 00148 void CreateDefaultLocator(); 00149 00151 00154 void SetArrayComponent( int ); 00155 int GetArrayComponent(); 00157 00158 00160 00165 vtkSetMacro(GenerateTriangles,int); 00166 vtkGetMacro(GenerateTriangles,int); 00167 vtkBooleanMacro(GenerateTriangles,int); 00169 00171 00172 virtual int ProcessRequest(vtkInformation*, 00173 vtkInformationVector**, 00174 vtkInformationVector*); 00176 00178 00181 void SetOutputPointsPrecision(int precision); 00182 int GetOutputPointsPrecision() const; 00184 00185 protected: 00186 vtkContourFilter(); 00187 ~vtkContourFilter(); 00188 00189 virtual void ReportReferences(vtkGarbageCollector*); 00190 00191 virtual int RequestData(vtkInformation* request, 00192 vtkInformationVector** inputVector, 00193 vtkInformationVector* outputVector); 00194 virtual int RequestUpdateExtent(vtkInformation*, 00195 vtkInformationVector**, 00196 vtkInformationVector*); 00197 virtual int FillInputPortInformation(int port, vtkInformation *info); 00198 00199 vtkContourValues *ContourValues; 00200 int ComputeNormals; 00201 int ComputeGradients; 00202 int ComputeScalars; 00203 vtkIncrementalPointLocator *Locator; 00204 int UseScalarTree; 00205 vtkScalarTree *ScalarTree; 00206 int OutputPointsPrecision; 00207 int GenerateTriangles; 00208 00209 vtkSynchronizedTemplates2D *SynchronizedTemplates2D; 00210 vtkSynchronizedTemplates3D *SynchronizedTemplates3D; 00211 vtkGridSynchronizedTemplates3D *GridSynchronizedTemplates; 00212 vtkRectilinearSynchronizedTemplates *RectilinearSynchronizedTemplates; 00213 vtkCallbackCommand *InternalProgressCallbackCommand; 00214 00215 static void InternalProgressCallbackFunction(vtkObject *caller, 00216 unsigned long eid, 00217 void *clientData, 00218 void *callData); 00219 00220 private: 00221 vtkContourFilter(const vtkContourFilter&); // Not implemented. 00222 void operator=(const vtkContourFilter&); // Not implemented. 00223 }; 00224 00226 00228 inline void vtkContourFilter::SetValue(int i, double value) 00229 {this->ContourValues->SetValue(i,value);} 00231 00233 00234 inline double vtkContourFilter::GetValue(int i) 00235 {return this->ContourValues->GetValue(i);} 00237 00239 00241 inline double *vtkContourFilter::GetValues() 00242 {return this->ContourValues->GetValues();} 00244 00246 00249 inline void vtkContourFilter::GetValues(double *contourValues) 00250 {this->ContourValues->GetValues(contourValues);} 00252 00254 00257 inline void vtkContourFilter::SetNumberOfContours(int number) 00258 {this->ContourValues->SetNumberOfContours(number);} 00260 00262 00263 inline int vtkContourFilter::GetNumberOfContours() 00264 {return this->ContourValues->GetNumberOfContours();} 00266 00268 00270 inline void vtkContourFilter::GenerateValues(int numContours, double range[2]) 00271 {this->ContourValues->GenerateValues(numContours, range);} 00273 00275 00277 inline void vtkContourFilter::GenerateValues(int numContours, double 00278 rangeStart, double rangeEnd) 00279 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00281 00282 00283 #endif 00284 00285