% matlabbatch = dicom_import_job(raw,outdir)
% The function takes the list of raw files and output directory and passes
% them on to the matlabbatch sturcture array
%
% Glad Mihai, University of Greifswald, Jan. 2012

function matlabbatch = dicom_import_job(raw,outdir)

for i = 1:numel(outdir)    
    matlabbatch{i}.spm.util.dicom.data = raw;
    matlabbatch{i}.spm.util.dicom.root = 'flat';
    matlabbatch{i}.spm.util.dicom.outdir = outdir;
    matlabbatch{i}.spm.util.dicom.convopts.format = 'img';
    matlabbatch{i}.spm.util.dicom.convopts.icedims = 0;
end
