Dear SPM Experts,
I am attempting to use the INRIalign toolbox with SPM8. I am calling it from a batch script, although not one that uses spm_jobman or any of the official spm batch tools -- I'm just adapting some wrapper scripts that were given to me by another researcher. The original wrapper scripts call spm_realign. I thought I could just substitute inria_realign where spm_realign was called, leaving all the flags the same, and letting the flags that are unique to inria_realign stay the defaults. But I am getting an error from within the inria_realign algorithm, whereas when I call spm_realign in the same place everything proceeds as it should.
This is the error:
Index exceeds matrix dimensions.
Error in inria_realign>realign_series (line 350)
b = slope*F - G(msk);
Error in inria_realign (line 138)
P{1} = realign_series(P{1},flags);
Error in ks_alpha_realign (line 27)
inria_realign(realfiles,flagsC);
Error in ks_runalphascript (line 150)
ks_alpha_realign(imgFile);%edited by KS
Error in ks_alphascript (line 400)
ks_runalphascript(sj, flags);%edited by KS
Some further information I collected:
inria_realign crashes when i, the outer loop counter which I understand to be indexing volumes, is 21. (There are 56 volumes in total). iter, the inner loop counter, is 1. size(G) is 18257 1 and size(msk) is 18054 1.
These are the flags I am using to call inria_realign:
flagsC = struct('quality',defs.estimate.quality,'fwhm',5,'rtm',0);
I'm quite new to SPM, and I'm not an experienced Matlab programmer. I don't really feel competent to debug deep inside INRIalign's algorithm without possibly messing something else up, so I may have to give up the idea of using it if the fix doesn't turn out to be pretty clear. But I thought I would ask for your insight before I did. Please let me know if you need any more information.
Thanks very much for your attention,
Katie
|