Hi - I'm having some trouble with the new spm99 batch system, and wanted
to see if I could enlist some help. I'm trying to do batch
normalization,
so I set up the files as follows:
(normalize_bch.m)
%---------------------------------------------------------------
analyses = struct( ...
'type', [7], ...
'work_dir', [1], ...
'mfile', [1], ...
'index', [1] ...
);
%---------------------------------------------------------------
type = {'model','contrasts','defaults_edit','headers',...
'means','realign','normalize','smooth'};
%---------------------------------------------------------------
work_dir = { ...
'/raid/part3/dyslexia/anatomy',...
};
%---------------------------------------------------------------
mfile = { ...
'./normalize_bch_ex',...
};
(normalize_bch_ex.m)
image_files=spm_get('files','/raid/part3/dyslexia/anatomy','*3danat.img');
normalize(1) = struct( ...
'option', 3,...
'nbsubjects', 25,...
'object_masking', 0,...
'template',
'/usr/fmri_progs/spm99/templates/T1.img',...
'type', 0,...
'mask_brain', 0,...
'interp', 1,... %bilinear
'bounding_box', 1,...
'voxel_sizes', [2 2 4],...
'image', image_files,...
'images', image_files ...
);
each of these works fine when run on its own, but when I run
spm_bch('normalize_bch.m','FMRI') I get the following error:
SPM99: spm_sn3d (v2.20) 17:19:40 - 03/02/2000
========================================================================
Subject 1: Smoothing..
* - SPM99: spm_vol ------------------------------------------------
Error reading information on:
/
Please check that it is in the correct format.
----------------------------------------- 17:19:41 - 03/02/2000
??? Error using ==> spm_vol (subfunc1)
Can't get volume information for '/'
Error in ==> /usr/fmri_progs/spm99/spm_vol.m (subfunc2)
On line 48 ==> V = subfunc1(P);
Error in ==> /usr/fmri_progs/spm99/spm_vol.m
On line 34 ==> V = subfunc2(P);
Error in ==> /usr/fmri_progs/spm99/spm_smooth.m
On line 31 ==> P = spm_vol(P);
Error in ==> /usr/fmri_progs/spm99/spm_sn3d.m
On line 724 ==>
spm_smooth(P(1,:),fullfile('.','spm_sn3d_tmp.img'),params(5));
Error in ==> /usr/fmri_progs/spm99/spm_sn3d.m
On line 534 ==>
spm_sn3d(subj(i).P,subj(i).matname,bb,Vox,...
Error in ==> /usr/fmri_progs/spm99/spm_bch.m
On line 187 ==> spm_sn3d;
it appears from this that instead of the entire filename making it into
subj(1).P, only
the first character of the filename ('/') is making it.,
however, the input filename list seems to be correct (that is,
normalize(1).image
contains a 25x53 char array with the correct filenames).
Part of my difficulty in debugging this comes from my lack of
understanding of
how the batch mode of spm_input() works. on line 343 of spm_sn3d.m
there is
a call to spm_input:
subj(i).P = spm_input('batch',{},'image',i);
this call seems to be the root of my problem, but I have not been able
to figure out exactly
what spm_input is trying to do with this set of arguments and why it's
only giving back
that first character.
any suggestions about where my problem might lie would be greatly
appreciated.
cheers,
russ
--
Russell A. Poldrack, Ph. D.
MGH-NMR Center
Building 149, 13th St.
Charlestown, MA 02129
Phone: 617-726-4060
FAX: 617-726-7422
Email: [log in to unmask]
Web Page: http://www.nmr.mgh.harvard.edu/~poldrack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|