VTK: Imaging/General/vtkImageAnisotropicDiffusion2D.h Source File

| 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
40 #ifndef vtkImageAnisotropicDiffusion2D_h
41 #define vtkImageAnisotropicDiffusion2D_h
42
43 #include "vtkImageSpatialAlgorithm.h"
44 #include "vtkImagingGeneralModule.h" // For export macro
45 VTK_ABI_NAMESPACE_BEGIN
46 class VTKIMAGINGGENERAL_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialAlgorithm
47 {
48 public:
49 static vtkImageAnisotropicDiffusion2D* New();
50 vtkTypeMacro(vtkImageAnisotropicDiffusion2D, vtkImageSpatialAlgorithm);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
59 void SetNumberOfIterations(int num);
60
62
65 vtkGetMacro(NumberOfIterations, int);
67
69
76 vtkSetMacro(DiffusionThreshold, double);
77 vtkGetMacro(DiffusionThreshold, double);
79
81
86 vtkSetMacro(DiffusionFactor, double);
87 vtkGetMacro(DiffusionFactor, double);
89
91
94 vtkSetMacro(Faces, vtkTypeBool);
95 vtkGetMacro(Faces, vtkTypeBool);
96 vtkBooleanMacro(Faces, vtkTypeBool);
97 vtkSetMacro(Edges, vtkTypeBool);
98 vtkGetMacro(Edges, vtkTypeBool);
99 vtkBooleanMacro(Edges, vtkTypeBool);
100 vtkSetMacro(Corners, vtkTypeBool);
101 vtkGetMacro(Corners, vtkTypeBool);
102 vtkBooleanMacro(Corners, vtkTypeBool);
104
106
109 vtkSetMacro(GradientMagnitudeThreshold, vtkTypeBool);
110 vtkGetMacro(GradientMagnitudeThreshold, vtkTypeBool);
111 vtkBooleanMacro(GradientMagnitudeThreshold, vtkTypeBool);
113
114 protected:
115 vtkImageAnisotropicDiffusion2D();
116 ~vtkImageAnisotropicDiffusion2D() override = default;
117
118 int NumberOfIterations;
119 double DiffusionThreshold;
120 double DiffusionFactor;
121 // to determine which neighbors to diffuse
122 vtkTypeBool Faces;
123 vtkTypeBool Edges;
124 vtkTypeBool Corners;
125 // What threshold to use
126 vtkTypeBool GradientMagnitudeThreshold;
127
128 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
129 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
130 int outExt[6], int id) override;
131 void Iterate(
132 vtkImageData* in, vtkImageData* out, double ar0, double ar1, int* coreExtent, int count);
133
134 private:
135 vtkImageAnisotropicDiffusion2D(const vtkImageAnisotropicDiffusion2D&) = delete;
136 void operator=(const vtkImageAnisotropicDiffusion2D&) = delete;
137 };
138
139 VTK_ABI_NAMESPACE_END
140 #endif
vtkImageAnisotropicDiffusion2D
edge preserving smoothing.
Definition: vtkImageAnisotropicDiffusion2D.h:47
vtkImageAnisotropicDiffusion2D::SetNumberOfIterations
void SetNumberOfIterations(int num)
This method sets the number of iterations which also affects the input neighborhood needed to compute...
vtkImageAnisotropicDiffusion2D::DiffusionThreshold
double DiffusionThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:119
vtkImageAnisotropicDiffusion2D::Edges
vtkTypeBool Edges
Definition: vtkImageAnisotropicDiffusion2D.h:123
vtkImageAnisotropicDiffusion2D::ThreadedRequestData
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
vtkImageAnisotropicDiffusion2D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageAnisotropicDiffusion2D::NumberOfIterations
int NumberOfIterations
Definition: vtkImageAnisotropicDiffusion2D.h:118
vtkImageAnisotropicDiffusion2D::DiffusionFactor
double DiffusionFactor
Definition: vtkImageAnisotropicDiffusion2D.h:120
vtkImageAnisotropicDiffusion2D::Iterate
void Iterate(vtkImageData *in, vtkImageData *out, double ar0, double ar1, int *coreExtent, int count)
vtkImageAnisotropicDiffusion2D::vtkImageAnisotropicDiffusion2D
vtkImageAnisotropicDiffusion2D()
vtkImageAnisotropicDiffusion2D::New
static vtkImageAnisotropicDiffusion2D * New()
vtkImageAnisotropicDiffusion2D::Corners
vtkTypeBool Corners
Definition: vtkImageAnisotropicDiffusion2D.h:124
vtkImageAnisotropicDiffusion2D::GradientMagnitudeThreshold
vtkTypeBool GradientMagnitudeThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:126
vtkImageAnisotropicDiffusion2D::Faces
vtkTypeBool Faces
Definition: vtkImageAnisotropicDiffusion2D.h:122
vtkImageAnisotropicDiffusion2D::~vtkImageAnisotropicDiffusion2D
~vtkImageAnisotropicDiffusion2D() override=default
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkImageSpatialAlgorithm
Filters that operate on pixel neighborhoods.
Definition: vtkImageSpatialAlgorithm.h:23
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkImageSpatialAlgorithm.h