Path: news.mathworks.com!newsfeed-00.mathworks.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!bnewspeer01.bru.ops.eu.uu.net!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!ash.uu.net!spool.news.uu.net!not-for-mail
Newsgroups: comp.soft-sys.matlab
Subject: Problem reading multi-image TIFF files
From: Francis Burton <fburton@nyx.net>
User-Agent: nn/6.6.5
Organization: Nyx Net, The Spirit of the Night
Message-ID: <1257756236.780240@irys.nyx.net>
Cache-Post-Path: irys.nyx.net!1319@nyx3.nyx.net
X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/)
Date: 09 Nov 2009 08:43:57 GMT
Lines: 28
NNTP-Posting-Host: 206.124.29.6
X-Trace: 1257756237  23895 206.124.29.6
Xref: news.mathworks.com comp.soft-sys.matlab:583487


I'm trying to read some image stacks in TIFF format using
imread. The files are created by commercial deconvolution
software. I get the following error:

im=imread('1.stk','Index',3);
??? Error using ==> rtifc
Invalid TIFF image index specified.

Error in ==> readtif at 52
[X, map, details] = rtifc(args);

Error in ==> imread at 430
    [X, map] = feval(fmt_s.read, filename, extraArgs{:});

However, the file opens fine with ImageJ, and if I save
it back to another file, the new file can then be read by
MATLAB.

Does this indicate that the original image stack file is
non-conformant to the TIFF standard, or could it be a
problem with MATLAB itself?

(At the moment, I am working round the problem by invoking
ImageJ in command line mode and getting it to run a macro
to 'convert' each image stack that needs to be read. This
is very slow and a horrible kludge.)

Francis