VTK  9.3.1
vtkImageAnisotropicDiffusion2D.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 vtkImageAnisotropicDiffusion2D_h
32 #define vtkImageAnisotropicDiffusion2D_h
33 
35 #include "vtkImagingGeneralModule.h" // For export macro
36 VTK_ABI_NAMESPACE_BEGIN
37 class VTKIMAGINGGENERAL_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialAlgorithm
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
50  void SetNumberOfIterations(int num);
51 
53 
56  vtkGetMacro(NumberOfIterations, int);
58 
60 
67  vtkSetMacro(DiffusionThreshold, double);
68  vtkGetMacro(DiffusionThreshold, double);
70 
72 
77  vtkSetMacro(DiffusionFactor, double);
78  vtkGetMacro(DiffusionFactor, double);
80 
82 
85  vtkSetMacro(Faces, vtkTypeBool);
86  vtkGetMacro(Faces, vtkTypeBool);
87  vtkBooleanMacro(Faces, vtkTypeBool);
88  vtkSetMacro(Edges, vtkTypeBool);
89  vtkGetMacro(Edges, vtkTypeBool);
90  vtkBooleanMacro(Edges, vtkTypeBool);
91  vtkSetMacro(Corners, vtkTypeBool);
92  vtkGetMacro(Corners, vtkTypeBool);
93  vtkBooleanMacro(Corners, vtkTypeBool);
95 
97 
100  vtkSetMacro(GradientMagnitudeThreshold, vtkTypeBool);
101  vtkGetMacro(GradientMagnitudeThreshold, vtkTypeBool);
102  vtkBooleanMacro(GradientMagnitudeThreshold, vtkTypeBool);
104 
105 protected:
107  ~vtkImageAnisotropicDiffusion2D() override = default;
108 
112  // to determine which neighbors to diffuse
116  // What threshold to use
118 
119  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
120  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
121  int outExt[6], int id) override;
122  void Iterate(
123  vtkImageData* in, vtkImageData* out, double ar0, double ar1, int* coreExtent, int count);
124 
125 private:
127  void operator=(const vtkImageAnisotropicDiffusion2D&) = delete;
128 };
129 
130 VTK_ABI_NAMESPACE_END
131 #endif
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method.
Filters that operate on pixel neighborhoods.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImageSpatialAlgorithm * New()