Dear All, We have one participant with a couple of bad scans - actually so bad that a few of the .nii images after DICOM import are corrupted and result in errors in the Realign & Unwarp stage. I would like to replace the faulty images by the mean of the surrounding images. For this I would use ImCalc in SPM12 with the following expression: '(i1+i2)/2' Input would be e.g. replacing volume 3: i1 = fBR-0002-00002-000002-01.nii i2 = fBR-0002-00004-000004-01.nii And I would name the output: fBR-0002-00003-000003-01.nii My question is: Is this newly created volume 3 "accepted" by SPM as the third volume, e.g. when I specify first-level statistics? Or is information in the header used for this? The header information is probably wrong in the newly created file, and therefore it may mess up the assignment of files to timesteps SPM internally (e.g. having file1 - timestep1; file 2 - timestep2; file3 (newly created, wrong header) - ignored; file4 -timestep 3 = from now on all onsets are wrong by one TR) If my solution doesn't work, is there another easy and straightforward way without the need to just leave out the image and adjust the onset vectors? For instance, adjusting the header. (having an extra regressor for the bad volumes doesn't work here because they result in SPM error messages and abortion of the processing) Many thanks in advance & Kind Regards, Andre _______________________________________________________ Dr André J. Szameitat Reader in Psychology Co-Director Centre for Cognition and Neuroimaging (CCNI) T +44(0)18952 67387 | E [log in to unmask] Brunel University London Dept of Life Sciences Psychology Gaskel Building, Room GASK263 Office hours: Wed 11.30-12.30, Thu 13.30-14.30 Brunel University London, Uxbridge, UB8 3PH, United Kingdom www.brunel.ac.uk<http://www.brunel.ac.uk/> Connect with the University on Facebook<https://www.facebook.com/bruneluniversity>, Twitter<https://twitter.com/bruneluni>, LinkedIn<https://www.linkedin.com/edu/brunel-university-london-12575>, Google+<https://plus.google.com/+bruneluniversity/posts>, Instagram<http://instagram.com/bruneluni> _______________________________________________________