[ome-users] question about image format conversion
Curtis Rueden
ctrueden at wisc.edu
Mon Oct 8 06:40:56 BST 2007
Hi Jerry,
I have been holding off on replying to your question because we are
very close to a release of Bio-Formats capable of doing much of what
you ask. However, the release is still another day or two off, so I am
answering now rather than delaying any longer.
> I would like to be able to take a
> TIFF file, along with an Excel spreadsheet containing metadata, and
> convert it into an OME-TIFF or OME-XML image.
There is no completely automatic way to do this currently. It really
depends on what kind of metadata you have in your spreadsheet. It
would be fairly easy (for a programmer) to write a program that sucks
in the metadata from the spreadsheet, populates an OME-XML document
according to its values, and inserts the XML into a TIFF file. Code
for accomplishing many of these steps can be found on the OME-TIFF web
site on the "Example source code" page
(http://loci.wisc.edu/ome/ome-tiff-code.html).
The trickiest part is mapping your XLS metadata into OME-XML --
whether you can do so effectively depends on what your metadata is and
whether is there is a spot for it in the current XML schema. If not,
you can define custom attributes to house the information in a
structured form, though we would be interested in any feedback you
have regarding anything you perceive to be missing from the OME-XML
schema.
> I would also like to do the
> opposite - take an OME-TIFF or OME-XML image, and extract the metadata
> into an Excel spreadsheet (or perhaps a tab-delimited text-file).
Doing this is much easier. You can certainly extract the metadata into
an XML string using a program like "TiffComment" from the "Sample
source code" page on the OME-TIFF site, or the ImageMagick "identify
-verbose" command. Converting that into a spreadsheet would be fairly
straightforward -- you'd just parse out the fields you want, and put
them into a non-hierarchical list.
Bio-Formats can also list "original" metadata parsed from non-OME
formats as key/value pairs, which would be easily insertable into a
spreadsheet as well.
> Also, is there (or will there be) support for Photoshop (.psd) images?
Yes, the latest Bio-Formats supports PSD. And the latest OME v2.6.1
release uses Bio-Formats to read many different file formats. So it
should be possible to import PSDs into OME server. Let us know if you
have problems with it.
> Again, is there currently a conversion tool that can convert a photoshop
> image into an OME-XML/OME-TIFF image?
Yep, there is a command line conversion utility called bfconvert
bundled with the Bio-Formats command line tools
(http://www.loci.wisc.edu/ome/formats.html, click "Using Bio-Formats
from the command line"). You can use this program to convert between
formats that Bio-Formats supports (but note that you can only output
to formats that Bio-Formats can write, highlighted in blue in the
formats table on the site).
So for example, to convert from PSD to OME-TIFF, you could type:
bfconvert myimage.psd myimage.ome.tif
Be sure to specify ".ome.tif" rather than just ".tif" or you'll get a
plain TIFF file instead of an OME-TIFF.
Sadly, we significantly broke OME-TIFF in the latest release (sorry
about that). We are working as quickly as we can to fix the problem,
so look for a new Bio-Formats release early this week with some
critical OME-TIFF bugfixes that will make this conversion routine work
correctly.
> Ideally, for our system, we would like to have a standard for the images
> stored on our OME server (such as OME-TIFF or OME-XML), while still having
> the flexibilty of a client being able to download and view the images in
> say, Photoshop; or extracting meta-data into Excel.
Could you elaborate at all on what kinds of metadata your group is
most interested in?
Thanks,
Curtis
On 9/29/07, jchen at alumni.caltech.edu <jchen at alumni.caltech.edu> wrote:
> Hello,
>
> First of all, I want to say that people have been very helpful in
> answering my questions regarding OME.
>
> I have a question about image formats. I would like to be able to take a
> TIFF file, along with an Excel spreadsheet containing metadata, and
> convert it into an OME-TIFF or OME-XML image. I would also like to do the
> opposite - take an OME-TIFF or OME-XML image, and extract the metadata
> into an Excel spreadsheet (or perhaps a tab-delimited text-file). Are
> there currently such programs that can do these things?
>
> Also, is there (or will there be) support for Photoshop (.psd) images?
> Again, is there currently a conversion tool that can convert a photoshop
> image into an OME-XML/OME-TIFF image?
>
> Ideally, for our system, we would like to have a standard for the images
> stored on our OME server (such as OME-TIFF or OME-XML), while still having
> the flexibilty of a client being able to download and view the images in
> say, Photoshop; or extracting meta-data into Excel.
>
> Thanks!
> -Jerry
>
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>
More information about the ome-users
mailing list