imagej / imagej-legacy

ImageJ+ImageJ2 compatibility layer
https://imagej.net/libs/imagej-legacy
BSD 2-Clause "Simplified" License
16 stars 25 forks source link

Add converters between label images and ROIs #219

Open imagejan opened 5 years ago

imagejan commented 5 years ago

Converting a list of ROIs to a label image (either consisting of suitable integers, or a real Img<LabelingType>) and vice versa is a common use case.

You can find scripts doing this (or similar tasks) in several places online, e.g. this gist by @NicoKiaru: https://gist.github.com/NicoKiaru/ae00117cd6d33fea500d2867a5e669d9

I think it would be useful to have this functionality available "centralized" in Fiji, so let's implement Converters for the following cases:

imagejan commented 3 years ago

Here's another example of an implementation that wouldn't be required if we had better tools in core Fiji:

https://github.com/ariel-waisman/LabelsToROis

imagesc-bot commented 3 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/segmentation-masks-from-rois-plugins/55582/2