Marko Wilke wrote:
> % convert segmentation information to sn-files
> [po,pin] = spm_prep2sn(results);
>
> % write segmented data
> spm_preproc_write(po,options_2);
>
> % optional: employ spm_write_sn using the sn-information
> % from the first step, converted to usable format in the second
> T = spm_select;
> spm_write_sn(T,po);
I think in order to get the saved sn.mat files (as with GUI), you'll
also need something like:
[pth fnm] = fileparts(C);
save(fullfile(pth, [fnm '_seg_sn.mat']), '-struct', 'po');
save(fullfile(pth, [fnm '_seg_inv_sn.mat']), '-struct', 'pin');
after spm_prep2sn.
Best,
Ged.
|