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 =========================================================================*/
40 #ifndef vtkImageAnisotropicDiffusion2D_h
41 #define vtkImageAnisotropicDiffusion2D_h
42 
43 
44 #include "vtkImagingGeneralModule.h" // For export macro
46 class VTKIMAGINGGENERAL_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialAlgorithm
47 {
48 public:
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:
117 
121  // to determine which neighbors to diffuse
125  // What threshold to use
127 
128  void ThreadedRequestData(vtkInformation *request,
129  vtkInformationVector **inputVector,
130  vtkInformationVector *outputVector,
131  vtkImageData ***inData, vtkImageData **outData,
132  int extent[6], int id) override;
133  void Iterate(vtkImageData *in, vtkImageData *out,
134  double ar0, double ar1, int *coreExtent, int count);
135 private:
137  void operator=(const vtkImageAnisotropicDiffusion2D&) = delete;
138 };
139 
140 #endif
141 
142 
143 
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:122
vtkImageAnisotropicDiffusion2D::~vtkImageAnisotropicDiffusion2D
~vtkImageAnisotropicDiffusion2D() override
Definition: vtkImageAnisotropicDiffusion2D.h:116
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:118
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageAnisotropicDiffusion2D::DiffusionThreshold
double DiffusionThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:119
vtkImageAnisotropicDiffusion2D::Corners
vtkTypeBool Corners
Definition: vtkImageAnisotropicDiffusion2D.h:124
vtkImageAnisotropicDiffusion2D::GradientMagnitudeThreshold
vtkTypeBool GradientMagnitudeThreshold
Definition: vtkImageAnisotropicDiffusion2D.h:126
vtkImageAnisotropicDiffusion2D::DiffusionFactor
double DiffusionFactor
Definition: vtkImageAnisotropicDiffusion2D.h:120
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageSpatialAlgorithm::New
static vtkImageSpatialAlgorithm * New()
vtkImageAnisotropicDiffusion2D
edge preserving smoothing.
Definition: vtkImageAnisotropicDiffusion2D.h:46
vtkImageSpatialAlgorithm.h
vtkImageAnisotropicDiffusion2D::Edges
vtkTypeBool Edges
Definition: vtkImageAnisotropicDiffusion2D.h:123
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkX3D::extent
Definition: vtkX3D.h:345
vtkImageSpatialAlgorithm
Filters that operate on pixel neighborhoods.
Definition: vtkImageSpatialAlgorithm.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69