Read multi-tiff page by page

5 views (last 30 days)
Yunxiu Qiu
Yunxiu Qiu on 8 Jun 2022
Commented: DGM on 11 Jun 2022
Hi, I want to read a multi-tiff file page by page and do interpolation for each page. But I cannot find a function for reading every page of this multi-tiff, the 'imread' function wouldn't work, it just read the first page. Thanks!

Answers (1)

DGM
DGM on 8 Jun 2022
You have to specify the frame that you want to read.
% the file has a .txt extension so that it can be uploaded
A = imread('multitiffclean.tif.txt',1);
imshow(A)
A = imread('multitiffclean.tif.txt',2);
imshow(A)
A = imread('multitiffclean.tif.txt',3);
imshow(A)
A = imread('multitiffclean.tif.txt',4);
imshow(A)
There are probably preferred ways using the Tiff class, but I'm not terribly familiar with it.
  2 Comments
Yunxiu Qiu
Yunxiu Qiu on 11 Jun 2022
But it couldn't recognize the file after I added '.txt' extension..
DGM
DGM on 11 Jun 2022
Don't actually add the txt extension. That's just a workaround because the forum editor will otherwise refuse to attach images with a .tif extension.

Sign in to comment.

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!