VTK  9.3.1
vtkImplicitVolume.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
31 #ifndef vtkImplicitVolume_h
32 #define vtkImplicitVolume_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkImplicitFunction.h"
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkIdList;
39 class vtkImageData;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitVolume : public vtkImplicitFunction
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
51  static vtkImplicitVolume* New();
52 
58  vtkMTimeType GetMTime() override;
59 
61 
66  double EvaluateFunction(double x[3]) override;
68 
72  void EvaluateGradient(double x[3], double n[3]) override;
73 
75 
78  virtual void SetVolume(vtkImageData*);
79  vtkGetObjectMacro(Volume, vtkImageData);
81 
83 
86  vtkSetMacro(OutValue, double);
87  vtkGetMacro(OutValue, double);
89 
91 
94  vtkSetVector3Macro(OutGradient, double);
95  vtkGetVector3Macro(OutGradient, double);
97 
98 protected:
100  ~vtkImplicitVolume() override;
101 
102  vtkImageData* Volume; // the structured points
103  double OutValue;
104  double OutGradient[3];
105  // to replace a static
107 
108 private:
109  vtkImplicitVolume(const vtkImplicitVolume&) = delete;
110  void operator=(const vtkImplicitVolume&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkMTimeType GetMTime() override
Overload standard modified time function.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
list of point or cell ids
Definition: vtkIdList.h:22
vtkImageData * Volume
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.