[ome-users] syntax for scripting the windowless importer in Jython
Curtis Rueden
ctrueden at wisc.edu
Fri May 25 17:52:02 BST 2018
Hi Kai,
> Is there maybe a neat way of how I could achieve my goal?
Alison Walter and I will also be at the meeting presenting the latest work
on ImageJ-OMERO [1]. Let's definitely try using it for your stated goals,
since I think it would be a good fit.
With ImageJ-OMERO when you open a large image from OMERO, it reads pixels
only on demand, so you should be able to avoid up-front import of lots of
pixels, and then only process the first time point as desired. The newest
version of ImageJ-OMERO (release forthcoming) now supports ROIs and tables
as well, so all the attached ROIs will come down as well. Then you can work
with them in the ROI Manager.
Regards,
Curtis
[1] https://github.com/imagej/imagej-omero
--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/
On Fri, May 25, 2018 at 11:02 AM, Kai Schleicher <kai.schleicher at unibas.ch>
wrote:
> Hi Jean-Marie,
>
> thanks again for your reply! I realise that my request was not very clear:
>
> I have time laps images (hyperstacks of 2C,75Z, 150T) in OMERO which all
> have ROIs stored in only the first time point. The ROIs where added using
> OMERO.
>
> I am trying to write a script that
>
> (i) fetches the first time point from all hyperstacks of a given dataset
> including their ROIs (ie, per hyperstack 2C,75Z, 1T)
>
> (iii) runs an ImageJ macro on each hyperstack. This macro will require the
> ROIs to be present in the ImageJ ROI manager
>
> My current script is based on the old one from Balaji [1] and already
> achieves this in principle, but I can not limit the import to only the
> first time point.
>
> With the newer version [2] you referred me to this can be fixed, but here
> I failed to import the ROIs from OMERO into the ImageJ ROI manager.
>
> Is there maybe a neat way of how I could achieve my goal?
> Perhaps these two scripts could be combine (maybe including [3]?), but so
> far I failed to do so.
>
> Thank you again for your help and see you soon at the meeting,
> Kai
>
> [1] https://github.com/bramalingam/Omero-Imagej-Scripts/blob/master/omero_
> batch_analysis.py
> [2] https://github.com/ome/training-scripts/blob/master/
> practical/jython/analyse_particles_from_dataset.jy
> [3]
> <https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy>
> <https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy>
> https://github.com/ome/training-scripts/blob/master/
> practical/jython/omero_rois_to_imagej_roi.jy
>
> On 05/21/2018 02:17 PM, Jean-Marie Burel (Staff) wrote:
>
> 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>
> Date: Friday, 18 May 2018 at 16:33
> To: OME User Support List <ome-users at lists.openmicroscopy.org.uk>, jmarie
> burel <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> on behalf
> of Kai Schleicher <kai.schleicher at unibas.ch>
> Reply-To: OME User Support List <ome-users at lists.openmicroscopy.org.uk>
> Date: Thursday, 17 May 2018 at 18:11
> To: "ome-users at lists.openmicroscopy.org.uk" <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 | www.biozentrum.unibas.ch | www.microscopynetwork.unibas.ch
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
>
> _______________________________________________
> ome-users mailing listome-users at lists.openmicroscopy.org.ukhttp://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
>
>
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20180525/62cff824/attachment.html>
More information about the ome-users
mailing list