[ome-devel] Can I Add Thumbnails to BioFormats .ome.tiff File
Curtis Rueden
ctrueden at wisc.edu
Fri Jun 30 18:43:56 BST 2017
Hi Michael,
> 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).
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.
Regards,
Curtis
--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/
On Mon, Jun 26, 2017 at 5:00 PM, Michael Ellis <michael.ellis at dsuk.biz>
wrote:
> Dear David Gault,
>
> Firstly, Many thanks for your reply. Any support is over and above what I
> have paid for ;-)
>
> 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).
>
> 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.
>
>
> Regards — Michael Ellis
>
>
> On 26 Jun 2017, at 15:03, David Gault (Staff) <d.gault at DUNDEE.AC.UK
> <d.gault at dundee.ac.uk>> wrote:
>
> Hi Michael,
>
> 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.
>
> 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:
> http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/lo
> ci/formats/FormatTools.html#openThumbBytes-loci.formats.IFor
> matReader-int-
> <http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/loci/formats/FormatTools.html#openThumbBytes-loci.formats.IFormatReader-int->
>
> Additionally for TIFF format readers the default behaviour checks each
> TIFF IFD for the tag ‘IFD.NEW_SUBFILE_TYPE’. 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 ‘getThumbnailIFDs’. If the thumbnailIFD list is
> present then it is used for openThumbBytes rather than the default
> FormatTools method above:
> http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/lo
> ci/formats/in/MinimalTiffReader.html#getThumbnailIFDs--
> http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/lo
> ci/formats/in/MinimalTiffReader.html#getIFDs--
> http://downloads.openmicroscopy.org/bio-formats/5.5.2/api/lo
> ci/formats/in/MinimalTiffReader.html#openThumbBytes-int-
>
> With Thanks,
> David Gault
>
> On 23 Jun 2017, at 12:38, Michael Ellis <michael.ellis at dsuk.biz> wrote:
>
> I am exploring using BioFormat for our computer assisted microscope
> application.
>
> 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.
>
> 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?
>
> 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?
>
> Michael Ellis (Managing Director)
> Digital Scientific UK Ltd.
> http://www.dsuk.biz
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> 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/20170630/3cb8bfd9/attachment.html>
More information about the ome-devel
mailing list