help > RE: Error: 'Checking for zipped files failed '
Apr 29, 2014  04:04 PM | Christian Utzerath
RE: Error: 'Checking for zipped files failed '
Dear Dr. McLaren,

Thank you for the quick fix! I have tested my wrapper on a couple of models now, and it runs very smooth - the toolbox is most definitely a great simplification of the whole process!


One thing that I wanted to share - because other users will face this as well - is the suggested fix for the 'VOI larger than dataset error'. Because my seed VOI is located at the edge of the brain, I encountered this error in every subject. The gPPI manual suggests to fix this by multiplying the VOI mask with the brain mask that SPM creates. Any voxel that is included in the VOI mask (has value 1) but is excluded in the brain mask (has value 0) will then be excluded because of the multiplication with zero.

This suggested approach is very simple. However if, like me, someone has not done it before, you might not realize that SPM8 can do this to *.nii-files. The solution is the imcalc function:

brain_mask_path = fullfile(work_dir,'mask.img');
voi_mask_fname = strcat([VOI_name, '_mask.nii']);
voi_mask_path = fullfile(work_dir,voi_mask_fname);
matlabbatch{1}.spm.util.imcalc.input = {brain_mask_path, voi_mask_path};
trimmed_mask_path = strcat(['trimmed_' voi_mask_fname]);
matlabbatch{1}.spm.util.imcalc.output = trimmed_mask_path;
matlabbatch{1}.spm.util.imcalc.outdir = {''};
matlabbatch{1}.spm.util.imcalc.expression = 'i1.*i2';
matlabbatch{1}.spm.util.imcalc.options.dmtx = 0;
matlabbatch{1}.spm.util.imcalc.options.mask = 0;
matlabbatch{1}.spm.util.imcalc.options.interp = 1;
matlabbatch{1}.spm.util.imcalc.options.dtype = 4;
spm_jobman('run',matlabbatch);


In a wrapper, I would add a safeguard that checks if any VOI extends beyond the borders of the brain mask, and if so, trims the VOI in this way. I thought I would just leave this here in case another user also has a very lateral VOI and is searching for a solution (since this was not described online when I was looking for it).




All the best,
Christian

Threaded View

TitleAuthorDate
Christian Utzerath Apr 25, 2014
Donald McLaren Apr 25, 2014
Christian Utzerath Apr 25, 2014
Donald McLaren Apr 25, 2014
Donald McLaren Apr 25, 2014
RE: Error: 'Checking for zipped files failed '
Christian Utzerath Apr 29, 2014
Donald McLaren Apr 29, 2014