[ome-users] Using Bio-formats through Python

Josh Moore josh at glencoesoftware.com
Thu Nov 1 12:32:26 GMT 2012


On Nov 1, 2012, at 5:59 AM, Steve Bennett wrote:

> Hi all,

Hi Steve,

>  I work on a project called MyTardis [1] that is a Django-based
> research data repository used particularly for protein
> crystallography, electron microscopy, and synchrotron science at
> research institutions around Australia. New deployments typically
> spend time writing filters to read file formats, mostly in order to
> extract metadata (occasionally data visualisation too). It's occurred
> to us[2] that it might make more sense to use (and contribute to) an
> existing library like Bio-formats. The data files include standard
> image files (.tif), instrument-specific image files (eg, FEI,
> Philips...), numeric spectrum data, and I think some 3D formats. We
> may be starting work on some neuroimaging data (NIFTI etc) soon.
> 
> Obviously, Bio-formats is Java, and MyTardis is Python. Judging from
> http://loci.wisc.edu/bio-formats/interfacing-non-java-code, the most
> sensible approach is perhaps Ice?
> 
> So, I was wondering if anyone has experience with this kind of Python
> usage, and perhaps has some sample code to share?

Most of OMERO could be thought of as an Ice-based (therefore) Python-accessible wrapper around Bio-Formats, so there are definitely bits of code we can point you to in terms of writing an Ice interface. It all very much depends on how you intend to deploy it, etc. OMERO.web for example which is also Django-based, connects to OMERO (ultimately) via an API defined in these Ice files:

https://github.com/openmicroscopy/openmicroscopy/tree/master/components/blitz/resources/omero/

I.E, for whatever actions you want to take on the Bio-Formats that you are wrapping with Ice, you'll want to have minimally a method, if not a service, that provides the functionality which would then need to be implemented in Java.

> Our major use cases would be:
> 1) At the time of (asynchronous) import, MyTardis would call
> Bio-formats to request specific information about the file: instrument
> parameters, user name, image dimensions - whatever is appropriate.
> 2) (less important) Calling Bio-formats to extract pixel-level data,
> or even do wholesale image conversions (eg, to .jpeg)

A couple of questions first:

 * How many instances of Bio-Formats should be running and on how many servers?
 * Do they need to be started/stopped?
 * What kind of security, etc. is needed? (i.e. would a firewall protect them)

Cheers,
~Josh

> Performance is not a major consideration for most deployments  -
> imports take place in the background, usually after the researcher has
> left the instrument.
> 
> Thanks,
> Steve
> 
> Victorian e-Research Strategic Initiative (Melbourne)
> 
> [1] http://mytardis.github.com/ - new web page in development
> [2] Prompted by meeting Jason Swedlow at an e-Research conference in
> Sydney this week.
> 




More information about the ome-users mailing list