-
Hi Vikingy,
That is great. With Karsten's hint, I am doing this at the moment and
seeing the light now.
Many thanks and regards,
Wei Wen
vikingy wrote:
> Hi Wen Wei,
> Maybe this is not a perfect solution for your question, I guess you
> can do like this :
> 1. get a jobfile just select one subject as the source image through
> spm's GUI, named "tempjob.mat";
> 2. write a matlab script to modify the jobfile
> cd /xxx/data % specify your source image's directory and read their names
> subjects = struct2cell(dir);
> [m.n] = size (subjects);
> load tempjob.mat %load the jobfile and add in the all source images
> for i = 3:n
> subjects_name = subject{1,i};
> jobs{1,1}.spatial{1,1}.normalise{1,1}.estwrite.subj(1,i+1).source =
> subjects_name;
> jobs{1,1}.spatial{1,1}.normalise{1,1}.estwrite.subj(1,i+1).resample =
> jobs{1,1}.spatial{1,1}.normalise{1,1}.estwrite.subj(1,1).resample ;
> jobs{1,1}.spatial{1,1}.normalise{1,1}.estwrite.subj(1,i+1).wtsrc =
> subjects_name;
> end
> save alljob.mat jobs %save the modified jobfile
> 3. load the modified jobfile in spm's GUI and run it.
> help this can help you!
> bin lv
> 2008-06-05
> ------------------------------------------------------------------------
> The Key Lab of Complex Systems and Intelligence Science,
> Institute of Automation,
> Chinese Academy of Sciences.
> ------------------------------------------------------------------------
> *发件人:* Wen, Wei
> *发送时间:* 2008-06-04 16:30:28
> *收件人:* [log in to unmask]
> *抄送:*
> *主题:* Re: [SPM] SPM5: multiple file selection for "normalization"?
> -
> Hi Karsten,
> If there are n subjects then you need to "define" all these n subjects
> and then run it. I was thinking of putting all the source images under
> one directory and select them all and then run the who process in one
> go. Otherwise, if this n=500, then you need to do this 500 times which
> would be very tedious. Do I miss some tricks here?
> Many thanks,
> Wei Wen
> Karsten Specht wrote:
> > Dear Wei Wen,
> >
> >
> >> Is there a way of selecting multiple files (as source) in
> normalization
> >> process (using the same template target) ? Smoothing etc can be
> done in
> >> that fashion but not normalization it seems.
> >>
> >
> > you should select only one source per subject, but in SPM2 as well
> as SPM5, you have the possibility to define a set of subjects, which
> should be normalized to the same template.
> >
> > Karsten
> >
> > --
> > -------------------------------------------------------------
> > Karsten Specht, PhD
> >
> > Department of Biological and Medical Psychology
> > & National Competence Centre for functional MRI
> > University of Bergen
> > Jonas Lies vei 91
> > 5009 Bergen
> > Norway
> > Tel.: +47-555-86279
> > Fax: +47-555-89872
> > [log in to unmask]
> > http://fmri.uib.no/
> >
> >
|