Page 1 of 1

Extract ROIs in an OME-XML to ImageJ?

PostPosted: Wed Jan 30, 2019 3:12 pm
by Kouichi_C_Nakamura
Hi,

I'm pretty sure that the answer is No, but I wonder if there is an established way to retrieve ImageJ ROI data (a zip file with many .roi files) out of the ROI information embedded in an OME-XML.

I can see the following steps to achieve this:

1. Read the OME-XML to get the dimension of the image
2. Create a dummy image (stack) of that dimension and save it as an OME-TIFF using Fiji
3. Inject the OME-XML to that dummy image using Bio-Formats command line tools
4. Open the file using Bio-Formats Importer in Fiji
5. Export ROIs into a zip file

Is there any easier way to do this?

Best,
Kouichi

Re: Extract ROIs in an OME-XML to ImageJ?

PostPosted: Fri Feb 01, 2019 4:11 pm
by dgault
Hi, we certainly dont have any established process for doing this. The way you have suggested is long but should achieve the right result. Another possibility might be to create an ImageJ macro that can retrieve the ROIs from the XML and create them in ImageJ again.

Another alternative, rather than creating dummy OME-TIFF and injecting the XML, would be to use fake files with regions (see https://docs.openmicroscopy.org/bio-for ... mages.html). That might help eliminate some of the steps.

Re: Extract ROIs in an OME-XML to ImageJ?

PostPosted: Fri Feb 01, 2019 4:37 pm
by Kouichi_C_Nakamura
Thank you for the suggestion.

Whichever way to choose, it requires a lot of dependancies. Writing Java plugin might be the simplest, as your suggestion.

Cheers,
Kouichi