51CTO Explanation:
Mean value filter: http://book.51cto.com/art/201504/474128.htm
Gaussian Smoothing: http://book.51cto.com/art/201504/474129.htm
Median filter: http://book.51cto.com/art/201504/474130.htm
Anisotropic filtering: http://book.51cto.com/art/201504/474131.htm
Demo Address:
Mean value filter: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageConvolve/
Gaussian Smoothing: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageGaussianSmooth/
Median filter: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageHybridMedian2D/
Anisotropic filtering: https://lorensen.github.io/VTKExamples/site/Cxx/Images/ImageAnisotropicDiffusion2D/
Mean filter Key code:
vtksmartpointer<vtkimageconvolve> convolvefilter =
vtksmartpointer<vtkimageconvolve>::new ();
Convolvefilter->setinputconnection (Source->getoutputport ());
Double Kernel[9] = {1,1,1,1,1,1,1,1,1};
CONVOLVEFILTER->SETKERNEL3X3 (kernel);
Convolvefilter->update ();
Effect Diagram:
Gaussian smoothing Key code:
vtksmartpointer<vtkimagegaussiansmooth> Gaussiansmoothfilter =
vtksmartpointer< Vtkimagegaussiansmooth>::new ();
Gaussiansmoothfilter->setinputconnection (Source->getoutputport ());
Gaussiansmoothfilter->update ();
Effect Diagram:
Median filter Key code:
vtksmartpointer<vtkimagehybridmedian2d> Hybridmedian =
vtksmartpointer<vtkimagehybridmedian2d>:: New ();
Hybridmedian->setinputconnection (Reader->getoutputport ());
Effect Diagram:
Anisotropic filtering Key code:
vtksmartpointer<vtkimageanisotropicdiffusion2d> diffusion =
vtksmartpointer< Vtkimageanisotropicdiffusion2d>::new ();
Diffusion->setinputconnection (Reader->getoutputport ());
Diffusion->setnumberofiterations (iterations);
Diffusion->setdiffusionthreshold (threshold);
Diffusion->update ();
Effect Diagram: