Print

Print


Hi Jesper,
I found an an email from back in October 2017 where you wrote the following:

[Subject: Applytopup to fMRI series]
>In the slightly longer term we hope to release an fMRI version of eddy.
The current version is >not ideal for that, but already now you can trick
eddy into doing motion correction for your fMRI >data. You need to make
fake bvals and bvecs files with all zeros in the first, and specify the -->
b0_only flag.

I was interested in using this to combine motion correction and topup into
a single resampling but I can't seem to get it working properly. It seems
that eddy isn't doing any sort of motion correction when the --topup flag
is passed.

My 4D EPI data has 40 volumes. So I made a a bvals file with 40 lines of
just 0 and a bvecs file with 40 lines of 0 0 0. I

I'm running eddy this way:

eddy --imain=data.nii.gz --mask=mask.nii.gz --index=index.txt
--acqp=acq_params.txt --bvecs=bvecs --bvals=bvals
--out=eddy_corr_b0only_opt -v --b0_only --topup=topup


I was using fsl 5.0.9 and so I upgraded to 5.0.11 to see if that made any
difference. I had to add the --data_is_shelled option, but the result is
the same.


As a simple test case, I took an image, applied a rotation of 10 degrees in
the X and Y planes and then merged the original, rotated, and original
images and re-ran eddy:



eddy --imain=data.nii.gz --mask=mask.nii.gz --index=index.txt
--acqp=acq_params.txt --bvecs=bvecs --bvals=bvals
--out=eddy_corr_b0only_opt_WITH_topup -v --b0_only --topup=topup
--data_is_shelled


Reading images

Performing volume-to-volume registration

Running Register

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 0, Total mss = 242.648

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 1, Total mss = 242.648

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 2, Total mss = 242.648

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 3, Total mss = 242.648

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 4, Total mss = 242.648

Running sm.ApplyB0LocationReference

Running sm.WriteParameterFile

Running sm.WriteRegisteredImages

Running sm.RecycleOutliers

Running sm.WriteRotatedBVecs

Running sm.WriteMovementRMS

The resulting movement parameters are just all 0s, as would be expected at
this point since the mss is staying constant.

If I run the exact the same command but drop the topup flag, then things
appear to work, although the volumes in the eddy output are not well-aligned

eddy --imain=data.nii.gz --mask=mask.nii.gz --index=index.txt
--acqp=acq_params.txt --bvecs=bvecs --bvals=bvals
--out=eddy_corr_b0only_opt_WITHOUT_topup -v --b0_only  --data_is_shelled


Reading images

Performing volume-to-volume registration

Running Register

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 0, Total mss = 194.67

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 1, Total mss = 185.835

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 2, Total mss = 170.245

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 3, Total mss = 157.97

Loading prediction maker

Evaluating prediction maker model

Calculating parameter updates

Iter: 4, Total mss = 146.556

Running sm.ApplyB0LocationReference

Running sm.WriteParameterFile

Running sm.WriteRegisteredImages

Running sm.RecycleOutliers

Running sm.WriteRotatedBVecs

Running sm.WriteMovementRMS


Have I misunderstood something or do you have any insight into what might
be happening here? I realize that this wasn't the intended use of eddy but
figured I'd ask since you had brought it up on the list!

Thanks for any insight and for the great tools!

-- 
Niels Bergsland
Integration Director / Research Assistant Professor of Neurology
Buffalo Neuroimaging Analysis Center / University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1