Yes, I see that, unfortunately I don’t have time to dig into this much further and I haven’t used the SimpleFilters module from python before. I did get far enough to see that it looks like that filterParameters.inputs argument is a list of the filter-specific parameters performing the same function as the filterParameters dictionary you constructed above. The relevant code is in these lines (I think) https://github.com/SimpleITK/SlicerSimpleFilters/blob/fb849201697f75d114d0f2803e145fb1196df9f8/SimpleFilters/SimpleFilters.py#L585-L633, but I haven’t been able to sort out what exactly goes in that list (i.e. whether parameter names are included somehow or whether the values just need to be supplied in an expected order (which I’m sure would match the order in which they appear in the auto-constructed GUI for the SimpleFilters module). I’m sure there are others on this forum who have used SimpleFilters from python who should be able to quickly give you an answer, so hopefully one of them will weigh in soon. Sorry I couldn’t be more help!
There are only two Slicer-specific SimpleITK Python functions - for moving images between SimpleITK and Slicer. See complete examples in 03_Image_Processing_using_SimpleITK notebook and complete specification here:
>>> import sitkUtils
>>> help(sitkUtils.PushVolumeToSlicer)
Help on function PushVolumeToSlicer in module sitkUtils:
PushVolumeToSlicer(sitkimage, targetNode=None, name=None, className='vtkMRMLScalarVolumeNode')
Given a SimpleITK image, push it back to slicer for viewing
:param targetNode: Target node that will store the image. If None then a new node will be created.
:param className: if a new target node is created then this parameter determines node class. For label volumes, set it to vtkMRMLLabelMapVolumeNode.
:param name: if a new target node is created then this parameter will be used as basis of node name.
If an existing node is specified as targetNode then this value will not be used.
>>> help(sitkUtils.PullVolumeFromSlicer)
Help on function PullVolumeFromSlicer in module sitkUtils:
PullVolumeFromSlicer(nodeObjectOrName)
Given a slicer MRML image node or name, return the SimpleITK
image object.