> Could you tell me what the command line input would be
> to load a file or to enter a vector for the slice
> timing order? My command line knowledge is not up to
> snuff.
>
> I would like to try to isolate the nature of the
> problem and see whether it is a ui problem or (as I
> suspect) something either matlab-specific or related
> to matlab's interface with our system.
>
> I am grateful for your attention and time.
I haven't checked, but this may do it.
P = spm_get(+Inf,'*.img',...
['Select images to acquisition correct']);
Vin = spm_vol(P{1}(1,:));
nslices = Vin(1).dim(3);
sliceorder=[];
while length(sliceorder)~=nslices | max(sliceorder)>nslices | ...
min(sliceorder)<1 | any(diff(sort(sliceorder))~=1),
sliceorder = spm_input(...
'Acquisition order? (1=first slice in image)','!+0','e');
end;
refslice = spm_input('Reference slice? (1=first slice in image)',...
'!+0','e',floor(Vin(1).dim(3)/2));
TR = spm_input('Interscan interval (TR) {secs}','!+1','e',3);
TA = spm_input('Acquisition Time (TA) {secs}','!+1','e',TR-TR/nslices);
while TA > TR | TA <= 0,
TA = spm_input('Acquisition Time (TA) {secs}','!+0','e',TA);
end;
timing(2) = TR - TA;
timing(1) = TA / (nslices -1);
factor = timing(1)/TR;
spm_slice_timing(P, sliceorder, refslice, timing);
Best regards,
-John
--
Dr John Ashburner.
Functional Imaging Lab., 12 Queen Square, London WC1N 3BG, UK.
tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381
fax: +44 (0)20 78131420 http://www.fil.ion.ucl.ac.uk/~john
|