Cannot access multiple channels in demultiplexed scanimage stack
Closed this issue · 4 comments
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
@YishGene
Hi @YishGene,
Could you please tell me the expected size of the ScanImage stack, and the result of typing size(t)
in Matlab?
Hi @DylanMuir ,
thanks for your reply!
>> size(t)
ans =
210 512 2 4999
This is the expected size. On disk it's ~2.07 GB, and the only thing slightly off with these tiffs is that reading them using tifflib results in warnings of this sort:
Warning: TIFF library warning - 'TIFFFetchNormalTag: ASCII value for tag
"ImageDescription" does not end in null byte.'
> In TIFFStack (line 278)
-Yishai
OK, here's something weird: I can't seem to reproduce the error now. Matlab has been killed and restarted a number of times since I encountered the issue, and now I can go all these operations without error. I don't know exactly what else has changed. I'm not entirely sure what tiff I was originally trying to open but a random selection of other tiffs worked all fine. Sorry!