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 =========================================================================*/
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 
49 {
50 public:
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
101 
102 private:
103  vtkImplicitVolume(const vtkImplicitVolume&); // Not implemented.
104  void operator=(const vtkImplicitVolume&); // Not implemented.
105 };
106 
107 #endif
108 
109 
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