How to set parameters on CED, EED and cCEED

(Dimitris Lolis) #1

Hello, I’m quite new to this framework but i can’t get a grasp of how to use its python interface. I would like to replicate the weikert Diffusion type in the simplest way possible by denoising some of my own images like show in https://insightsoftwareconsortium.github.io/ITKAnisotropicDiffusionLBR/ .

So far i’ve succeeded in using the CoherenceEnhancingDiffusionImageFilter, but i can’t seem to be able to change the various parameters (lambda, diffusion time, feature scale etc.) like in the website.
Any help is really appreciated

–Dimitris

(Dimitris Lolis) #2

it seems that it’s as simple as SetLambda on the instance of the filter

1 Like
(Dimitris Lolis) #3

@dzenanz i still can’t find the EED and CED filters though

(Dženan Zukić) #4

SetEnhancement is used to switch between enum EnhancementType { CED, cCED, EED, cEED, Isotropic }.

1 Like
(Dimitris Lolis) #5

@dzenanz In this example code here

instance = itk.CoherenceEnhancingDiffusionImageFilter[itk.Image[itk.F,2]].New(rescaled_image)
instance.SetEnhancement(arg) # arg has to be constant.
(Dženan Zukić) #6

Someone more experienced in Python wrapping is better suited to answer this, perhaps @blowekamp (@matt.mccormick is on a conference :smiley:)

(Dimitris Lolis) #7

For anyone else that might be searching this.
instance.SetEnhancement(instance.cEED) , same goes for EED CED.
This way you set the filter how you want it.

2 Likes