<div dir="ltr">Hi Michael,<div><br></div><div><div>> I have just erased the use of java.awt so I can still run headless if</div><div>> needed (at present headless is not a high priority requirement but I</div><div>> am trying to build in a future proof way).</div></div><div><br></div><div>Just to clarify this: you _can_ use most java.awt classes headless. What you cannot do is instantiate java.awt.Window subclasses. The reason ImageJ 1.x cannot run headless is because it instantiates java.awt.Frame (the ImageJ main window) and java.awt.Dialog (GenericDialogs) invisibly even when running in batch mode. That's why ImageJ2 has to do its outrageous patching process to enable headless support. But I think you should be fine calling the Bio-Formats thumbnail API here, even headless. If in doubt, test it.</div><div><br></div><div>Regards,</div><div>Curtis</div><div class="gmail_extra"><br clear="all"><div><div class="m_-6455362923673441114m_3221956449331509783gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px">--</span></div><div><span style="font-size:12.8px">Curtis Rueden</span><br></div><div><span style="font-size:12.8px">LOCI software architect - <a href="https://loci.wisc.edu/software" target="_blank">https://loci.wisc.edu/software</a></span></div><div>ImageJ2 lead, Fiji maintainer - <span style="font-size:12.8px"><a href="https://imagej.net/User:Rueden" target="_blank">https://imagej.net/User:Rued<wbr>en</a></span></div><div>Did you know ImageJ has a forum? <a href="http://forum.imagej.net/" target="_blank">http://forum.imagej.net/</a></div><div><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jun 26, 2017 at 5:00 PM, Michael Ellis <span dir="ltr"><<a href="mailto:michael.ellis@dsuk.biz" target="_blank">michael.ellis@dsuk.biz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear David Gault,<div><br></div><div>Firstly, Many thanks for your reply. Any support is over and above what I have paid for ;-)<div><br></div><div>In respect of my application, it looks like openThumbBytes() will be off limits to me since I have just erased the use of java.awt so I can still run headless if needed (at present headless is not a high priority requirement but I am trying to build in a future proof way).</div><div><br></div><div>Also for our purposes we would want a per image thumbnail, rather than a per channel thumbnail whether thumbnail represents a snapshot of how the XYCZT looked to the user subject to his selection of viewing parameters when last editing the image. It’s definitely work in progress for me.</div><div><br></div><div><br></div><div>Regards — Michael Ellis</div><div><div class="m_-6455362923673441114m_3221956449331509783h5"><div><br></div><div><br><div><div><blockquote type="cite"><div>On 26 Jun 2017, at 15:03, David Gault (Staff) <<a href="mailto:d.gault@dundee.ac.uk" target="_blank">d.gault@DUNDEE.AC.UK</a>> wrote:</div><br class="m_-6455362923673441114m_3221956449331509783m_-3313055695906811851Apple-interchange-newline"><div>
<div style="word-wrap:break-word">
Hi Michael,
<div><br>
</div>
<div>Currently the OME Data Model does not specifically support the storing of thumbnails although this is something that we would like to look into specifying in the future.</div>
<div><br>
</div>
<div>Within the FormatTools utility class you can find the openThumbBytes method which provides a default implementation of generating a thumbnail from an existing image. The implementation can vary for different format readers but the default behaviour
is to scale the image to a size of 128 x 128: </div>
<div><a href="http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/loci/formats/FormatTools.html#openThumbBytes-loci.formats.IFormatReader-int-" target="_blank">http://downloads.openmicroscop<wbr>y.org/bio-formats/5.5.2/api/lo<wbr>ci/formats/FormatTools.html#op<wbr>enThumbBytes-loci.formats.IFor<wbr>matReader-int- </a></div>
<div><br>
</div>
<div>Additionally for TIFF format readers the default behaviour checks each TIFF IFD for the tag ‘<span style="font-family:Monaco;font-size:11px">IFD.</span><font face="Monaco" style="color:rgb(3,38,204);font-size:11px">NEW_SUBFILE_TYPE’</font>.
If the tag has a value of 1 then the IFD is added to a list of thumbnailIFDs rather than the standard IFD list. The 2 separate lists can then be read using ‘getIFDs’ and ‘getThumbn<wbr>ailIFDs’. If the thumbnailIFD list is present then it is used for openThumbBytes
rather than the default FormatTools method above:</div>
<div><a href="http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/loci/formats/in/MinimalTiffReader.html#getThumbnailIFDs--" target="_blank">http://downloads.openmicroscop<wbr>y.org/bio-formats/5.5.2/api/lo<wbr>ci/formats/in/MinimalTiffReade<wbr>r.html#getThumbnailIFDs--</a></div>
<div><a href="http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/loci/formats/in/MinimalTiffReader.html#getIFDs--" target="_blank">http://downloads.openmicroscop<wbr>y.org/bio-formats/5.5.2/api/lo<wbr>ci/formats/in/MinimalTiffReade<wbr>r.html#getIFDs--</a></div>
<div><a href="http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/loci/formats/in/MinimalTiffReader.html#openThumbBytes-int-" target="_blank">http://downloads.openmicroscop<wbr>y.org/bio-formats/5.5.2/api/lo<wbr>ci/formats/in/MinimalTiffReade<wbr>r.html#openThumbBytes-int-</a></div>
<div><br>
</div>
<div>With Thanks,</div>
<div>David Gault</div>
<div><br>
<blockquote type="cite">On 23 Jun 2017, at 12:38, Michael Ellis <<a href="mailto:michael.ellis@dsuk.biz" target="_blank">michael.ellis@dsuk.biz</a>> wrote:<br>
<br>
I am exploring using BioFormat for our computer assisted microscope application.<br>
<br>
I need to store XYCZT image files and need to store meta data such as pixel size, channel names, microscope and camera information along with the image. Images could be large and I also would like to implement a gallery view that can display visual view of a
whole directory of images.<br>
<br>
Is there a way to store a thumbnail images when saving an image file in .ome.tiff file that can be easily and quickly recovered from the image file for the purposes of displaying a gallery of images?<br>
<br>
Even better, are there any operating system extensions that allow this thumbnail to be accessible such that the thumbnail is viewable in the operating systems default file finder/browser… thus obviating the need for me to implement a graphic gallery of images?<br>
<br>
Michael Ellis (Managing Director)<br>
Digital Scientific UK Ltd.<br>
<a href="http://www.dsuk.biz/" target="_blank">http://www.dsuk.biz</a><br>
<br>
______________________________<wbr>_________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy<wbr>.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.or<wbr>g.uk/mailman/listinfo/ome-deve<wbr>l</a><br>
</blockquote>
<br>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div>
______________________________<wbr>_________________<br>ome-devel mailing list<br><a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy<wbr>.org.uk</a><br><a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank">http://lists.openmicroscopy.or<wbr>g.uk/mailman/listinfo/ome-deve<wbr>l</a><br></div></blockquote></div><br></div></div></div></div></div></div><br>______________________________<wbr>_________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank">ome-devel@lists.openmicroscopy<wbr>.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" rel="noreferrer" target="_blank">http://lists.openmicroscopy.or<wbr>g.uk/mailman/listinfo/ome-deve<wbr>l</a><br>
<br></blockquote></div><br></div></div>