Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx2.public.one.com ([10.246.18.22])
	by mail6.local.one.com (Dovecot) with LMTP id YpnJI3o2KljqVwEAsyOMew
	for <filtered@awaresystems.be>; Mon, 14 Nov 2016 22:18:54 +0000
X-HalOne-ID: 53919d4b-aab8-11e6-80b0-b82a72d88088
Received: from mail-it0-f41.google.com (unknown [209.85.214.41])
	by mx2.public.one.com (Halon Mail Gateway) with ESMTPS
	for <filtered@awaresystems.be>; Mon, 14 Nov 2016 22:18:53 +0000 (UTC)
Received: by mail-it0-f41.google.com with SMTP id c20so108639127itb.0
        for <filtered@awaresystems.be>; Mon, 14 Nov 2016 14:18:53 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe
         :content-transfer-encoding:sender:errors-to;
        bh=QWyx5Udud5wUfljlwLi3rudh2vcU32g7bIgHgIixnu8=;
        b=KcaQ5YUbUtHK2cLG8+D+ChL/WdEaa6Ohh8zF+sdQJ316EizddpxcXfml3Db6gaYi5g
         JNbebhQMdB17991xXjoVk1R/6D5Xp3z4wbcRVgD225/g8L6viWBHVxRKkofFS6slQyzs
         VtbeNaVhzCFU7Ifk5U3GRx59FGnKSMkzv7DNxSQc8xvRcq5iTEpq7urapFnJNKrHHyzm
         CXfkQG5+SZI5NSYvhvamIeyijIKl+CVdWA5wha5nTezATfIiyVQSyGg6oLFaJG9DE7uG
         gZip8CLb2E7Znz3f8iSEEZkVzbLUhUK+caPRUOAlFpGP22bnyJ9y6pfXfo23CMmJ6dwc
         T7hA==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
X-Gm-Message-State: ABUngvcVhehOxljd3gNt554Sc1jaLjOvI41hBw0knp6rdAGSlAA6ldK1Ypdui4SEOi75bH1GRYgKl3G1QsPxthg9d3xEKOY=
X-Received: by 10.157.17.120 with SMTP id p53mr7081816otp.182.1479161931415;
        Mon, 14 Nov 2016 14:18:51 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.192.135 with SMTP id q129csp1228755oif;
        Mon, 14 Nov 2016 14:18:50 -0800 (PST)
X-Received: by 10.28.63.3 with SMTP id m3mr534306wma.113.1479161930294;
        Mon, 14 Nov 2016 14:18:50 -0800 (PST)
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id p144si485238wme.14.2016.11.14.14.18.49;
        Mon, 14 Nov 2016 14:18:50 -0800 (PST)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 4213135C0A3;
	Mon, 14 Nov 2016 17:18:06 -0500 (EST)
Received: from auth.a.painless.aa.net.uk (auth.a.painless.aa.net.uk
	[90.155.4.51])
	by lists.maptools.org (Postfix) with ESMTPS id D466635C0A1
	for <tiff@lists.maptools.org>; Mon, 14 Nov 2016 17:02:19 -0500 (EST)
Received: from
	d.6.b.b.9.e.3.7.a.0.9.b.7.9.1.7.d.b.d.d.0.6.8.0.0.b.8.0.1.0.0.2.ip6.arpa
	([2001:8b0:860:ddbd:7197:b90a:73e9:bb6d])
	by a.painless.aa.net.uk with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <rleigh@codelibre.net>)
	id 1c6PKT-00036R-IH
	for tiff@lists.maptools.org; Mon, 14 Nov 2016 22:02:19 +0000
To: tiff@lists.maptools.org
References: <D44F69A9.3DCEC%kemp@objectivepathology.com>
	<582A29AF.4060205@osa.pri.ee>
From: Roger Leigh <rleigh@codelibre.net>
Message-ID: <ae3378a0-f839-15e7-27c8-1444bbda2a8f@codelibre.net>
Date: Mon, 14 Nov 2016 22:02:12 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101
	Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <582A29AF.4060205@osa.pri.ee>
X-Painless-Spam-Score: -1.5
Subject: Re: [Tiff] Right way to make a multi-resolution pyramid
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On 14/11/2016 21:16, Paavo Helde wrote:
>
> On 14.11.2016 20:16, Kemp Watson wrote:
>> Hi all:
>>
>> What is the =93correct=94 or canonical way to make a (tiled)
>> multi-resolution pyramid in TIFF?
>>
>> Most implementations I=92ve seen simply chain top-level IFDs together,
>> starting with the base or full-res layer, and going smaller from there
>> to the apex. this seems wrong to me.
>
> You are right, sub-IFDs would be more appropriate. However, sub-IFDs are
> not so well supported by various TIFF readers. That was the reason why
> in my company when they were working out the pyramidal TIFF schema a
> couple of years ago they still went with top-level IFD-s.

That's the way one of the Bio-Formats readers handles it as well:

https://github.com/openmicroscopy/bioformats/blob/develop/components/format=
s-gpl/src/loci/formats/in/PyramidTiffReader.java =

(loop at line 129 just iterates over the IFDs to find the subresolutions)

The software vendor is "Faas", which is from
http://jcb.rupress.org/content/198/3/457
http://jcb.rupress.org/content/198/3/271
(wow, can't believe that was four years ago now).  This is a 921600 x =

380928 pixel image using this format, all from a single tiled BigTIFF =

with pyramid levels.

Online viewer here: =

http://v.jcb-dataviewer.glencoesoftware.com/webclient/img_detail/201/ - =

it's quite fun to look around and the number of pyramid levels is =

ridiculous (12 power of two reductions).

That's a sort-of standard format in that it's supported by a lot of =

biological image analysis and visualisation tools using Bio-Formats for =

file I/O.

[Incidentally, my work on libtiff stuff like CMake is for its sister =

project OME Files C++ which is a conversion of the core Bio-Formats APIs =

and functionality for C++, and libtiff is a core part of that =

functionality.]

This use of multiple IFDs doesn't work with multi-dimensional images =

though, for that I can see SUBIFDs would work much better.  This is one =

thing I've been unsure of how to make use of with the libtiff API =

though.  How to you create the subifd to be able to add it to the tag, =

without it being in the main list of IFDs?  And can you write them out =

from largest to smallest?  Or do you need to write the smaller images =

first so you can reference them in the larger ones?

Doing this is on my TODO list, and so it's quite nice this came up on =

the list in the meantime.


Regards,
Roger
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
