clij / clijx-assistant

A user interface for GPU-accelerated image processing using CLIJ2
https://clij.github.io/assistant
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

area fraction; label and binary image #47

Closed pr4deepr closed 3 years ago

pr4deepr commented 3 years ago

Hi Robert Hope you are well. A question, is it possible to measure the area fraction using a label image and binary image? If so, can this be used in the Label Processing/Measurement option to get a label image with the labels having the values for the area fraction (or a custom parameter)?

Happy Holidays.

Cheers Pradeep

haesleinhuepf commented 3 years ago

Hey Pradeep @pr4deepr ,

great question. The solution is maybe not obvious, but yes you can do this. As the pixels in the binary image are 0 and 1, you can measure the area fraction by measuring the mean intensity within the labels. For quantiative analysis, you should use statisticsOfLabelledPixels. For visualisation, you can use Label Mean Intensity Map:

image

Here you also find the corresponding IDFG groovy file for loading my workflow: partial_overlap_quantification_IDFG.zip

Let me know if this does the intended job!

Happy Holidays!

Cheers, Robert

pr4deepr commented 3 years ago

Thanks for the response and apologies for the delay. It definitely does the intended job and I agree its not immediately obvious. Is it worth adding the name area fraction in the name or maybe when searching for area fraction in macro or search bar that this option comes up?

haesleinhuepf commented 3 years ago

Oh, that's actually a great idea. You mean new function like this?

excludeLabelsWithOverlapBelowAreaFraction(label_map1, label_map2, label_map_destination, area_fraction);
pr4deepr commented 3 years ago

Yup, like this.. The blob image example is a really nice one..

Also, is the statisticsOfLabelledPixels available on clij assistant menu?? I couldn't find it..

haesleinhuepf commented 3 years ago

Also, is the statisticsOfLabelledPixels available on clij assistant menu?? I couldn't find it..

No, it's not, because it doesn't result in an image ;-) I don't know yet how to make it available in the assitant...

pr4deepr commented 3 years ago

Ahh, ok. Thanks for letting me know!

On Thu, Jan 21, 2021 at 9:43 PM Robert Haase notifications@github.com wrote:

Also, is the statisticsOfLabelledPixels available on clij assistant menu?? I couldn't find it..

No, it's not, because it doesn't result in an image ;-) I don't know yet how to make it available in the assitant...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/clij/assistant/issues/47#issuecomment-764545797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJQ2IXZEPMJV65II3RGBFDS3AALXANCNFSM4VFIUP3Q .