[ome-devel] Problem with channel names in LSM files
Lee Kamentsky
leek at broadinstitute.org
Fri Sep 26 21:22:31 BST 2014
Hi all,
We're having a problem with the ZeissLSMReader (documented here:
https://github.com/CellProfiler/CellProfiler/issues/1207). It seems like
the reader is reading two characters too many for the user's file when it
reads the channel names. Here's some Python using the (imho so excellent)
Python javabridge package and the 5.0.5 bioformats_package jar:
import javabridge
my_jar = r"c:\Users\leek\Downloads\bioformats_package_5.0.5.jar"
my_jars = javabridge.JARS + [my_jar]
javabridge.start_vm(class_path=my_jars)
path = r"c:\Temp\output\issue1207\DAY3WT1B.LSM"
rdr = javabridge.JClassWrapper("loci.formats.in.ZeissLSMReader")()
metadata = javabridge.JClassWrapper("loci.formats.ome.OMEXMLMetadataImpl")()
rdr.setMetadataStore(metadata)
rdr.setId(path)
print metadata.getChannelName(0, 0)
The output is "Ch2-T1��" - the last two characters are 0xfffd =
garbage and that makes the XML parser throw an exception when it tries
to output OME XML for the file (which is causing our problems).
I am guessing that you have little control over the proprietary format
and that decoding the channel names has been largely guesswork. I may
take a look at this myself and see if I can find out how to read those
names correctly.
--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20140926/53e17975/attachment.html>
More information about the ome-devel
mailing list