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 00067 class VTKFILTERSCORE_EXPORT vtkContourFilter : public vtkPolyDataAlgorithm 00068 { 00069 public: 00070 vtkTypeMacro(vtkContourFilter,vtkPolyDataAlgorithm); 00071 void PrintSelf(ostream& os, vtkIndent indent); 00072 00075 static vtkContourFilter *New(); 00076 00078 00079 void SetValue(int i, double value); 00080 double GetValue(int i); 00081 double *GetValues(); 00082 void GetValues(double *contourValues); 00083 void SetNumberOfContours(int number); 00084 int GetNumberOfContours(); 00085 void GenerateValues(int numContours, double range[2]); 00086 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00088 00090 unsigned long GetMTime(); 00091 00093 00097 vtkSetMacro(ComputeNormals,int); 00098 vtkGetMacro(ComputeNormals,int); 00099 vtkBooleanMacro(ComputeNormals,int); 00101 00103 00109 vtkSetMacro(ComputeGradients,int); 00110 vtkGetMacro(ComputeGradients,int); 00111 vtkBooleanMacro(ComputeGradients,int); 00113 00115 00116 vtkSetMacro(ComputeScalars,int); 00117 vtkGetMacro(ComputeScalars,int); 00118 vtkBooleanMacro(ComputeScalars,int); 00120 00122 00123 vtkSetMacro(UseScalarTree,int); 00124 vtkGetMacro(UseScalarTree,int); 00125 vtkBooleanMacro(UseScalarTree,int); 00127 00129 00130 virtual void SetScalarTree(vtkScalarTree*); 00131 vtkGetObjectMacro(ScalarTree,vtkScalarTree); 00133 00135 00137 void SetLocator(vtkIncrementalPointLocator *locator); 00138 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00140 00143 void CreateDefaultLocator(); 00144 00146 00149 void SetArrayComponent( int ); 00150 int GetArrayComponent(); 00152 00153 00155 00160 vtkSetMacro(GenerateTriangles,int); 00161 vtkGetMacro(GenerateTriangles,int); 00162 vtkBooleanMacro(GenerateTriangles,int); 00164 00166 00167 virtual int ProcessRequest(vtkInformation*, 00168 vtkInformationVector**, 00169 vtkInformationVector*); 00171 00173 00176 void SetOutputPointsPrecision(int precision); 00177 int GetOutputPointsPrecision() const; 00179 00180 protected: 00181 vtkContourFilter(); 00182 ~vtkContourFilter(); 00183 00184 virtual void ReportReferences(vtkGarbageCollector*); 00185 00186 virtual int RequestData(vtkInformation* request, 00187 vtkInformationVector** inputVector, 00188 vtkInformationVector* outputVector); 00189 virtual int RequestUpdateExtent(vtkInformation*, 00190 vtkInformationVector**, 00191 vtkInformationVector*); 00192 virtual int FillInputPortInformation(int port, vtkInformation *info); 00193 00194 vtkContourValues *ContourValues; 00195 int ComputeNormals; 00196 int ComputeGradients; 00197 int ComputeScalars; 00198 vtkIncrementalPointLocator *Locator; 00199 int UseScalarTree; 00200 vtkScalarTree *ScalarTree; 00201 int OutputPointsPrecision; 00202 int GenerateTriangles; 00203 00204 vtkSynchronizedTemplates2D *SynchronizedTemplates2D; 00205 vtkSynchronizedTemplates3D *SynchronizedTemplates3D; 00206 vtkGridSynchronizedTemplates3D *GridSynchronizedTemplates; 00207 vtkRectilinearSynchronizedTemplates *RectilinearSynchronizedTemplates; 00208 00209 private: 00210 vtkContourFilter(const vtkContourFilter&); // Not implemented. 00211 void operator=(const vtkContourFilter&); // Not implemented. 00212 }; 00213 00215 00217 inline void vtkContourFilter::SetValue(int i, double value) 00218 {this->ContourValues->SetValue(i,value);} 00220 00222 00223 inline double vtkContourFilter::GetValue(int i) 00224 {return this->ContourValues->GetValue(i);} 00226 00228 00230 inline double *vtkContourFilter::GetValues() 00231 {return this->ContourValues->GetValues();} 00233 00235 00238 inline void vtkContourFilter::GetValues(double *contourValues) 00239 {this->ContourValues->GetValues(contourValues);} 00241 00243 00246 inline void vtkContourFilter::SetNumberOfContours(int number) 00247 {this->ContourValues->SetNumberOfContours(number);} 00249 00251 00252 inline int vtkContourFilter::GetNumberOfContours() 00253 {return this->ContourValues->GetNumberOfContours();} 00255 00257 00259 inline void vtkContourFilter::GenerateValues(int numContours, double range[2]) 00260 {this->ContourValues->GenerateValues(numContours, range);} 00262 00264 00266 inline void vtkContourFilter::GenerateValues(int numContours, double 00267 rangeStart, double rangeEnd) 00268 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00270 00271 00272 #endif 00273 00274