I am trying to write a batch script for spm_orthviews (in SPM5) that will
display various coloured blobs (for all subjects in several different
analyses) without going through GUI thus circumventing all the clicking.
I can obtain a valid xSPM struct also circuventing the GUI with a little
script that I wrote, but when I get in my script to the line
spm_orthviews('addcolouredblobs',1,xSPM.XYZmm,xSPM.Z,xSPM.Vspm.mat,[1 0 0])
I get the following error:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> spm_orthviews>addcolouredblobs at 485
vol(off) = t;
Error in ==> spm_orthviews at 337
485 vol(off) = t;
It turns out that the variable off has a some negative values, which are
therefore not valid indices.
Nevertheless, the addcolouredblobs option works fine, when I use the GUI
(which I don't want to in this case).
1. Do you have any idea, why I get these negative indices and what I can do
about it? Where's the error in the spm_orthviews call above?
2. The help in "addcolouredblobs" says that the transformation matrix
should got from world to voxle space. Do I need to replace xSPM.Vspm.mat
with inv(xSPM.Vspm.mat) in the spm_orthviews call above?
Thanks a lot,
Jan Gläscher, Ph.D. Div. Humanities & Social Sciences
+1 (626) 395-3898 (office) Caltech, Broad Center, M/C 114-96
+1 (626) 395-2000 (fax) 1200 E. California Blvd
[log in to unmask] Pasadena, CA 91125