Problems using 3D Watershed block in protocols


I have been using Icy to try and segment 3D gastruloids stained with florescent markers and have come up with a protocol that splits the channels, applies the ‘Edge preserving Denoising and Smoothing’ filter before HK-Means thresholding to get a binary image. I am then using the binary image to generate a distance map. Subsequently, because there are a lot of overlapping and clustered cells, I wanted to use watershed to separate the cells with the distance map and binary image as inputs, however, I have tried playing around with the watershed block for some time now and it always results in an error and ‘bug report’.

Apologies if anything doesn’t make sense, I am fairly new to Icy to some of my problems may simply be because I have missed something basic.

I would be grateful for any suggestions on how to resolve this issue or suggestions of alternative methods of segmenting highly clustered cells.

Many thanks!

Dear Errin,

I need some more information to help you.

  1. Which version of Icy do you use ?

  2. Could upload a screenshot of the error message and bug report?
    There might be also useful information in the log window of the protocol editor (on the right, you may need to click on the little arrow on the left of the text “Execution log” to open it)

and in the output tab (right side panel).

  1. In addition to documenting the bug you encounter, could you share an example image and your protocol ? This is useful to reproduce the bug but also to suggest alternative segmentation methods.

Many thanks in advance.
Best regards,

1 Like

Dear Marion,

Thank you very much for your reply, it is greatly appreciated.

  1. I am using Icy version

  2. Here are the screenshots of the bug reports:

  3. Here is my current protocol: Watershed_.protocol (12.7 KB)
    and an example image: Haneen OCT4 SOX17 2020.2.19 - B02 KSR BMP4 OCT4 SOX17 sph (19.7 MB)

Many thanks in advance and best wishes,


Dear Errin,

Look like @ThomasBoudier renamed its plugin class name to WaterShed_3D so it’s why it cannot be found with that protocol referencing the old class name. We fixed the plugin online so it will correctly remove the old one to only keep the new plugin with the new class name to avoid confusion but olds protocols referencing the old version of the plugin need to be fixed as well. It’s just what i did with your protocol (replacing internally the WaterShed3D plugin class name) and so now it should open correctly :slight_smile:
Watershed_fixed.protocol (12.6 KB)


– Stephane


Dear Errin,

I checked the fixed protocol from @Stephane with him. He fixed the bug you found, but unfortunalely there is a second one…

More precisely, the error message you see will be fixed with this new version of the protocol after you remove the old version from Watershed 3D.
To do so,

  1. Go to the Preferences menu (icon with the crossed tools)
  2. In the Local plugin section, search for the watershed plugins
  3. Select the oldest of the two watershed plugins (version and click on remove
  4. Re-open the protocol editor, load the Watershed_fixed.protocol.

Unfortunately when running the fixed protocol, a new error message is now popping :frowning:

Fortunately, @Stephane is working on it :+1:

Best regards,


Thanks Marion for clarifying and providing details about how to fix the duplicate plugin issue.
Also hopefully just by editing the protocol i could fix the second issue so here’s a new version :
Watershed_fixed2.protocol (13.5 KB)

Hope it works correctly for you now !


– Stephane


Dear Stephane and Marion,

I have removed the old version of the plugin and tried the new protocol and the block is now functioning properly, this has been a great help, thank you very much for your time and assistance, it is greatly appreciated!

Best wishes,