[ome-devel] Introducing format reader into OMERO
Sebastien Besson (Staff)
s.besson at dundee.ac.uk
Tue Dec 20 09:48:18 GMT 2016
Hi Paul,
On 16 Dec 2016, at 12:34, Paul van Schayck <paul at vanschayck.nl<mailto:paul at vanschayck.nl>> wrote:
Dear all,
I'm working with a FEI Scios microscope (SEM, scanning electron
microscopy) with software (called FEI MAPS) outputting stitched images
of about 20k by 20k pixels. Unfortunately, it does not do this in any
defined format. It does this in files called .raw with the image size
specific in the filename. These are unsigned 16 bit little endian
files with no header. For viewing purposes we would like to import
them into OMERO.
So I've written this reader to support reading the format in
BioFormats and thus OMERO. The code can be found here [1]. This is
working, and after updating both the .jars on the importer side and
the server side (taking the right bioformats version to fork from into
consideration), we can now view the pyramided files in OMERO.
This looks really nice.
But I've got a couple of questions and maybe remarks about this:
- Do you see any issues with the code at the moment?
Having briefly looked at it, it looks like a very good example of a minimal format reader.
- Right now, I let users rename the extension from .raw file to
.scios. I use this then to let Bioformats discover the format reader
(isThisType method). Would it be possible to write an isThisType()
which could do this on the contents of the file, instead of the
extension?
You might want to set both suffixSufficient and suffixNecessary to false and override
isThisType(RandomAccessInputStream) to perform the needed operations on the file content.
The CanonRawReader is a good example of a reader using this strategy:
https://github.com/openmicroscopy/bioformats/blob/v5.3.1/components/formats-gpl/src/loci/formats/in/CanonRawReader.java
- It's quite a hassle to having to update both the server side .jars
and the client side OMERO importer jars. Just updating the server side
is not enough, as the importer will already complain about not knowing
the format. Having to provide your own distribution of the clients is
troublesome. Why can't the importer be agnostic to the formats tried
to be imported?
It’s not that the importer can’t be agnostic to the formats; it’s just that it currently is not. Making it so has certainly been on our cards
for some time. If you or anyone else would like to make an attempt, the relevant code is:
https://github.com/openmicroscopy/openmicroscopy/blob/v5.2.5/components/blitz/src/ome/formats/importer/cli/CommandLineImporter.java#L148
where ImportCandidates should be replaced by a user-provided list based on some command-line argument. This is essentially what’s
done in this Python example:
https://github.com/openmicroscopy/openmicroscopy/blob/v5.2.5/components/tools/OmeroPy/test/integration/test_repository.py#L236
which is perhaps another option in your case.
Best,
Sebastien
Thanks,
Paul van Schayck
[1] https://github.com/M4I-nanoscopy/bioformats/commit/d441b019635214a7e0b2b9213d789bcabe817f15
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
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-devel/attachments/20161220/024db487/attachment.html>
More information about the ome-devel
mailing list