Print

Print


I have a relatively large number of 4D nifti files that I need to manipulate. The first 5 volumes of each file are dummy scans which need to be discarded for the analysis.

I am reading the volume information using spm_vol() and have determined the number of volumes in each scan. I now need to pass a subset of the volumes to various SPM functions for analysis. I am struggling to find the correct syntax and would appreciate some assistance.

Suppose the scan in question is called SCAN.nii, it resides in SCAN_dir, and the number of volumes has been determined to be 180. I am trying to run code similar to the following example (which is failing):

tmp = strcat(spm_select('FPList', SCAN_dir,SCAN.nii),',6:180));
matlabbatch{1}.spm.spatial.realignunwarp.data(1).scans = cellstr(tmp);

Please could someone offer some advice with the correct syntax here. 

Thanks so much
Jane.