MedicalVisualization
Noise Reduction with ITK
← Dicom Writer with ITK | ● | Vessel Emphasis with ITK →
Noise reduction with anisotropic diffusion (itk::GradientAnisotropicDiffusionImageFilter):
// create diffusion filter
typedef itk::Image< double, 3> Image3DDoubleType;
typedef itk::GradientAnisotropicDiffusionImageFilter< Image3DType, Image3DDoubleType > DiffusionImageFilterType;
DiffusionImageFilterType::Pointer diffusionFilter = DiffusionImageFilterType::New();
diffusionFilter->SetInput(reader->GetOutput());
// filter settings
diffusionFilter->SetNumberOfIterations(5);
diffusionFilter->SetTimeStep(0.05);
diffusionFilter->SetConductanceParameter(3.0);
typedef itk::Image< double, 3> Image3DDoubleType;
typedef itk::GradientAnisotropicDiffusionImageFilter< Image3DType, Image3DDoubleType > DiffusionImageFilterType;
DiffusionImageFilterType::Pointer diffusionFilter = DiffusionImageFilterType::New();
diffusionFilter->SetInput(reader->GetOutput());
// filter settings
diffusionFilter->SetNumberOfIterations(5);
diffusionFilter->SetTimeStep(0.05);
diffusionFilter->SetConductanceParameter(3.0);
Applying the anisotropic diffusion filter:
Applying a thresholding filter:
Note: Although diffusion filtering is performed automatically in parallel, diffusion is a computational expensive task that may take several minutes.