<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Jean-Marie,</p>
<p>thanks again for your reply! I realise that my request was not
very clear:<br>
</p>
<p>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.<br>
</p>
<p>I am trying to write a script that <br>
</p>
<p>(i) fetches the first time point from all hyperstacks of a given
dataset including their ROIs (ie, per hyperstack 2C,75Z, 1T)<br>
</p>
<p>(iii) runs an ImageJ macro on each hyperstack. This macro will
require the ROIs to be present in the ImageJ ROI manager<br>
</p>
<p>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.</p>
<p>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.</p>
<p>Is there maybe a neat way of how I could achieve my goal?<br>
Perhaps these two scripts could be combine (maybe including [3]?),
but so far I failed to do so.</p>
<p>Thank you again for your help and see you soon at the meeting,<br>
Kai</p>
<p>[1]
<a class="moz-txt-link-freetext" href="https://github.com/bramalingam/Omero-Imagej-Scripts/blob/master/omero_batch_analysis.py">https://github.com/bramalingam/Omero-Imagej-Scripts/blob/master/omero_batch_analysis.py</a><br>
[2] <span id="OLK_SRC_BODY_SECTION"><a
href="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<br>
[3] </a></span><a
href="https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy"><span
id="OLK_SRC_BODY_SECTION"> <a class="moz-txt-link-freetext"
href="https://github.com/ome/training-scripts/blob/master/practical/jython/omero_rois_to_imagej_roi.jy">https://github.com/ome/training-scripts/blob/master/practical/jython/omero_rois_to_imagej_roi.jy</a></span><br>
</a><span id="OLK_SRC_BODY_SECTION"></span></p>
<br>
<div class="moz-cite-prefix">On 05/21/2018 02:17 PM, Jean-Marie
Burel (Staff) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:D728756F.76782%25j.burel@dundee.ac.uk">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div>Hi Kai</div>
<div><br>
</div>
<div>To read the ROI when opening an image from OMERO to ImageJ</div>
<div>We use the Bio-Formats Importer option</div>
<div>The ROIs are read using <a
href="https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/src/loci/plugins/util/ROIHandler.java"
moz-do-not-send="true">https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/src/loci/plugins/util/ROIHandler.java</a></div>
<div><br>
</div>
<div>This can be a bit confusing</div>
<div>Will you need a Jython script that convert imagej ROIs to
OMERO?</div>
<div><br>
</div>
<div>Cheers</div>
<div><br>
</div>
<div>Jmarie</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt;
text-align:left; color:black; BORDER-BOTTOM: medium none;
BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT:
0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid;
BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Kai Schleicher
<<a href="mailto:kai.schleicher@unibas.ch"
moz-do-not-send="true">kai.schleicher@unibas.ch</a>><br>
<span style="font-weight:bold">Date: </span>Friday, 18 May
2018 at 16:33<br>
<span style="font-weight:bold">To: </span>OME User Support
List <<a
href="mailto:ome-users@lists.openmicroscopy.org.uk"
moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a>>,
jmarie burel <<a href="mailto:j.burel@dundee.ac.uk"
moz-do-not-send="true">j.burel@dundee.ac.uk</a>><br>
<span style="font-weight:bold">Subject: </span>Re:
[ome-users] syntax for scripting the windowless importer in
Jython<br>
</div>
<div><br>
</div>
<div>
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Jean-Marie,</p>
<p>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!</p>
<p>I would like to further extend it and get the ROIs
associated to that image from OMERO into the ROI manger of
ImageJ.</p>
<p>I found how this could be done in the example scripts,
i.e <a class="moz-txt-link-freetext"
href="https://github.com/ome/training-scripts/blob/master/practical/jython/omero_rois_to_imagej_roi.jy"
moz-do-not-send="true">
https://github.com/ome/training-scripts/blob/master/practical/jython/omero_rois_to_imagej_roi.jy</a><br>
</p>
Just as a question, is this script already available as a
class in OMER.insight?<br>
Like a "ROIwriter class", as opposed to the ROIreader class
from org.openmicroscopy.shoola.util.roi.io<br>
<br>
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 :)<br>
<br>
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.<br>
<br>
Thanks and cheers,<br>
Kai<br>
<br>
<div class="moz-cite-prefix">On 05/17/2018 10:11 PM,
Jean-Marie Burel (Staff) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:D7239E31.7660E%25j.burel@dundee.ac.uk">
<div>Hi Kai</div>
<div><br>
</div>
<div><br>
</div>
<div>All the scripts are now available at <a
href="https://github.com/ome/training-scripts"
moz-do-not-send="true">https://github.com/ome/training-scripts</a></div>
<div><br>
</div>
<div>I did a bit of digging and it seems that the option
specifyRanges=true is taken into account only when
windowless=false</div>
<div>In that case the values in the range dialog are read.</div>
<div><br>
</div>
<div>We have written a new version of the script you
mentioned</div>
<div>The new version does not use the BF-importer plugin</div>
<div><a
href="https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy"
moz-do-not-send="true">https://github.com/ome/training-scripts/blob/master/practical/jython/analyse_particles_from_dataset.jy</a></div>
<div>This should hopefully allow you to only retrieve the
planes you want</div>
<div><br>
</div>
<div>Cheers</div>
<div>Jmarie</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt;
text-align:left; color:black; BORDER-BOTTOM: medium
none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in;
PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP:
#b5c4df 1pt solid; BORDER-RIGHT: medium none;
PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>ome-users
<<a
href="mailto:ome-users-bounces@lists.openmicroscopy.org.uk"
moz-do-not-send="true">ome-users-bounces@lists.openmicroscopy.org.uk</a>>
on behalf of Kai Schleicher <<a
href="mailto:kai.schleicher@unibas.ch"
moz-do-not-send="true">kai.schleicher@unibas.ch</a>><br>
<span style="font-weight:bold">Reply-To: </span>OME
User Support List <<a
href="mailto:ome-users@lists.openmicroscopy.org.uk"
moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a>><br>
<span style="font-weight:bold">Date: </span>Thursday,
17 May 2018 at 18:11<br>
<span style="font-weight:bold">To: </span>"<a
href="mailto:ome-users@lists.openmicroscopy.org.uk"
moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a>"
<<a
href="mailto:ome-users@lists.openmicroscopy.org.uk"
moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a>><br>
<span style="font-weight:bold">Subject: </span>[ome-users]
syntax for scripting the windowless importer in Jython<br>
</div>
<div><br>
</div>
<div>
<div text="#000000" bgcolor="#FFFFFF">
<p>Dear OME-team,</p>
<p>To script the windowless BF-importer in Jython I
am building on the cool <a moz-do-not-send="true"
href="https://github.com/bramalingam/Omero-Imagej-Scripts/blob/master/omero_batch_analysis.py">
script by Balaji</a>.</p>
<p>I specifically wish to limit the import to the
first time-point of my datasets, but I am
struggling at getting the syntax right.</p>
<p>In IJ1-macro language it works like this:<br>
</p>
<blockquote type="cite">run("Bio-Formats Importer",
"open=V:/small5Dstack.tif specify_range t_begin=1
t_end=1 t_step=1");</blockquote>
In the jython script I tried to add a line 53:<br>
<blockquote type="cite">options += "
specifyranges=true tbegin=1 tend=1 tstep=1 "</blockquote>
But it still loads the entire dataset.<br>
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.
<p>Thanks and see you soon at the meeting,<br>
Kai</p>
<pre class="moz-signature" cols="72">--
>>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) | <a class="moz-txt-link-abbreviated" href="mailto:kai.schleicher@unibas.ch" moz-do-not-send="true">kai.schleicher@unibas.ch</a> | <a class="moz-txt-link-abbreviated" href="http://www.biozentrum.unibas.ch" moz-do-not-send="true">www.biozentrum.unibas.ch</a> | <a class="moz-txt-link-abbreviated" href="http://www.microscopynetwork.unibas.ch" moz-do-not-send="true">www.microscopynetwork.unibas.ch</a></pre>
</div>
</div>
</span><br>
<span style="font-size:10pt;">The University of Dundee is
a registered Scottish Charity, No: SC015096</span><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ome-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ome-users@lists.openmicroscopy.org.uk" moz-do-not-send="true">ome-users@lists.openmicroscopy.org.uk</a><a class="moz-txt-link-freetext" href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" moz-do-not-send="true">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a></pre>
</blockquote>
<br>
</div>
</div>
</span><br>
<span style="font-size:10pt;">The University of Dundee is a
registered Scottish Charity, No: SC015096</span>
</blockquote>
<br>
</body>
</html>