Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.3.148])
        by mailst006.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i6GDpnla018012
        for <joris.at.lebbeke@skynet.be>; Fri, 16 Jul 2004 15:51:49 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i6GDpgBD011088
        for <joris.at.lebbeke@skynet.be>; Fri, 16 Jul 2004 15:51:44 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 4833E13717D; Fri, 16 Jul 2004 09:51:29 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205])
	by xserve.flids.com (Postfix) with ESMTP id 9551313716D
	for <tiff@remotesensing.org>; Fri, 16 Jul 2004 09:51:27 -0400 (EDT)
Received: from pobox.com (H156.C195.tor.velocet.net [216.138.195.156])
	by sabre.velocet.net (Postfix) with ESMTP
	id 9DA4C13A27C; Fri, 16 Jul 2004 09:51:24 -0400 (EDT)
Message-ID: <40F7DD5C.10902@pobox.com>
Date: Fri, 16 Jul 2004 09:51:24 -0400
From: Frank Warmerdam <warmerdam@pobox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: yanjianfeng <yanjianfeng@ic.sjtu.edu.cn>
Subject: Re: [Tiff] How to get the image data given that its position rectangle
	is known
References: <WorldClient-F200407161624.AA24180064@ic.sjtu.edu.cn>
In-Reply-To: <WorldClient-F200407161624.AA24180064@ic.sjtu.edu.cn>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: tiff@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: 301e89204a25173f02a77895e109cc20

yanjianfeng wrote:
> In a Tiff file, I want to get the image data in a given rectangle(the 
> Rectangle's location is known: Begining ordinates in the Tiff file and 
> width, height of the range),Then I can put all the data into an Array to 
> process them.
> 
> Is there any relative tools or functions available to solve the problem?

Hi,

Libtiff does not provide a simple function to accomplish what you want.  It
can be done, but you will likely have to have a bunch of logic to collect
your desired window from all strips or tiles touching the window.

Alternatively you can use a higher level library to provide windowed access.
I maintain a library aimed at geospatial applications of raster data which
can do this (GDAL - http://www.remotesensing.org/gdal) but there are others
out there as well.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
