Hi Ghislain,<br><br>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 &quot;original metadata&quot; hashtable back into an IFD hashtable.<br>
<br>It shouldn&#39;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 &quot;protected void put(String key, Hashtable ifd, int tag)&quot; to populate things.<br>
<br>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.<br>
<br>-Curtis<br><br><div class="gmail_quote">On Mon, Nov 17, 2008 at 5:54 PM, Ghislain Bonamy <span dir="ltr">&lt;<a href="mailto:GBonamy@gnf.org">GBonamy@gnf.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

















<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Curtis,</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">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).</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">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.</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Thanks,</span></font></p>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<div><div class="Ih2E3d">

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Ghislain
Bonamy, PhD</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">__________________________________________</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Research
Investigator I</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Genomic
Institute of the</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Novartis
Research</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Foundation</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Department
of Molecular &amp; Cell Biology, room G214</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">10675 John Jay Hopkins Drive</span></font><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;"></span></font></p>


<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">San Diego</span></font><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;"> CA 92121</span></font><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;"></span></font></p>


<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">USA</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">&nbsp;</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">+1
(858) 812-1534 (W &amp; F)</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">+1
(757) 941-4194 (H)</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">+1
(858) 354-7388 (M)</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;"><a href="http://www.gnf.org" target="_blank"><span lang="IT">www.gnf.org</span></a></span></font><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT"></span></font></p>


<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;" lang="IT">&nbsp;</span></font></p>

</div><p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">Hudson-Alpha
Institute for Biotechnology</span></font></p>

<p style=""><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;"><a href="http://www.haib.org" target="_blank">www.hudsonalpha.org</a></span></font></p>

</div>

<p><font color="black" face="Arial" size="2"><span style="font-size: 11pt; font-family: Arial; color: black;">&nbsp;</span></font></p>

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:ctrueden.wisc@gmail.com" target="_blank">ctrueden.wisc@gmail.com</a> [mailto:<a href="mailto:ctrueden.wisc@gmail.com" target="_blank">ctrueden.wisc@gmail.com</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Curtis Rueden<br>

<b><span style="font-weight: bold;">Sent:</span></b> Monday, November 17, 2008
3:24 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Ghislain Bonamy<br>
<b><span style="font-weight: bold;">Cc:</span></b>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy.org.uk</a><div class="Ih2E3d"><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [ome-devel] Metadata,
restoring the metadata of the native image format from an OMEXML/OMETIFF file</div></span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Ghislain,</span></font></p><div><div></div><div class="Wj3C7c">

<div>

<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">


<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">I wanted to know how I could recover the proprietary tags of an image<br>
that was saved into an OMEXML or OMETIFF format.<br>
<br>
I am able to save the proprietary tags in the OMEXML and OMETiff format<br>
(using the ImageReader.setOriginalMetadataPopulated(true)), but I cannot<br>
recover them when trying to convert the OMEXML/OMETIFF back to the<br>
native image format. Could you tell me if this is possible and if so how<br>
can I restore these proprietary tags?</span></font></p>

</blockquote>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
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&#39;s header using the information from the
parsed original metadata table. So I am not sure what you are doing when you
are &quot;trying to convert the OMEXML/OMETIFF back to the native image
format.&quot;<br>
<br>
-Curtis</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Mon, Nov 17, 2008 at 5:14 PM, Ghislain Bonamy &lt;<a href="mailto:GBonamy@gnf.org" target="_blank">GBonamy@gnf.org</a>&gt; wrote:</span></font></p>


<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Dear all,<br>
<br>
I wanted to know how I could recover the proprietary tags of an image<br>
that was saved into an OMEXML or OMETIFF format.<br>
<br>
I am able to save the proprietary tags in the OMEXML and OMETiff format<br>
(using the ImageReader.setOriginalMetadataPopulated(true)), but I cannot<br>
recover them when trying to convert the OMEXML/OMETIFF back to the<br>
native image format. Could you tell me if this is possible and if so how<br>
can I restore these proprietary tags?<br>
<br>
Best,<br>
<br>
Ghislain Bonamy, PhD<br>
__________________________________________<br>
Research Investigator I<br>
<br>
Genomic Institute of the<br>
Novartis Research<br>
Foundation<br>
Department of Molecular &amp; Cell Biology, room G214<br>
10675 John Jay Hopkins Drive<br>
San Diego CA
 92121<br>
USA<br>
<br>
+1 (858) 812-1534 (W &amp; F)<br>
+1 (757) 941-4194 (H)<br>
+1 (858) 354-7388 (M)<br>
<a href="http://www.gnf.org" target="_blank">www.gnf.org</a><br>
_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a></span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div></div></div>

</div>


<br>_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk">ome-devel@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a><br>
<br></blockquote></div><br>