Error opening large tif files
显示 更早的评论
I need to open some very large tif files (up to 25-50GB) and have been trying to use the bigTiffWriter example code given at https://blogs.mathworks.com/steve/2013/08/07/tiff-bigtiff-and-blockproc/ .
When I try and execute inFileInfo = imfinfo(inFile); MATLAB generates seemingly infinite amounts of error messages like this:
Warning: Did not recognize tag format 65535.
> In matlab.io.internal.imagesci.imtifinfo (line 27)
In imtifinfo (line 13)
In imfinfo (line 184) .
It sometimes pauses long enough to also display:
Warning: The next image file directory at byte position 4294967295 is at or beyond the end of the file.
> In matlab.io.internal.imagesci.imtifinfo (line 27)
In imtifinfo (line 13).
The file I'm trying to open is a 'small' test file of only about 1.7GB and is 2160x2560 pixels x 597 layers (z height). The actual images I need to handle will have over 2500 layers. Basically they're cross-sectional tomography images of a kidney and I need to somehow deal with them in 3D to perform spatial analysis of the internal structures. Are these files just too large for MATLAB to handle or am I simply using the wrong methods? My experience with MATLAB is limited to basic introductory calculations and I only have access to R2016a.
Edit to add: I left it to run and it finally stopped with this error message:
Error using matlab.io.internal.imagesci.tifftagsread
Unexpected Standard exception from MEX file.
What() is:bad allocation
..
Error in matlab.io.internal.imagesci.imtifinfo (line 27)
raw_tags = matlab.io.internal.imagesci.tifftagsread(filename,0,0,0);
Error in imtifinfo (line 13)
info = matlab.io.internal.imagesci.imtifinfo(filename);
Error in imfinfo (line 184)
info = feval(fmt_s.info, filename);
Is this potentially more helpful to diagnose the issue?
3 个评论
Walter Roberson
2018-2-13
Walter Roberson
2018-2-13
It would help to run the tiff file through an analyzer to determine whether there is anything unusual about the tags.
Allan Millsteed
2018-2-13
编辑:per isakson
2018-2-13
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!