We're Hiring!

Adding ROIs programmatically locally

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Adding ROIs programmatically locally

Postby icaoberg » Mon Aug 21, 2017 6:15 pm

Hi Team
I have a collection of local OME.TIFFs and a collection of segmentations for each image in the first dataset. I would like to add ROIs to the OME.TIFF without connecting to an OMERO instance.

If this is not possible, then what is the appropriate workflow? In the past we had built a script that adds the ROI after the OME.TIFF has been uploaded

https://github.com/icaoberg/omepslid/bl ... _2dhela.py
https://github.com/icaoberg/omepslid/bl ... _3dhela.py

but again, we want to do it locally.
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: Adding ROIs programmatically locally

Postby bramalingam » Wed Aug 23, 2017 8:32 am

Hi,

Thank you for sharing your code.

What you are looking for is a python implementation of the bio-formats ome-tiff Formatwriter. The CellProfiler team has written and maintained the following code,
https://github.com/CellProfiler/python- ... er.py#L456

The above code uses the python java bridge and the extension of logic used in the following java implementation should solve your problem,
https://github.com/openmicroscopy/biofo ... .java#L467

To highlight an example,
An implementation example for populating rectangle ROI’s in the metadata store can be found in the following lines,
https://github.com/openmicroscopy/biofo ... #L790-L793

Please take a look at the documentation for the MetadataStore class to get detailed information on the methods that are available,
http://static.javadoc.io/org.openmicros ... Store.html

Hope that helps.

Best,
Balaji
User avatar
bramalingam
 
Posts: 70
Joined: Tue Jan 14, 2014 12:01 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron