VTK
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 =========================================================================*/
42 #ifndef vtkImplicitVolume_h
43 #define vtkImplicitVolume_h
44 
45 #include "vtkCommonDataModelModule.h" // For export macro
46 #include "vtkImplicitFunction.h"
47 
48 class vtkIdList;
49 class vtkImageData;
50 
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
59  static vtkImplicitVolume *New();
60 
64  unsigned long GetMTime();
65 
67 
69  double EvaluateFunction(double x[3]);
70  double EvaluateFunction(double x, double y, double z)
71  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
73 
75  void EvaluateGradient(double x[3], double n[3]);
76 
78 
79  virtual void SetVolume(vtkImageData*);
80  vtkGetObjectMacro(Volume,vtkImageData);
82 
84 
85  vtkSetMacro(OutValue,double);
86  vtkGetMacro(OutValue,double);
88 
90 
91  vtkSetVector3Macro(OutGradient,double);
92  vtkGetVector3Macro(OutGradient,double);
94 
95 protected:
98 
99  vtkImageData *Volume; // the structured points
100  double OutValue;
101  double OutGradient[3];
102  // to replace a static
104 
105 private:
106  vtkImplicitVolume(const vtkImplicitVolume&); // Not implemented.
107  void operator=(const vtkImplicitVolume&); // Not implemented.
108 };
109 
110 #endif
111 
112 
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
unsigned long GetMTime()
virtual void EvaluateGradient(double x[3], double g[3])=0
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
list of point or cell ids
Definition: vtkIdList.h:35
vtkImageData * Volume
double EvaluateFunction(double x, double y, double z)
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
treat a volume as if it were an implicit function
#define VTKCOMMONDATAMODEL_EXPORT