VTK
vtkImageAnisotropicDiffusion2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageAnisotropicDiffusion2D.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 vtkImageAnisotropicDiffusion2D_h
44 #define vtkImageAnisotropicDiffusion2D_h
45 
46 
47 #include "vtkImagingGeneralModule.h" // For export macro
49 class VTKIMAGINGGENERAL_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialAlgorithm
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
62  void SetNumberOfIterations(int num);
63 
65 
68  vtkGetMacro(NumberOfIterations,int);
70 
72 
79  vtkSetMacro(DiffusionThreshold,double);
80  vtkGetMacro(DiffusionThreshold,double);
82 
84 
89  vtkSetMacro(DiffusionFactor,double);
90  vtkGetMacro(DiffusionFactor,double);
92 
94 
97  vtkSetMacro(Faces,vtkTypeBool);
98  vtkGetMacro(Faces,vtkTypeBool);
99  vtkBooleanMacro(Faces,vtkTypeBool);
100  vtkSetMacro(Edges,vtkTypeBool);
101  vtkGetMacro(Edges,vtkTypeBool);
102  vtkBooleanMacro(Edges,vtkTypeBool);
103  vtkSetMacro(Corners,vtkTypeBool);
104  vtkGetMacro(Corners,vtkTypeBool);
105  vtkBooleanMacro(Corners,vtkTypeBool);
107 
109 
112  vtkSetMacro(GradientMagnitudeThreshold,vtkTypeBool);
113  vtkGetMacro(GradientMagnitudeThreshold,vtkTypeBool);
114  vtkBooleanMacro(GradientMagnitudeThreshold,vtkTypeBool);
116 
117 protected:
120 
124  // to determine which neighbors to diffuse
128  // What threshold to use
130 
131  void ThreadedRequestData(vtkInformation *request,
132  vtkInformationVector **inputVector,
133  vtkInformationVector *outputVector,
134  vtkImageData ***inData, vtkImageData **outData,
135  int extent[6], int id) override;
136  void Iterate(vtkImageData *in, vtkImageData *out,
137  double ar0, double ar1, int *coreExtent, int count);
138 private:
140  void operator=(const vtkImageAnisotropicDiffusion2D&) = delete;
141 };
142 
143 #endif
144 
145 
146 
vtkThreadedImageAlgorithm::ThreadedRequestData
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,...
vtkImageAnisotropicDiffusion2D::Faces
vtkTypeBool Faces
Definition: vtkImageAnisotropicDiffusion2D.h:125
vtkImageAnisotropicDiffusion2D::~vtkImageAnisotropicDiffusion2D
~vtkImageAnisotropicDiffusion2D() override
Definition: vtkImageAnisotropicDiffusion2D.h:119
vtkImageSpatialAlgorithm::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:121
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageAnisotropicDiffusion2D::DiffusionThreshold
double DiffusionThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:122
vtkImageAnisotropicDiffusion2D::Corners
vtkTypeBool Corners
Definition: vtkImageAnisotropicDiffusion2D.h:127
vtkImageAnisotropicDiffusion2D::GradientMagnitudeThreshold
vtkTypeBool GradientMagnitudeThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:129
vtkImageAnisotropicDiffusion2D::DiffusionFactor
double DiffusionFactor
Definition: vtkImageAnisotropicDiffusion2D.h:123
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageSpatialAlgorithm::New
static vtkImageSpatialAlgorithm * New()
vtkImageAnisotropicDiffusion2D
edge preserving smoothing.
Definition: vtkImageAnisotropicDiffusion2D.h:49
vtkImageSpatialAlgorithm.h
vtkImageAnisotropicDiffusion2D::Edges
vtkTypeBool Edges
Definition: vtkImageAnisotropicDiffusion2D.h:126
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::extent
Definition: vtkX3D.h:345
vtkImageSpatialAlgorithm
Filters that operate on pixel neighborhoods.
Definition: vtkImageSpatialAlgorithm.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69