TubeTK/Anisotropic Hybrid Diffusion with Continuous Switch
This module is an implementation of diffusion based smoothing technique developed by Mendrik et al.
Mendrik AM, Vonken EJ, Rutten A, Viergever MA, van Ginneken B. Noise reduction in computed tomography scans using 3-d anisotropic hybrid diffusion with continuous switch. IEEE Trans Med Imaging. 2009 Oct;28(10):1585-94.
Algorithm synopsis
This algorithm is based on anisotropic non-linear diffusion. The technique combines edge-preserving noise reduction while enhancing local structures. This algorithm uses a hybrid approach that combines the advantages of EED ( Edge enhancing diffusion ) and CED ( Cohnerence enhancing diffusion ).
EED focuses on edge preservation and enhancement. In EED, strong smoothing is applied along the direction of the edge while the strength of the smoothing along the other perpendicular directions depends on the gradient. The higher the gradient the lower the smoothing strength would be. Applying EED to a medical image would enhance boundaries of larger organs but would blur vessels and smaller structures.
On the other hand, CED is designed to to connect lines and improve flow-like structures. Running CED on medical images would preserve smaller structures and filter vessels but would not filter noise and plate-like structures. Therefore a hybrid technique was proposed to combine intelligently the benefits of the two techniques.
The main underlying equation in this algorithm is the anisotropic diffusion equation
Where
- is the divergence operator
- is the gradient of the image
- is the diffusion tensor
The diffusion tensor allows to tune the smoothing( both the strength and direction ) across the image. is defined as a function of the structure tensor.
Where is the Gaussian Kernel with standard deviation scale and is the gradient of the image at scale
denote the eigen vectors of the structure tensor. The eigenvalues define the strength of the smoothing along the direction of the corresponding eigen vector
EED, CED and Hybrid switch differ in the way they define .
Implementation
Using ITK framework
The implementation of this algorithm in tubetk follows ITK's finite difference solver framework. The framework uses solver filter and function. The following four main classes are implemented
- Structure tensor generation filter ( Second moment matrix generator that is currently not available in ITK )
- Edge-enhancing diffusion filter
- Coherence-enhancing diffusion filter
- Hybrid continuous diffusion filter
Current ITK diffusion filters are based on scalar or vector valued diffusion functions. But in this algorithm, we are using tensor-based diffusion function. Hence, this required doing some partial differential derivation Part 1 Part 2. This derivation is implemented in the solver function.
Class Diagram
Class hierarchy of the finite difference solver image filters
Class hierarchy of the finite difference solver function
Structure Tensor Generation Filter
Overview
The principle directions of diffusion/smoothing are based on the local structure. For this purpose, local structure tensor generator is needed. We implemented such type of filter using ITK's recursive Gaussian filter. The structure tensor is defined as follows
Relevant files
- itkStructureTensorRecursiveGaussianImageFilter header file
- itkStructureTensorRecursiveGaussianImageFilter Implementation file
- Test
The itkStructureTensorRecursiveGaussianImageFilterTest generates primary eigen vector and eigen value images for visual inspection
tubeBasePreprocessingFiltersTests itkStructureTensorRecursiveGaussianImageFilterTest CylinderSynthetic.mha CylinderPrimaryEigenVectorImage.mha CylinderPrimaryEigenValueImage.mha
The results can be viewed best using Paraview as follows
- Load the input image ( CylinderSynthetic.mha )
- Apply contour filter
- Load the primary eigen vector image ( CylinderPrimaryEigenVectorImage )
- Apply glyph filter
You will be able to visualize the eigen vectors overlayed on the input image.
Input parmaters
Edge Enhancing Diffusion Filter
Overview
EED is a plate enhancing diffusion filter in 3D.
Given , the eigen values of the structure tensor in order of decreasing magnitude, strong diffusion is performed in the direction of and . The diffusion in the direction of depends on the gradient magnitude.
The diffusion tensor diagonal matrix will have the following elements
or depending on the gradient magnitude
Parameter is computed using threshold parameter, contrast parameter and gradient magnitude. If the gradient magnitude is much smaller than the contrast parameter, isotropic diffusion is performed
Relevant files
- itkAnisotropicEdgeEnhancementDiffusionImageFilter Header file
- itkAnisotrpicEdgeEnhancementDiffusionImageFilter Implementation file
- Test
Input parameters
- Contrast parameter ( Default: 30 )
- Scale parameter ( Default: 1.0 )
- Time step ( Default: 0.11 )
- Number of iterations ( Default: 6 )
Coherence Enhancing Diffusion Filter
Overview
Given , the eigen values of the structure tensor in order of decreasing magnitude, CED performs diffusion in the direction of or diffusion is minimized in all three directions
The diffusion tensor diagonal matrix will have the following elements
or her value depending on the values of or
Parameter is computed using the contrast parameter specified by the user.
Relevant files
- itkAnisotropicCoherenceEnhancingDiffusionImageFilter Header file
- itkAnisotropicCoherenceEnhancingDiffusionImageFilter Implementation file
- Test
Input parameters
- Contrast parameter ( Default: 15.0 )
- ( Default: 0.001 )
- Scale parameter ( Default: 1.0 )
- Time step ( Default: 0.11 )
- Number of iterations ( Default: 6 )
Hybrid Continuous Filter
Overview
is the EED fraction that is computed using the eigen values of the structure tensor. For detail, refer the paper.
Relevant files
- itkAnisotropicHybridDiffusionImageFilter Header File
- itkAnisotropicHybridDiffusionImageFilter Implementation file
- Test
Input parameters
- CED Contrast parameter ( Default: 15.0 )
- EED Contrast parameter ( Default: 30 )
- Hybrid Contrast parameter ( Default 30.0 )
- CED ( Default: 0.001 )
- Scale parameter ( Default: 1.0 )
- Time step ( Default: 0.11 )
- Number of iterations ( Default: 6 )