[ome-devel] TIFF pyramid support in Bio-Formats - reference files for review

Roger Leigh rleigh at dundee.ac.uk
Fri Mar 23 09:46:49 GMT 2018


On 23/03/18 01:40, Damir Sudar wrote:
> - looking at the scripts, I immediately tried using and adapting
> makepyramid-svs to handle .svs files and output from the ImageMagick
> ptif writer so I can readily generate my own very simple example files
> (and understand better how your scripts work). The changes for ptif are
> quite simple but I'm running into an error with both svs and ptif files
> with the command: "tiffset -d 0 -s 330 $nsubifds $subifds_diroffs
> "$dest"". It fails with:
> TIFFWriteDirectoryTagSubifd: Illegal value for SubIFD tag.
> TIFFWriteDirectoryTagSubifd: Illegal value for SubIFD tag.
> I'm using libtiff 4.0.9 and its associated tools on Ubuntu 14.04. The
> error does not happen with the scn files provided. Could it be related
> to having an offset value that is too large for a non-BigTIFF file? See:
> https://gitlab.com/libtiff/libtiff/blob/master/libtiff/tif_dirwrite.c
> Any ideas?

Yes, you need to apply this change to libtiff:
   https://gitlab.com/libtiff/libtiff/merge_requests/25/diffs
Hopefully this will be in libtiff 4.0.10.  We must be the first users of
tiffset with BigTIFF images to run into this problem.

I should also mention that the scripts have only been tested on Linux,
and might not run on other systems.  Hopefully they will be short-lived;
as soon as we have bfconvert supporting pyramids they can be forgotten.

  I'm enclosing my modified script for ptif and I was using the
> openslide generic pyramid TIFF
> (http://openslide.cs.cmu.edu/download/openslide-testdata/Generic-TIFF/)
> as an example.

Thanks, I'll give this a try!

> - the Leica-Fluorescence-1.scn (and thus all its result files) has the
> channels stored in a way that is not exactly conform how one would
> normally store the channels in the OME-standard way. Am I correct in
> thinking that those channels would normally be in separate top-level
> IFDs each and have their sub-resolutions arranged in SubIFDs under each
> of those top-levels?

Both are permitted, even combined, though this way is certainly less
typical for fluorescence.  For RGB data it's expected though.  You're
absolutely correct about each top-level IFD having separate sub-resolutions.

> - also, all these examples carry some of those ancillary images such as
> slide labels, overview images, etc. While the scripts handled those
> correctly as far as I can see, a reader would have to be pretty smart to
> figure out which of the contents of such an output file is the actual
> image and which are those ancillary images.

Absolutely.  We will need to do something about these as a followup
task, to add the metadata to identify these as labels, overviews, etc.


Kind regards,
Roger

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list