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 "vtkImplicitFunction.h" 00043 00044 class vtkIdList; 00045 class vtkImageData; 00046 00047 class VTK_FILTERING_EXPORT vtkImplicitVolume : public vtkImplicitFunction 00048 { 00049 public: 00050 vtkTypeMacro(vtkImplicitVolume,vtkImplicitFunction); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00055 static vtkImplicitVolume *New(); 00056 00060 unsigned long GetMTime(); 00061 00063 00065 double EvaluateFunction(double x[3]); 00066 double EvaluateFunction(double x, double y, double z) 00067 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ; 00069 00071 void EvaluateGradient(double x[3], double n[3]); 00072 00074 00075 virtual void SetVolume(vtkImageData*); 00076 vtkGetObjectMacro(Volume,vtkImageData); 00078 00080 00081 vtkSetMacro(OutValue,double); 00082 vtkGetMacro(OutValue,double); 00084 00086 00087 vtkSetVector3Macro(OutGradient,double); 00088 vtkGetVector3Macro(OutGradient,double); 00090 00091 protected: 00092 vtkImplicitVolume(); 00093 ~vtkImplicitVolume(); 00094 00095 vtkImageData *Volume; // the structured points 00096 double OutValue; 00097 double OutGradient[3]; 00098 // to replace a static 00099 vtkIdList *PointIds; 00100 00101 private: 00102 vtkImplicitVolume(const vtkImplicitVolume&); // Not implemented. 00103 void operator=(const vtkImplicitVolume&); // Not implemented. 00104 }; 00105 00106 #endif 00107 00108