sitk.ConnectedComponent

Hi ,
I had a scripting procedure that was using SimpleITK 0.10.0
marker_img = sitk.ConnectedComponent(peak, fullyConnected=True) , where peak is an image 0 , 1.
The sitk.ConnectedComponent was run correctly with no errors.

Now I’m using SimpleITK 1.1.0 and the same command does not work anymore
TypeError: ConnectedComponent() got an unexpected keyword argument ‘fullyConnected’

I have tried to read the manual but i did not find any useful suggestion.
Is the command change? and if yes which is the new syntax?

Thank You
Sincerely
Giuseppe

Hello Giuseppe,

The syntax hasn’t changed, it is a problem/feature of SWIG and needs to be addressed there.

When we overload a function, named arguments don’t work. The ConnectedComponent function has two variants now.

The solution in your case is to provide all arguments based on location (use the default values for those you didn’t provided in the past).

Ziv