Hi Phoebe
Batch mode isn't implemented in spm_segment.m so you can't add it to
spm_bch_bchmat.m unfortunately. The script below should allow you to do it
with minor edits to the file and directories etc.
Cheers
-Bill
%%%%%%%%%%%%%
dirs = char('/home/mri/struct/', '/home/mri/funct/');
files = char('mpr01', 'epi01');
templates = char('T1', 'EPI');
opts = ['t' 'w'];
all = size(dirs);
for i = 1:2:all(1)
dir=dirs(i,:);
file=files(i,:);
template=templates(i,:);
F = eval(sprintf('spm_get(''Files'', ''%s'', ''%s.img'')', dir, file));
T = eval(sprintf('spm_get(''Files'', ''/home/mri/spm99/templates/'',
''%s.img'')', template));
spm_segment(F,T,opts)
if i>=all(1);
break;
end;
end;
%%%%%%%%%%%%%%%%
At 06:01 28/12/01 +0000, Phoebe Chan wrote:
>Dear all,
>
>I got 2 questions:
>
>1) Do you have any suggestions on the conversion programs of the
>Siemens .ima data to SPM .img files? I used some in-house programs to
>convert the .ima data into .img files and it seemed that the images in the
>resultant .img files can only be rotated along 2 axes instead of 3
>using 'DISPLAY' function.
>
>2) I tried to add in 'segment' as part of the batch scripts by modifying
>the existing spm_bch.m, spm_bch_bchmat.m, analyses_bch_ex.m and
>spm_segement.m, and make up another segment_bch_ex.m for the definition of
>variables. However, I always got the following error messages:
>
>******************
>Warning: unknown type of analyse segment
>> In c:\program files\spm99\spm_bch_bchmat.m at line 148
> In C:\WINDOWS\Desktop\batch_phoebe\spm_bch.m at line 131
>Warning: Reference to uninitialized variable bch_names in spm_bch_bchmat at
>line 164.
>> In c:\program files\spm99\spm_bch_bchmat.m at line 164
> In C:\WINDOWS\Desktop\batch_phoebe\spm_bch.m at line 131
>******************
>
>Do you have any instructions (more details) for adding in new analysis in
>the sample batch scripts in spm99/batch/examples?
>
>Thanks.
>
>Phoebe.
>
|