clij / clijx

Other
4 stars 6 forks source link

H-watershed #2

Open haesleinhuepf opened 4 years ago

haesleinhuepf commented 4 years ago

Dear friends, dear future-self,

the seeded H-Watershed implemented here would love to get translated to CLIJ. I would drop the user-interface and have the supsicion that the threshold introduces some bug related to correct labelling. Priority should be the H-parameter and the peak-flooding.

Cheers, Robert

ofrag commented 3 years ago

Thumb up for this one !

haesleinhuepf commented 3 years ago

Hi @ofrag ,

I recently implemented a similar operation called "Voronoi-Otsu-Labeling". It's available in ImageJ macro as well, just its demostration is written in Python: https://github.com/clEsperanto/pyclesperanto_prototype/blob/master/demo/segmentation/voronoi_otsu_labeling.ipynb

Would you mind trying it for your use-case? I would love to hear what you think!

Thanks!

Best, Robert

ofrag commented 3 years ago

HI Robert,

I'm probably missing something. How can I try the Voroni-Otsu-Labeling in Fiji? I'm missing the function in my Fiji installation. Which update site do I need to use, (I have CLIJ, CLIJ2, CLIJx, CLIJx-Assistant) ? or do I need to write all the steps myself following the example you pointed ?

I'd like to try this on my data, but it seems that the Voronoi-Otsu-Labeling it is based on object area and distance between objects rather than on object intensity as H_Watershed does. Also my data is 3D smFISH and is not isotropic. If possible, I would like to avoid making it isotropic. Currently I'm using the following workflow that works quite well on my data so far (limited testing), but the H_watershed part is very slow

best Ofra

haesleinhuepf commented 3 years ago

Hi @ofrag ,

voronoiOtsuLabeling should show up in the right-click menu: image

In the Fiji search: image

And in the auto-completion: image

It was introduced in clijx-0.30.1.14 at the beginning of January.

it seems that the Voronoi-Otsu-Labeling it is based on object area and distance between objects rather than on object intensity as H_Watershed does.

Correct!

If possible, I would like to avoid making it isotropic.

Fair enough. I can just make offers :-)

the H_watershed part is very slow

A parallel implementation is very hard if not impossible. That's why I implemented alternative strategies such as Voronoi-Otsu-Labeling which solves the segmentation task in a slightly different way.

Thanks for considering anyway and thanks for your reply!

Best, Robert

ofrag commented 3 years ago

Hi Robert,

Thanks for the detailed explanation, I tried voronoi_otsu_labeling but it did not work on my data (after making it isotropic). I completely understand, you are doing great job and I love CLIJ.

Thanks ! Ofra

bvandenbroek commented 3 years ago

Hi Ofra and Robert,

I just wanted to say that I love the H-watershed as well! I'm constructing almost the exact same workflow as you, and also found that this implementation works well, and most importantly, is quite robust.

Sad to hear that it is difficult to paralellize.

Thanks for all the work you put in! Bram