Comments (29)
Hi,
Could you please let me know which versions of matlab you are using on both the OS X and the Windows 7 system (using version
)?
from tiffstack.
Windows 7: 8.4.0.150421 (R2014b)
OS X: 8.5.0.197613 (R2015a) (But I have been using it under the same R2014b successfully)
But I haven't tried the commit you made 3 days ago yet.
from tiffstack.
So I tried the latest commit on both R2014b and R2015a on Windows 7 and R2015a on Mac OS X and now it's not working on either one, but I get a different error:
( I did delete and recompile the MEX files, just to be sure, recompiling works fine)
Undefined function or variable "vnRetDataSize".
Error in TIFFStack/subsref (line 367)
if (prod(vnRetDataSize) == 0)
from tiffstack.
Sorry for that reversion. The latest commit should fix that issue.
Could you try again please? And include the matlab
command which fails on Windows 7 but not OS X?
Thanks,
Dylan.
from tiffstack.
So the commit fixed the new error. Now it's working again on Mac but not on Windows. I tested it on another windows machine and the same error occurs.
>> ts = TIFFStack('D:\test_stack2.tif');
>> ts(1)
Error using TIFFStack>TS_read_data_Tiff (line 719)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 396)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>> ts(:,:,1)
Error using TIFFStack>TS_read_data_Tiff (line 719)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 396)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>> ts(:)
Error using TIFFStack>TS_read_data_Tiff (line 683)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 396)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>> ts(1,1,1)
Error using TIFFStack>TS_read_data_Tiff (line 719)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 396)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>>
from tiffstack.
Ok. Please try ts(end)
and let me know.
from tiffstack.
What are the dimensions of your stack? (i.e. size ts
)?
from tiffstack.
Here you go
>> size(ts)
ans =
512 512 88
>> ts(end)
Error using TIFFStack>TS_read_data_Tiff (line 719)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 396)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>>
from tiffstack.
Ok. Please pull the latest commit, create your stack, type diagnostic(ts)
, and send me the output.
from tiffstack.
>> ts = TIFFStack('D:\test_stack2.tif');
--- TIFFStack: Compiling MEX functions.
Building with 'Microsoft Visual C++ 2013 Professional (C)'.
MEX completed successfully.
>> diagnostic(ts)
512x512x88 TIFFStack array with properties:
bInvert: 0
strFilename: 'D:\test_stack2.tif'
sImageInfo: [88x1 struct]
strDataClass: 'uint16'
Private properties:
bUseTiffLib: 1
fhReadFun: TS_read_Tiff_striped_chunky
vnDimensionOrder: [1 2 3 4 ]
fhRepSum: mapped_tensor_repsum
>>
from tiffstack.
Please comment out lines 234 and 236, leaving line 235 in:
% if (verLessThan('matlab', '8.3'))
strReadFun = [strReadFun '_pre2014'];
% end
and try again with diagnostic(ts)
, ts(1)
and ts(end)
.
from tiffstack.
>> ts = TIFFStack('D:\test_stack2.tif');
>> diagnostic(ts)
512x512x88 TIFFStack array with properties:
bInvert: 0
strFilename: 'D:\test_stack2.tif'
sImageInfo: [88x1 struct]
strDataClass: 'uint16'
Private properties:
bUseTiffLib: 1
fhReadFun: TS_read_Tiff_striped_chunky_pre2014
vnDimensionOrder: [1 2 3 4 ]
fhRepSum: mapped_tensor_repsum
>> ts(1)
Error using TIFFStack>TS_read_data_Tiff (line 729)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>> ts(end)
Error using TIFFStack>TS_read_data_Tiff (line 729)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack,
S.subs, bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>>
from tiffstack.
Please comment out line 671 (try
) and lines 688--694 (catch
to end
), try ts(1)
and send me the error message.
from tiffstack.
I did that but note that the error gets thrown in Line 719, so the result stays the same:
>> ts = TIFFStack('D:\test_stack2.tif');
>> diagnostic(ts)
512x512x88 TIFFStack array with properties:
bInvert: 0
strFilename: 'D:\test_stack2.tif'
sImageInfo: [88x1 struct]
strDataClass: 'uint16'
Private properties:
bUseTiffLib: 1
fhReadFun: TS_read_Tiff_striped_chunky_pre2014
vnDimensionOrder: [1 2 3 4 ]
fhRepSum: mapped_tensor_repsum
>> ts(1)
Error using TIFFStack>TS_read_data_Tiff (line 729)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
>>
So I did additionally comment out the try-catch statements for the block in which the error get actually thrown (712-731) and this is the result:
>> ts = TIFFStack('D:\test_stack2.tif');
>> diagnostic(ts)
512x512x88 TIFFStack array with properties:
bInvert: 0
strFilename: 'D:\test_stack2.tif'
sImageInfo: [88x1 struct]
strDataClass: 'uint16'
Private properties:
bUseTiffLib: 1
fhReadFun: TS_read_Tiff_striped_chunky_pre2014
vnDimensionOrder: [1 2 3 4 ]
fhRepSum: mapped_tensor_repsum
>> ts(1)
Subscripted assignment dimension mismatch.
Error in TIFFStack>TS_read_Tiff_striped_chunky_pre2014 (line
933)
tfImageBuffer(row_inds,:,:) =
tifflib('readEncodedStrip', tlStack, stripNum);
Error in TIFFStack>TS_read_data_Tiff (line 721)
[tfData(vbThesePixels), tfImage] =
oStack.fhReadFun(tfImage, tlStack, spp, w, h,
rps, tw, th,
vnFrameLinearIndices(vbThesePixels));
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
>>
from tiffstack.
Great, thanks. Please revert lines 234 and 236 and try again.
from tiffstack.
>> ts = TIFFStack('D:\test_stack2.tif');
>> diagnostic(ts)
512x512x88 TIFFStack array with properties:
bInvert: 0
strFilename: 'D:\test_stack2.tif'
sImageInfo: [88x1 struct]
strDataClass: 'uint16'
Private properties:
bUseTiffLib: 1
fhReadFun: TS_read_Tiff_striped_chunky
vnDimensionOrder: [1 2 3 4 ]
fhRepSum: mapped_tensor_repsum
>> ts(1)
Subscripted assignment dimension mismatch.
Error in TIFFStack>TS_read_Tiff_striped_chunky (line 853)
tfImageBuffer(row_inds,:,:) =
tifflib('readEncodedStrip', tlStack, stripNum-1);
Error in TIFFStack>TS_read_data_Tiff (line 721)
[tfData(vbThesePixels), tfImage] =
oStack.fhReadFun(tfImage, tlStack, spp, w, h,
rps, tw, th,
vnFrameLinearIndices(vbThesePixels));
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
>>
from tiffstack.
Please send a copy of the matlab toolbox file Tiff.m
, from the Windows 7 machine, by attaching it to this issue. Or you can mail it to me if you prefer.
Thanks for your willingness to help debug!
from tiffstack.
Github doesn't allow attaching anything but images. I've emailed you the file. I appreciate your dedication getting this to run.
from tiffstack.
Ok, it's seriously weird. Please run with dbstop error
, and when it breaks, please send me this output:
r
rps
h
row_inds
strip_num
size(tfImageBuffer)
from tiffstack.
>> ts = TIFFStack('D:\test_stack2.tif');
>> dbstop error
>> ts(1)
Subscripted assignment dimension mismatch.
Error in TIFFStack>TS_read_Tiff_striped_chunky (line 853)
tfImageBuffer(row_inds,:,:) =
tifflib('readEncodedStrip', tlStack, stripNum-1);
Error in TIFFStack>TS_read_data_Tiff (line 721)
[tfData(vbThesePixels), tfImage] =
oStack.fhReadFun(tfImage, tlStack, spp, w, h,
rps, tw, th,
vnFrameLinearIndices(vbThesePixels));
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
853 tfImageBuffer(row_inds,:,:) = tifflib('readEncodedStrip', tlStack, stripNum-1);
K>> save('D:\error_workspace.mat')
I have sent you the mat file per email
from tiffstack.
All the values look reasonable. Last thing to check is what's coming our of tifflib
. Please replace line 853 with:
tfTmp = tifflib('readEncodedStrip', tlStack, stripNum-1);
tfImageBuffer(row_inds,:,:) = tfTmp;
and then please send me the workspace again.
from tiffstack.
>> dbstop error
>> ts = TIFFStack('D:\test_stack2.tif');
>> ts(1)
Subscripted assignment dimension mismatch.
Error in TIFFStack>TS_read_Tiff_striped_chunky (line 855)
tfImageBuffer(row_inds,:,:) = tfTmp;
Error in TIFFStack>TS_read_data_Tiff (line 721)
[tfData(vbThesePixels), tfImage] = oStack.fhReadFun(tfImage,
tlStack, spp, w, h, rps, tw, th,
vnFrameLinearIndices(vbThesePixels));
Error in TIFFStack/subsref (line 406)
tfData = TS_read_data_Tiff(oStack, S.subs,
bLinearIndexing);
855 tfImageBuffer(row_inds,:,:) = tfTmp;
from tiffstack.
Could you please send a copy of the offending tiff file, from the windows machine?
from tiffstack.
I've sent you a shared link to a google drive folder containing the file.
from tiffstack.
This bug should now be fixed in the latest commit. Please pull the latest changes and check.
imfinfo
reported a different number of rows per strip than tifflib
, only on Windows. The number reported by tifflib
was correct. TIFFStack
now checks for this inconsistency, and uses the tifflib
value.
Thanks again for helping out with debugging.
from tiffstack.
Thanks for your commitment to resolving my issue. Works fine now.
from tiffstack.
Great, thanks for letting me know.
from tiffstack.
Hello,
I'm trying to use your TIFFStack library and getting errors like this on stacks taken on scanimage system. I can ready the first channel in the first image, but any attempt to get further than that gives me the error:
Error using TIFFStack>TS_read_data_Tiff (line 1327)
*** TIFFStack: Could not read data from image file.
Error in TIFFStack/subsref (line 685)
tfData = TS_read_data_Tiff(oStack, S.subs, bLinearIndexing);
Caused by:
Subscripted assignment dimension mismatch.
i.e. this works:
t = TIFFStack('file.tiff', [], 2);
a = t(:, :, 1,1)
but this not:
a = t(:,:,2,1)
Thanks!
Yishai
from tiffstack.
Extra comment moved to new issue #26
from tiffstack.
Related Issues (20)
- Resolved: Files with more than 2^16 images cannot be accessed correctly HOT 11
- .ImageDescription does not appear after getImageInfo() HOT 1
- Get offset position to find varying metadata HOT 1
- Error reading ANDOR tags in tiffread31_readtags HOT 2
- Slow loading from server compared with hard drive (much slower than ImageJ) HOT 3
- Cannot access multiple channels in demultiplexed scanimage stack HOT 4
- Matlab system error when running the function with 2017b version HOT 16
- Reading header tags is slow, especially for files with many frames HOT 3
- Epic
- ImageJ hyperstacks which mis-report the number of frames in the stack cause an error HOT 8
- tiffstack not opening the file HOT 5
- Error in opening big tiff stacks
- Support for slicing and concatenting? HOT 5
- Conversion to other types HOT 1
- Question about speed HOT 4
- Trouble reading tiff files saved by MATLAB HOT 2
- TIFFStack crashes on MATLAB R2021b HOT 1
- .Tif
- @TIFFStack
- Error with uint indexes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiffstack.