VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkImplicitVolume.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitVolume.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
39 #ifndef __vtkImplicitVolume_h
40 #define __vtkImplicitVolume_h
41 
42 #include "vtkCommonDataModelModule.h" // For export macro
43 #include "vtkImplicitFunction.h"
44 
45 class vtkIdList;
46 class vtkImageData;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitVolume : public vtkImplicitFunction
49 {
50 public:
51  vtkTypeMacro(vtkImplicitVolume,vtkImplicitFunction);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
56  static vtkImplicitVolume *New();
57 
61  unsigned long GetMTime();
62 
64 
66  double EvaluateFunction(double x[3]);
67  double EvaluateFunction(double x, double y, double z)
68  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
70 
72  void EvaluateGradient(double x[3], double n[3]);
73 
75 
76  virtual void SetVolume(vtkImageData*);
77  vtkGetObjectMacro(Volume,vtkImageData);
79 
81 
82  vtkSetMacro(OutValue,double);
83  vtkGetMacro(OutValue,double);
85 
87 
88  vtkSetVector3Macro(OutGradient,double);
89  vtkGetVector3Macro(OutGradient,double);
91 
92 protected:
95 
96  vtkImageData *Volume; // the structured points
97  double OutValue;
98  double OutGradient[3];
99  // to replace a static
100  vtkIdList *PointIds;
101 
102 private:
103  vtkImplicitVolume(const vtkImplicitVolume&); // Not implemented.
104  void operator=(const vtkImplicitVolume&); // Not implemented.
105 };
106 
107 #endif
108 
109 
vtkImageData * Volume
double EvaluateFunction(double x, double y, double z)
treat a volume as if it were an implicit function