<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap:break-word">
Dear Allon and Curtis,
<div><br>
</div>
<div>thanks for your feedback. </div>
<div>A pull request has been opened to integrate your changes suggestion in the bioformats repository - see
<a href="https://github.com/openmicroscopy/bioformats/pull/557">https://github.com/openmicroscopy/bioformats/pull/557</a>.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Sébastien</div>
<div><br>
<div>
<div>On 13 Jun 2013, at 19:52, Curtis Rueden wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">Hi Allon,
<div><br>
</div>
<div>
<div>> The code you sent works with a minor modification: it is necessary to</div>
<div>> convert the name into a string using char().</div>
</div>
<div><br>
</div>
<div style="">Great, thanks for the information. Perhaps Sébastien (the primary bfopen maintainer) will integrate your changes.</div>
<div style=""><br>
</div>
<div style="">One word of caution: it occurred to me after sending that code snippet that there may be a discrepancy between the Bio-Formats/Java 0-indexing and MATLAB's 1-based indices. Off the top of my head, I am not sure whether "getImageName(i)" should
 actually be "getImageName(i-1)" but would be worth double checking, just to be sure.</div>
<div style=""><br>
</div>
<div style="">Regards,</div>
<div style="">Curtis </div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 13, 2013 at 1:42 PM, Allon Klein <span dir="ltr">
<<a href="mailto:Allon_Klein@hms.harvard.edu" target="_blank">Allon_Klein@hms.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
<div style="word-wrap:break-word">Hi Curtis,
<div><br>
</div>
<div>Many thanks for the quick response. The code you sent works with a minor modification: it is necessary to convert the name into a string using char().</div>
<div><br>
</div>
<div>The code below adds the sequence name to the label without deleting any of the other information that bfopen helpfully includes. I added it to bfopen right after:</div>
<div>        % build an informative title for our figure<br>
        label = id;<br>
<br>
</div>
<div><span style="white-space:pre-wrap"></span>% NEW CODE</div>
<div><span style="white-space:pre-wrap"></span> % add series name, if available<br>
<span style="white-space:pre-wrap"></span>sequenceName = char(r.getMetadataStore().getImageName(i));<br>
<span style="white-space:pre-wrap"></span>if ~isempty(sequenceName)<br>
<span style="white-space:pre-wrap"></span>label = [label '; ' sequenceName];<br>
<span style="white-space:pre-wrap"></span>end<br>
<br>
</div>
<div>Thanks again,</div>
<div>Allon
<div>
<div class="h5"><br>
<div>
<div><br>
</div>
<div>On 13 Jun 2013, at 13:24, Curtis Rueden wrote:</div>
<br>
<blockquote type="cite">
<div dir="ltr">Hi Allon,
<div><br>
</div>
<div>I am CCing the ome-users list, which is the best place to ask Bio-Formats questions.</div>
<div><br>
</div>
<div>
<div>> I just started using your matlab functions with loci-tools.jar. Thanks</div>
<div>> for making a wonderful tool!</div>
<div><br>
</div>
<div>Glad to hear it is working for you.</div>
<div><br>
</div>
</div>
<div>
<div>> I noticed a problem, which I suspect has a quick fix. When loading</div>
<div>> multiple series from a .lif file with bfopen, the image "labels" do</div>
<div>> not include the original series title. Instead, the bfopen script</div>
<div>> creates a "meaningful" label that includes information such as "series</div>
<div>> 1/23", but not the actual series label.</div>
<div><br>
</div>
<div>Indeed, it happens here:</div>
<div><br>
</div>
<div><a href="https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/bio-formats/matlab/bfopen.m#L200" target="_blank">https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/bio-formats/matlab/bfopen.m#L200</a></div>
<div><br>
</div>
<div>> This is clearly a matlab-implementation specific issue, because the</div>
<div>> series names are correctly recognized in the imageJ importer.</div>
<div><br>
</div>
<div>Right.</div>
<div><br>
</div>
<div>> I wonder whether you can suggest a quick hack to add this information?</div>
<div>> I tried looking up a user guide for loci-tools.jar, to see what</div>
<div>> command might retrieve the series names. But I couldn't find any</div>
<div>> information.</div>
<div><br>
</div>
<div>Sure, the code would be something like:</div>
<div><br>
</div>
<div># override label with series name, if available</div>
<div>imageName = r.getMetadataStore().getImageName(i);</div>
<div>if imageName ~= ""</div>
<div>  label = imageName;</div>
<div>end</div>
<div><br>
</div>
<div>But I have not tested this, so it may need minor tweaking.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Curtis</div>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Jun 13, 2013 at 9:13 AM, <span dir="ltr"><<a href="mailto:allon_klein@hms.harvard.edu" target="_blank">allon_klein@hms.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
Allon Klein sent a message using the contact form at <a href="http://loci.wisc.edu/contact" target="_blank">
http://loci.wisc.edu/contact</a>.<br>
<br>
Hi,<br>
<br>
I just started using your matlab functions with loci-tools.jar. Thanks for making a wonderful tool!<br>
<br>
I noticed a problem, which I suspect has a quick fix. When loading multiple series from a .lif file with bfopen, the image "labels" do not include the original series title. Instead, the bfopen script creates a "meaningful" label that includes information such
 as "series 1/23", but not the actual series label.<br>
<br>
This is clearly a matlab-implementation specific issue, because the series names are correctly recognized in the imageJ importer.<br>
<br>
For me having the series names is critical, since each series refers to a different condition and the details are stored in the names.<br>
<br>
I wonder whether you can suggest a quick hack to add this information? I tried looking up a user guide for loci-tools.jar, to see what command might retrieve the series names. But I couldn't find any information.<br>
<br>
Thanks very much, in advance, for your help!<br>
<br>
Best wishes,<br>
Allon Klein<br>
Systems Biology<br>
Harvard Medical School<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users<br>
</blockquote>
</div>
<br>
<div><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium"><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word"><span class="Apple-style-span" style="border-collapse:separate; color:rgb(0,0,0); font-family:Helvetica; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:2; text-indent:0px; text-transform:none; white-space:normal; widows:2; word-spacing:0px; font-size:medium">
<div style="word-wrap:break-word">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK   Tel: (01382) 386364</div>
</div>
</span></div>
</span></span></div>
<br>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>