Hi!!
I’m trying to include in my in-house Extension the possibility to generate a filtered version of a selected volume using Gradient Anisotropic Diffusion itk filter. The parameters (conductance, iterations…) would be fixed in my .py, with no GUI, so my unique outcome after pushing the “Start” button would be generate the new filtered volume.
I followed this notebook ( 300_Segmentation_Overview ) but the arguments seems to fail.
Please provide the code that you are running and the error message you get.
Alternatively, since these ITK filters are \available in CLI modules (“Curvature Anisotropic Diffusion” and “Gradient Anisotropic Diffusion” modules), you can perform this filtering from Python as described here.
Thank you for your quick response!
I tried what you put forward above using these lines:
outputVolume = slicer.mrmlScene.AddNewNodeByClass(“vtkMRMLScalarVolumeNode”)
outputVolume.SetName(’{}-GADFILTER’.format(inputVolume.GetName()))
The output volume is created but as Invalid Volume, with no spatial information. Should I clone the input and then apply the filter? I’m not sure in which step it is the trouble.