VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContourGrid.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 =========================================================================*/ 00048 #ifndef __vtkContourGrid_h 00049 #define __vtkContourGrid_h 00050 00051 #include "vtkPolyDataAlgorithm.h" 00052 00053 #include "vtkContourValues.h" // Needed for inline methods 00054 00055 class vtkEdgeTable; 00056 class vtkScalarTree; 00057 class vtkIncrementalPointLocator; 00058 00059 class VTK_GRAPHICS_EXPORT vtkContourGrid : public vtkPolyDataAlgorithm 00060 { 00061 public: 00062 vtkTypeMacro(vtkContourGrid,vtkPolyDataAlgorithm); 00063 void PrintSelf(ostream& os, vtkIndent indent); 00064 00067 static vtkContourGrid *New(); 00068 00070 00071 void SetValue(int i, double value); 00072 double GetValue(int i); 00073 double *GetValues(); 00074 void GetValues(double *contourValues); 00075 void SetNumberOfContours(int number); 00076 int GetNumberOfContours(); 00077 void GenerateValues(int numContours, double range[2]); 00078 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00080 00082 unsigned long GetMTime(); 00083 00085 00089 vtkSetMacro(ComputeNormals,int); 00090 vtkGetMacro(ComputeNormals,int); 00091 vtkBooleanMacro(ComputeNormals,int); 00093 00095 00101 vtkSetMacro(ComputeGradients,int); 00102 vtkGetMacro(ComputeGradients,int); 00103 vtkBooleanMacro(ComputeGradients,int); 00105 00107 00108 vtkSetMacro(ComputeScalars,int); 00109 vtkGetMacro(ComputeScalars,int); 00110 vtkBooleanMacro(ComputeScalars,int); 00112 00114 00115 vtkSetMacro(UseScalarTree,int); 00116 vtkGetMacro(UseScalarTree,int); 00117 vtkBooleanMacro(UseScalarTree,int); 00119 00121 00123 void SetLocator(vtkIncrementalPointLocator *locator); 00124 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00126 00129 void CreateDefaultLocator(); 00130 00131 protected: 00132 vtkContourGrid(); 00133 ~vtkContourGrid(); 00134 00135 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00136 virtual int FillInputPortInformation(int port, vtkInformation *info); 00137 00138 vtkContourValues *ContourValues; 00139 int ComputeNormals; 00140 int ComputeGradients; 00141 int ComputeScalars; 00142 vtkIncrementalPointLocator *Locator; 00143 int UseScalarTree; 00144 vtkScalarTree *ScalarTree; 00145 vtkEdgeTable *EdgeTable; 00146 00147 private: 00148 vtkContourGrid(const vtkContourGrid&); // Not implemented. 00149 void operator=(const vtkContourGrid&); // Not implemented. 00150 }; 00151 00154 inline void vtkContourGrid::SetValue(int i, double value) 00155 {this->ContourValues->SetValue(i,value);} 00156 00158 00159 inline double vtkContourGrid::GetValue(int i) 00160 {return this->ContourValues->GetValue(i);} 00162 00164 00166 inline double *vtkContourGrid::GetValues() 00167 {return this->ContourValues->GetValues();} 00169 00173 inline void vtkContourGrid::GetValues(double *contourValues) 00174 {this->ContourValues->GetValues(contourValues);} 00175 00179 inline void vtkContourGrid::SetNumberOfContours(int number) 00180 {this->ContourValues->SetNumberOfContours(number);} 00181 00183 00184 inline int vtkContourGrid::GetNumberOfContours() 00185 {return this->ContourValues->GetNumberOfContours();} 00187 00189 00191 inline void vtkContourGrid::GenerateValues(int numContours, double range[2]) 00192 {this->ContourValues->GenerateValues(numContours, range);} 00194 00196 00198 inline void vtkContourGrid::GenerateValues(int numContours, double 00199 rangeStart, double rangeEnd) 00200 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00202 00203 00204 #endif 00205 00206