RemoveBadScans - MRC CBU Imaging Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Type the missing letters from: He's no ded, he's jus resing hs eys

location: RemoveBadScans

Removing scans in SPM

This page is now rather out of date, because the software is for SPM99. It will not work with SPM2 or SPM5. To remove scans in SPM2 and SPM5, I (MatthewBrett) would recommend that you:

  1. Find a way of doing any slice timing correction using a local interpolation method such as linear resampling. The SPM standard slice timing routines use a fourier method that has the effect of changing a spike at a single time point into a rather wide based sinc function in time, that makes the artefect difficult to remove - see SliceTiming. You can try the CbuSliceTiming page.

  2. Include a single regressor for each scan you want to remove, with a 1 for the scan you want to remove, and zeros elsewhere.

The rest of the page refers to the SPM99 method that we used.

Removing scans in SPM 99

is difficult. But if you want to give it a go... First have a look at the message by Tom Nichols on the SPM list. You will need his fix to the spm_bch_tsampl.m file, attached to the mail; it is already installed at the CBU.Find the bad scans; lets say they are scans 50, 51 52

Do the slice timing as if there are two sessions for this one session: session 1 is scans 1 to 49, session 2 is 53 to the end.

Delete images 50, 51, 52. Replace them with another scan from the same series, maybe scan 49, with something like:

rm scan50.* scan51.* scan52.*
cp scan49.img scan50.img
cp scan49.hdr scan50.hdr
cp scan49.mat scan50.mat
cp scan49.img scan51.img
cp scan49.hdr scan51.hdr
cp scan49.mat scan51.mat
cp scan49.img scan52.img
cp scan49.hdr scan52.hdr
cp scan49.mat scan52.mat

Do the realignment, normalization etc.Specify the design as if the scans were not missing. Then, in your batch file, do something like the following. Let's say that the scans were missing from session 2. Fill up your model batch structure as normal, then add something to specify the scans that are actually going to used:

% session scans that are missing
misscans = { [], [50:52], [], [] };

% specify scans remaining in analysis
for i = 1:4
  remain = 1:scannos(i);
  remain(misscans{i}) = [];
  model(i).remain{i} = remain;
end

Maybe that will work, who knows?

MatthewBrett 6/2/02 NRNR