Diff for "RemoveBadScans" - MRC CBU Imaging Wiki
location: Diff for "RemoveBadScans"
Differences between revisions 1 and 2
Revision 1 as of 2006-07-04 14:59:47
Size: 1440
Editor: Scripting Subsystem
Comment:
Revision 2 as of 2006-07-25 11:34:10
Size: 2200
Editor: devel03
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

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.
 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 ==
Line 33: Line 43:
Maybe that will work, who knows?Matthew 6/2/02 NRNR Maybe that will work, who knows?
Line 35: Line 45:
MatthewBrett 6/2/02 NRNR

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.
  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

CbuImaging: RemoveBadScans (last edited 2013-03-07 21:22:56 by localhost)