Suite2P icon indicating copy to clipboard operation
Suite2P copied to clipboard

Error from loadFramesBuff

Open bill-connelly opened this issue 8 years ago • 3 comments

So this might be related to my other issues, but I'm getting

Error using tifflib Unable to change to directory with dirnum = 2.

Error in Tiff/setDirectory (line 1277) tifflib('setDirectory',obj.FileID,dirNum-1);

Specifically, in loadFramesBuff (line 76), the function setDirectory(tiff, firstIdx); is being called where firstIdx is 2. There is only one file in that directly (the TIFF stack). I haven't been able to write a work around as I can't figure out what is happening here.

Any help deeply appreciated.

bill-connelly avatar Aug 21 '17 05:08 bill-connelly

I think this has to do with Matlab's tiff loading library. setDirectory I think should go to the next frame. If this doesn't work, try to see if other methods might work to load your tiff into Matlab. Might also have to do with the size of the tiff? We always operate with tiffs <4GB, so the code doesn't have to do to much memory management. If you do have enough RAM though, it shouldn't really matter.

marius10p avatar Aug 21 '17 14:08 marius10p

is this still not working?

carsen-stringer avatar Oct 30 '17 20:10 carsen-stringer

I haven't checked with >4GB tiffs. I strongly suspect it doesn't as ImageJ tells you that most TIFF readers are unhappy with such files. An example of the message:

Stack is larger than 4GB. Most TIFF readers will only open the first image. Use this information to open as raw: name=Untitled, dir=, width=512, height=512, nImages=24000, offset=204, type=ushort, byteOrder=big, format=0, url=, whiteIsZero=f, lutSize=0, comp=1, ranges=null, samples=1

EDIT: Yup, it doesn't work, though I appear to be getting a different error than last time (note the 256 scanning offset. Obviously the data is not coming in correctly:

running rigid registration bi-directional scanning offset = 256 pixels Index exceeds matrix dimensions.

Error in pick_reg_init (line 25) bestCC = mean(CCsort(:, 1:20), 2);

Error in align_iterative (line 14) ops.mimg = pick_reg_init(data);

Error in reg2P (line 75) ops1{i,j} = align_iterative(single(squeeze(IMG(yFOVs(:,j),xFOVs(:,j),...

Error in run_pipeline (line 57) ops1 = reg2P(ops); % do registration

Error in master_file (line 89) run_pipeline(db, ops0);

bill-connelly avatar Oct 30 '17 22:10 bill-connelly