Suite2P icon indicating copy to clipboard operation
Suite2P copied to clipboard

Error in pick_reg_init (line 25)

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

I tried setting db(i).BiDiPhase = 0; or not setting it. Either way, I get the error below.

(See Edit Below)

I set a breakpoint in pick_reg_init(), and I see that all the local variables are empty, apart from data, which is 512 x 512 x 0. Something is obviously going really wrong here, but I've got no idea what.

master_file running rigid registration bi-directional scanning offset = 0 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);

EDIT... I think this is due to how imageJ handles large TIFF stacks. The line

nFr = length(Info0); %Line 23 In GetRandFrames

Returns 1. See this comment https://au.mathworks.com/matlabcentral/answers/108021-matlab-only-opens-first-frame-of-multi-page-tiff-stack

EDIT 2

Work around: After line 23 in GetRandFrames add: mystr = regexp(Info0.ImageDescription, 'images=(\d*)', 'tokens'); nFr = str2double(mystr{1}{1});

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

If you have a large tiff, I would recommend first breaking it out into chunks of <4GB. We have not really tested it with larger tiff sizes.

marius10p avatar Aug 21 '17 14:08 marius10p