[ome-devel] Metadata, restoring the metadata of the native image format from an OMEXML/OMETIFF file

Curtis Rueden ctrueden at wisc.edu
Tue Nov 18 00:03:11 GMT 2008


Hi Ghislain,

The Bio-Formats TIFF writer is capable of writing any IFD entries you want
using the IFD hashtable, but we currently have no trivial way to convert
from the "original metadata" hashtable back into an IFD hashtable.

It shouldn't be too hard to do, but would require some programming. If you
look in loci/formats/in/BaseTiffReader.java, you can see how the TIFF reader
converts IFD entries into original metadata entries: the
initStandardMetadata() method repeatedly calls an internal method with
signature "protected void put(String key, Hashtable ifd, int tag)" to
populate things.

In order to reverse this procedure, you would need to enumerate the IFD
entries that were translated in this way and then translate them back.
Alternately, the TiffReader will give you the full IFD hashtable if you ask,
which you could then pipe directly to an output TIFF using TiffWriter, which
should preserve all the IFD directory entries. Messy stuff, though.

-Curtis

On Mon, Nov 17, 2008 at 5:54 PM, Ghislain Bonamy <GBonamy at gnf.org> wrote:

>  Curtis,
>
>
>
> Thanks for the answer. I should have been more precise and indicate that
> the original format was a TIFF format (with proprietary tags, or rather non
> standard tags).
>
>
>
> I understand why you did not implement writers for proprietary formats.
> However, since I was dealing with a tiff format I was curious to know if
> original tiff tags could be restored. I take it that it is not possible.
>
>
>
> Thanks,
>
>
>
> Ghislain Bonamy, PhD
>
> __________________________________________
>
> Research Investigator I
>
>
>
> Genomic Institute of the
>
> Novartis Research
>
> Foundation
>
> Department of Molecular & Cell Biology, room G214
>
> 10675 John Jay Hopkins Drive
>
> San Diego CA 92121
>
> USA
>
>
>
> +1 (858) 812-1534 (W & F)
>
> +1 (757) 941-4194 (H)
>
> +1 (858) 354-7388 (M)
>
> www.gnf.org
>
>
>
> Hudson-Alpha Institute for Biotechnology
>
> www.hudsonalpha.org <http://www.haib.org>
>
>
>  ------------------------------
>
> *From:* ctrueden.wisc at gmail.com [mailto:ctrueden.wisc at gmail.com] *On
> Behalf Of *Curtis Rueden
> *Sent:* Monday, November 17, 2008 3:24 PM
> *To:* Ghislain Bonamy
> *Cc:* ome-devel at lists.openmicroscopy.org.uk
> *Subject:* Re: [ome-devel] Metadata, restoring the metadata of the native
> image format from an OMEXML/OMETIFF file
>
>
>
> Hi Ghislain,
>
> I wanted to know how I could recover the proprietary tags of an image
> that was saved into an OMEXML or OMETIFF format.
>
> I am able to save the proprietary tags in the OMEXML and OMETiff format
> (using the ImageReader.setOriginalMetadataPopulated(true)), but I cannot
> recover them when trying to convert the OMEXML/OMETIFF back to the
> native image format. Could you tell me if this is possible and if so how
> can I restore these proprietary tags?
>
>
> Bio-Formats cannot write to proprietary file formats, and we have no plans
> for it to do so. If you need to write to such a format, you will need to
> create a writer yourself, and restore the format's header using the
> information from the parsed original metadata table. So I am not sure what
> you are doing when you are "trying to convert the OMEXML/OMETIFF back to the
> native image format."
>
> -Curtis
>
> On Mon, Nov 17, 2008 at 5:14 PM, Ghislain Bonamy <GBonamy at gnf.org> wrote:
>
> Dear all,
>
> I wanted to know how I could recover the proprietary tags of an image
> that was saved into an OMEXML or OMETIFF format.
>
> I am able to save the proprietary tags in the OMEXML and OMETiff format
> (using the ImageReader.setOriginalMetadataPopulated(true)), but I cannot
> recover them when trying to convert the OMEXML/OMETIFF back to the
> native image format. Could you tell me if this is possible and if so how
> can I restore these proprietary tags?
>
> Best,
>
> Ghislain Bonamy, PhD
> __________________________________________
> Research Investigator I
>
> Genomic Institute of the
> Novartis Research
> Foundation
> Department of Molecular & Cell Biology, room G214
> 10675 John Jay Hopkins Drive
> San Diego CA 92121
> USA
>
> +1 (858) 812-1534 (W & F)
> +1 (757) 941-4194 (H)
> +1 (858) 354-7388 (M)
> www.gnf.org
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20081117/d97c442b/attachment-0001.htm 


More information about the ome-devel mailing list