How do I load in an image from a uint16 tiff file? (R2012b)
Show older comments
I have a multi-image uint16 tiff file with 400 images, I want to analyze each individually.
>> numel(imfinfo('filename.tiff')) -> ans = 400
When I call imread with any image's "Index" it returns only a single uint16 matrix of that image rather than the whole image.
>> img = imread('filename.tiff','Index',1);
img is not the first image in the stack. I'm guessing it's just a single uint16 "frame"
>> img = imread('filename.tiff','Index',65536); -> returns an image even though there are only 400 images, but if input 65537 it errors.
>> img = imread('filename.tiff','Info',iminfo,'Index',n) -> doesn't fix my problem
Using R2012a (64bit MacOSX) on a different computer resulted in the proper image being loaded. Thus it's an issue with the most recent version or only with my computer (64bit Windows7). Are there any sort of work arounds?
Accepted Answer
More Answers (1)
Sean de Wolski
on 16 Nov 2012
0 votes
Are you positive it is the same Tiff container and that it was not somehow corrupted?
I would recommend contacting us with the image in question.
Does it read it properly?
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!