[ome-users] syntax for scripting the windowless importer in Jython

Jean-Marie Burel (Staff) j.burel at dundee.ac.uk
Mon May 21 13:17:24 BST 2018


Hi Kai

To read the ROI when opening an image from OMERO to ImageJ
We use the Bio-Formats Importer option
The ROIs are read using https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/src/loci/plugins/util/ROIHandler.java

This can be a bit confusing
Will you need a Jython script that convert imagej ROIs to OMERO?

Cheers

Jmarie

From: Kai Schleicher <kai.schleicher at unibas.ch<mailto:kai.schleicher at unibas.ch>>
Date: Friday, 18 May 2018 at 16:33
To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>, jmarie burel <j.burel at dundee.ac.uk<mailto:j.burel at dundee.ac.uk>>
Subject: Re: [ome-users] syntax for scripting the windowless importer in Jython


Hi Jean-Marie,

thanks for your reply and the updated scripts! I switched to the newer version you mentioned and it works like a charm, it was easy to adept to fetch only the time points that I like to have!

I would like to further extend it and get the ROIs associated to that image from OMERO into the ROI manger of ImageJ.

I found how this could be done in the example scripts, i.e https://github.com/ome/training-scripts/blob/master/practical/jython/omero_rois_to_imagej_roi.jy

Just as a question, is this script already available as a class in OMER.insight?
Like a "ROIwriter class", as opposed to the ROIreader class from org.openmicroscopy.shoola.util.roi.io

Since this is a feature that is already in OMERO.insight, I figure there must be such a class, I just don't know its name :)

I apologize in advance, as these type of questions must be tedious to answer one by one (you are not a class/command/package lookup service), but I just started trying to find my way through the documentation.

Thanks and cheers,
Kai

On 05/17/2018 10:11 PM, Jean-Marie Burel (Staff) wrote:
Hi Kai


All the scripts are now available at https://github.com/ome/training-scripts

I did a bit of digging and it seems that the option specifyRanges=true is taken into account only when windowless=false
In that case the values in the range dialog are read.

We have written a new version of the script you mentioned
The new version  does not use the BF-importer plugin
https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy
This should hopefully allow you to only retrieve the planes you want

Cheers
Jmarie

From: ome-users <ome-users-bounces at lists.openmicroscopy.org.uk<mailto:ome-users-bounces at lists.openmicroscopy.org.uk>> on behalf of Kai Schleicher <kai.schleicher at unibas.ch<mailto:kai.schleicher at unibas.ch>>
Reply-To: OME User Support List <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Date: Thursday, 17 May 2018 at 18:11
To: "ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>" <ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>>
Subject: [ome-users] syntax for scripting the windowless importer in Jython


Dear OME-team,

To script the windowless BF-importer in Jython I am building on the cool script by Balaji<https://github.com/bramalingam/Omero-Imagej-Scripts/blob/master/omero_batch_analysis.py>.

I specifically wish to limit the import to the first time-point of my datasets, but I am struggling at getting the syntax right.

In IJ1-macro language it works like this:

run("Bio-Formats Importer", "open=V:/small5Dstack.tif specify_range t_begin=1 t_end=1 t_step=1");
In the jython script I tried to add a line 53:
options += " specifyranges=true tbegin=1 tend=1 tstep=1 "
But it still loads the entire dataset.
I tried a few other strings without luck and was wondering if you could maybe just point me to the proper way of doing it.

Thanks and see you soon at the meeting,
Kai

--
>>Please note my NEW PHONE NUMBERS: +41 61 207 57 31 (direct) +41 61 207 22 50 (central)<<
Kai Schleicher, PhD | Research Associate in Advanced Light Microscopy | Biozentrum, University of Basel | Klingelbergstrasse 50/70 | CH-4056 Basel |
Phone: +41 61 207 57 31 (direct) +41 61 207 22 50 (central) | kai.schleicher at unibas.ch<mailto:kai.schleicher at unibas.ch> | www.biozentrum.unibas.ch<http://www.biozentrum.unibas.ch> | www.microscopynetwork.unibas.ch<http://www.microscopynetwork.unibas.ch>

The University of Dundee is a registered Scottish Charity, No: SC015096


_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20180521/6ff4613d/attachment.html>


More information about the ome-users mailing list