[ome-devel] Problem with channel names in LSM files

Melissa Linkert melissa at glencoesoftware.com
Tue Sep 30 14:14:42 BST 2014


Hi Lee,

> 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:
*snip* 
> 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.
 
Thanks for triaging this, and for opening the relevant PR (https://github.com/openmicroscopy/bioformats/pull/1361).
We're reading the channel name as specified in the LSM documentation we have from Zeiss, but it's completely possible
for the names to be padded with extra/invalid characters.  The approach you have in the PR is fine, and minor comments aside
I would anticipate being able to merge it quite quickly.

Regards,
-Melissa


On Fri, Sep 26, 2014 at 04:22:31PM -0400, Lee Kamentsky wrote:
> 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

> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



More information about the ome-devel mailing list