Dear Chase,
Please see if this happens with the latest SPM update. Also note that the file for one condition might be 4D i.e. you have multiple images in one file.
See the manual for how to handle that.
Vladimir
> On 5 Feb 2016, at 06:21, C S Sherwell <[log in to unmask]> wrote:
>
> Hi,
>
> I'm having a little difficulty with saving images from my EEG inverse reconstruction using the 'trials' option in SPM12. I have run all the source reconstruction steps on epoched data, which has conditions labelled in both the 'D.condlist' structure, and on each trial in the 'D.trials.label' structures. Further, when I use the GUI to do source reconstruction using the same steps, I am able to cycle through my 6 experimental conditions using the condition button in the bottom right hand corner.
> The problem is that when I go to save the images, either through the batch options or using the GUI, even though the command window indicates that it is writing out all of the individual trials (750 of them), it only writes one niftii file that contains the images from one condition. As far as I can tell, it appears to be overwriting the same niftii file with each separate condition, rather than saving each condition as a separate niftii file with each trial as an image.
>
> Has anybody had any experience with this, or know whether I may have skipped a crucial step?
>
> below is a copy of my batch script for the steps I've taken, if this assists.
>
> spm_jobman('initcfg');
> clear matlabbatch
>
> matlabbatch{1}.spm.meeg.source.headmodel.D = {filename};
> matlabbatch{1}.spm.meeg.source.headmodel.val = 1;
> matlabbatch{1}.spm.meeg.source.headmodel.comment = '';
> matlabbatch{1}.spm.meeg.source.headmodel.meshing.meshes.template = 1;
> matlabbatch{1}.spm.meeg.source.headmodel.meshing.meshres = 2;
> matlabbatch{1}.spm.meeg.source.headmodel.coregistration.coregdefault = 1;
> matlabbatch{1}.spm.meeg.source.headmodel.forward.eeg = 'EEG BEM';
> matlabbatch{1}.spm.meeg.source.headmodel.forward.meg = 'Single Shell';
>
> spm_jobman('run',matlabbatch);
>
> clear matlabbatch
> spm_jobman('initcfg');
>
> matlabbatch{1}.spm.meeg.source.invert.D = {filename};
> matlabbatch{1}.spm.meeg.source.invert.val = 1;
> matlabbatch{1}.spm.meeg.source.invert.whatconditions.condlabel = {
> 'B1000'
> 'B1500'
> 'B2000'
> 'N1000'
> 'N1500'
> 'N2000'
> }';
>
> matlabbatch{1}.spm.meeg.source.invert.isstandard.standard = 1;
> matlabbatch{1}.spm.meeg.source.invert.modality = {'EEG'};
>
> spm_jobman('run',matlabbatch);
>
> clear matlabbatch
> spm_jobman('initcfg');
>
> matlabbatch{1}.spm.meeg.source.results.D = {filename};
> matlabbatch{1}.spm.meeg.source.results.val = 1;
> matlabbatch{1}.spm.meeg.source.results.woi = sourcewindow;
> matlabbatch{1}.spm.meeg.source.results.foi = sourcefrequency;
> matlabbatch{1}.spm.meeg.source.results.ctype = 'trials';
> matlabbatch{1}.spm.meeg.source.results.space = 1;
> matlabbatch{1}.spm.meeg.source.results.format = 'image';
> matlabbatch{1}.spm.meeg.source.results.smoothing = 8;
>
> spm_jobman('run',matlabbatch);
>
>
>
> Many thanks for any assistance you may be able to give.
> Regards,
> Chase Sherwell
|