Print

Print


Dear Kristi,

Filenames have to be provided in a cell array so the following should work:

realignUnwarp{1}.spm.spatial.realignunwarp.data.scans =
cellstr(spm_select('ExtFPListRec', pwd, ['00_raw_func_data.nii'], useScans))

Best regards,
Guillaume.


On 04/06/2019 07:44, Kristi Griffiths wrote:
> Dear SPM experts,
> 
> I am updating our labs pre-processing scripts from spm8 to spm12 and am having trouble running batch jobs that previously worked. For example, in realign and unwarp, I use the following line to select input scans
> 
> realignUnwarp{1}.spm.spatial.realignunwarp.data.scans = spm_select('ExtFPListRec', pwd, ['00_raw_func_data.nii'], useScans)
> 
> And run the job using  spm_jobman ('run', realignUnwarp)
> 
> However I get the following error
> 
> Item 'Images', field 'val': Value must be either empty, a cellstr or a cfg_dep object
> Error using spm_jobman>fill_run_job
> No executable modules, but still unresolved dependencies or incomplete module inputs.
> 
> Error in spm_jobman
> sts = fill_run_job('run', job, varargin{3:end})
> 
> I've tried replacing useScans with 1:120 but this doesn't change anything. I've also checked what spm_select is picking up.  It is creating a 120 x 116 character array.  What format does it need to be for spm_jobman and how can I adapt my spm_select code to do the correct input format for spm12?
> 
> Thanks so much in advance for any help you can provide.
> 
> Best,
> Kristi
> 

-- 
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG