[ome-users] [Software Feedback] MATLAB bfopen discards series names
Sebastien Besson
s.besson at dundee.ac.uk
Fri Jun 14 08:51:33 BST 2013
Dear Allon and Curtis,
thanks for your feedback.
A pull request has been opened to integrate your changes suggestion in the bioformats repository - see https://github.com/openmicroscopy/bioformats/pull/557.
Cheers,
Sébastien
On 13 Jun 2013, at 19:52, Curtis Rueden wrote:
Hi Allon,
> The code you sent works with a minor modification: it is necessary to
> convert the name into a string using char().
Great, thanks for the information. Perhaps Sébastien (the primary bfopen maintainer) will integrate your changes.
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.
Regards,
Curtis
On Thu, Jun 13, 2013 at 1:42 PM, Allon Klein <Allon_Klein at hms.harvard.edu<mailto:Allon_Klein at hms.harvard.edu>> wrote:
Hi Curtis,
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().
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:
% build an informative title for our figure
label = id;
% NEW CODE
% add series name, if available
sequenceName = char(r.getMetadataStore().getImageName(i));
if ~isempty(sequenceName)
label = [label '; ' sequenceName];
end
Thanks again,
Allon
On 13 Jun 2013, at 13:24, Curtis Rueden wrote:
Hi Allon,
I am CCing the ome-users list, which is the best place to ask Bio-Formats questions.
> I just started using your matlab functions with loci-tools.jar. Thanks
> for making a wonderful tool!
Glad to hear it is working for you.
> 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.
Indeed, it happens here:
https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/bio-formats/matlab/bfopen.m#L200
> This is clearly a matlab-implementation specific issue, because the
> series names are correctly recognized in the imageJ importer.
Right.
> 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.
Sure, the code would be something like:
# override label with series name, if available
imageName = r.getMetadataStore().getImageName(i);
if imageName ~= ""
label = imageName;
end
But I have not tested this, so it may need minor tweaking.
Regards,
Curtis
On Thu, Jun 13, 2013 at 9:13 AM, <allon_klein at hms.harvard.edu<mailto:allon_klein at hms.harvard.edu>> wrote:
Allon Klein sent a message using the contact form at http://loci.wisc.edu/contact.
Hi,
I just started using your matlab functions with loci-tools.jar. Thanks for making a wonderful tool!
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.
This is clearly a matlab-implementation specific issue, because the series names are correctly recognized in the imageJ importer.
For me having the series names is critical, since each series refers to a different condition and the details are stored in the names.
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.
Thanks very much, in advance, for your help!
Best wishes,
Allon Klein
Systems Biology
Harvard Medical School
_______________________________________________
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
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
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/20130614/d6dd0d30/attachment.html>
More information about the ome-users
mailing list