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 =========================================================================*/
43 #ifndef vtkImplicitVolume_h
44 #define vtkImplicitVolume_h
45 
46 #include "vtkCommonDataModelModule.h" // For export macro
47 #include "vtkImplicitFunction.h"
48 
49 class vtkIdList;
50 class vtkImageData;
51 
52 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitVolume : public vtkImplicitFunction
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
57 
62  static vtkImplicitVolume *New();
63 
69  vtkMTimeType GetMTime() VTK_OVERRIDE;
70 
72 
76  double EvaluateFunction(double x[3]) VTK_OVERRIDE;
77  double EvaluateFunction(double x, double y, double z)
78  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
80 
84  void EvaluateGradient(double x[3], double n[3]) VTK_OVERRIDE;
85 
87 
90  virtual void SetVolume(vtkImageData*);
91  vtkGetObjectMacro(Volume,vtkImageData);
93 
95 
98  vtkSetMacro(OutValue,double);
99  vtkGetMacro(OutValue,double);
101 
103 
106  vtkSetVector3Macro(OutGradient,double);
107  vtkGetVector3Macro(OutGradient,double);
109 
110 protected:
112  ~vtkImplicitVolume() VTK_OVERRIDE;
113 
114  vtkImageData *Volume; // the structured points
115  double OutValue;
116  double OutGradient[3];
117  // to replace a static
118  vtkIdList *PointIds;
119 
120 private:
121  vtkImplicitVolume(const vtkImplicitVolume&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkImplicitVolume&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
126 
127 
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMTimeType GetMTime() override
Overload standard modified time function.
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
list of point or cell ids
Definition: vtkIdList.h:36
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
treat a volume as if it were an implicit function
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.