You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether this is an issue with TIFFStack or not, but I'm hoping you might be able to point me towards a solution.
I have a 3D stack that I have saved to disk using the MATLAB Tiff object, which I believe is a wrapper for libtiff. I can open this file (and the image looks correct) using ImageJ or MATLAB imread, so it seems to be a bona fide TIFF file. However, when I try to use TIFFStack to read this file back into MATLAB, I get the following error:
Error using tiffread31_header (line 54)
This is not a TIFF file (no MM or II).
It can't really be possible that MATLAB's Tiff doesn't write the header properly, can it? There must be an issue with the reader, unless I'm missing something. Thanks in advance for any suggestions!
The text was updated successfully, but these errors were encountered:
I think I figured it out: The issue is on line 44 of tiffread31_header.m. Current code is bos = fread(TIF.file, 2, '*char');
The issue is that the 'char' format is platform-dependent, and apparently my system wasn't reading it correctly. I changed it to bos = fread(TIF.file, 2, 'uchar=>char');
which seems to have fixed the issue. Let me know if you want me to submit a pull request for this change.
I'm also getting an error reading files written using Matlab's imwrite function. The error message I get complains about the compression format not being supported:
'Compression format 32773 not supported.'
I've tried specifying the compression mode in imwrite as 'none', 'packbits', or 'lzw', but none of those work. Any suggestions?
I'm not sure whether this is an issue with TIFFStack or not, but I'm hoping you might be able to point me towards a solution.
I have a 3D stack that I have saved to disk using the MATLAB Tiff object, which I believe is a wrapper for libtiff. I can open this file (and the image looks correct) using ImageJ or MATLAB
imread
, so it seems to be a bona fide TIFF file. However, when I try to use TIFFStack to read this file back into MATLAB, I get the following error:It can't really be possible that MATLAB's
Tiff
doesn't write the header properly, can it? There must be an issue with the reader, unless I'm missing something. Thanks in advance for any suggestions!The text was updated successfully, but these errors were encountered: