Dear SPM:
I've been reflecting on the slice timing algorithm as currently implemented
and I think that one item while not a bug necessarily seems awfully
convoluted and might generate errors. Please comment on the following. I
have included a test m-file below which I extracted from the current code
and my old code. It is set up for 8 slices and a TR of 3 (completely
arbitrary). One can enter the reference slice, the sequence type and the
slice order. Look at variables newshift and oldshift for the shiftamount
results.
The impetus was to analyze our interleaved sequence but when I saw Rik's
email the other day his answer seemed backwards. We work on a scanner that
acquires slices top to bottom in an interleaved manner, BUT it rearranges
the slices in anatomical order upon output. The slices below are numbered
in order of acquisition
actual anatomical pos-top bottom
acquired slice order = 1 5 2 6 3 7 4 8.
SPM slice number = 8 7 6 5 4 3 2 1.
I had asssumed that interleaved in slice timing would give us the correct
slice order but that seems not to be the case. What I find instead is that
slice timing seems to assume that it is fixing slices that are still in
acquisition order and not anatomical order. Is this correct?
Old method shifted slices to first acquired- (to get slices to be in proper
spm order they switch position from the original file so that it reads
bottom to top). Thus the final order in spm based on how they read out from
file is:
actual anatomical pos-bottom top
acquired slice order = 8 4 7 3 6 2 5 1
SPM slice number = 1 2 3 4 5 6 7 8
The shift amounts that the old program puts out are:
0.8750 0.3750 0.7500 0.2500 0.6250 0.1250 0.5000 0
Remember this is correct because the 0 corresponds to the top slice.
BUT the new program puts out:
0.8750 0.6250 0.3750 0.1250 0.7500 0.5000 0.2500 0
This looks as if it expected the slices in their original acquisition
order. To get the same result as the old program one would have to enter a
refslice of 8 and an acquisition order of [8 6 4 3 7 5 3 1]. Is this
right???
This seems really confusing, unless it's just me that is confused. Have
others noticed this??
thanks,
Darren
===================
% mfile to test shiftamount in old and new slice_timing
% NEW CALC SETUP
% ------------------------------------
nslices = 8;
TR = 3;
TA = TR - TR/nslices;
timing(2) = TR - TA;
timing(1) = TA / (nslices -1);
factor = timing(1)/TR;
refslice = input('Input ref slice [1 bottom]: ');
Seq = input('Input order of slices [1=asc, 2=dec, 3=interlv 4=def: ');
if Seq==[1],
sliceorder = [1:1:nslices];
elseif Seq==[2],
sliceorder = [nslices:-1:1];
elseif Seq==[3],
% Assumes interleaved sequences top-middle downwards
for k=1:nslices,
sliceorder(k) = round((nslices-k)/2 +
(rem((nslices-k),2) * (nslices - 1)/2)) + 1;
end;
elseif Seq==[4],
sliceorder = input('Input slice order: ');
end
newshift = [];
for k = 1:nslices
% Set up time acquired within slice order
shiftamount = (find(sliceorder==k) - find(sliceorder==refslice)) * factor;
newshift = [newshift shiftamount];
end
%--------------------------------------------------------------------------
% OLD method (assumes aligning to last slice)
%--------------------------------------------------------------------------
oldshift = [];
for k = nslices-1:-1:0
% Set up interleaving factor, first slice read in is last of volume
timeacquired = round(k/2 + (rem(k,2) * (nslices - 1)/2));
shiftamount = timeacquired/nslices;
oldshift = [oldshift shiftamount];
end
% The sprintf statements are hard coded for 8 slice time values
sprintf('Newshift times: %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f
%0.3f\n',newshift)
sprintf('Oldshift times: %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f
%0.3f\n',oldshift)
-------------------------------------------------------------------------
Darren R. Gitelman, M.D.
Cognitive Neurology and Alzheimer's Disease Center
E-mail: [log in to unmask] WWW:
http://www.brain.northwestern.edu
Voice: (312) 908-9023 Fax: (312) 908-8789
Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL 60611
-------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|