VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImplicitVolume.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 =========================================================================*/ 00039 #ifndef __vtkImplicitVolume_h 00040 #define __vtkImplicitVolume_h 00041 00042 #include "vtkCommonDataModelModule.h" // For export macro 00043 #include "vtkImplicitFunction.h" 00044 00045 class vtkIdList; 00046 class vtkImageData; 00047 00048 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitVolume : public vtkImplicitFunction 00049 { 00050 public: 00051 vtkTypeMacro(vtkImplicitVolume,vtkImplicitFunction); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00056 static vtkImplicitVolume *New(); 00057 00061 unsigned long GetMTime(); 00062 00064 00066 double EvaluateFunction(double x[3]); 00067 double EvaluateFunction(double x, double y, double z) 00068 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ; 00070 00072 void EvaluateGradient(double x[3], double n[3]); 00073 00075 00076 virtual void SetVolume(vtkImageData*); 00077 vtkGetObjectMacro(Volume,vtkImageData); 00079 00081 00082 vtkSetMacro(OutValue,double); 00083 vtkGetMacro(OutValue,double); 00085 00087 00088 vtkSetVector3Macro(OutGradient,double); 00089 vtkGetVector3Macro(OutGradient,double); 00091 00092 protected: 00093 vtkImplicitVolume(); 00094 ~vtkImplicitVolume(); 00095 00096 vtkImageData *Volume; // the structured points 00097 double OutValue; 00098 double OutGradient[3]; 00099 // to replace a static 00100 vtkIdList *PointIds; 00101 00102 private: 00103 vtkImplicitVolume(const vtkImplicitVolume&); // Not implemented. 00104 void operator=(const vtkImplicitVolume&); // Not implemented. 00105 }; 00106 00107 #endif 00108 00109