Hi, Ajay-
I reply to various points below, but in general it sounds like a lot of these things could be accomplished in a single stroke using TORTOISE, which is publicly available and command line-processable now; no IDL license needed. Is there a reason you aren’t using that for the various preprocessing steps? It does a real form of both eddy and EPI distortion correction, with consistent motion correction; it also rotates the DW gradients as it goes.
In general, I haven’t seen a very big difference between 3dDWItoDT and DIFF_CALC for most tensor fitting in the WM tissue. I use 3dDWItoDT (and sure, using -reweight is fine). Nonlinear fitting should always be done for the main tensor fit results.
1) 3dAllineate to perform eddy current correction. I created an average B0 as a reference frame. I also aligned my T2 to my B0 reference scan rigidly.
For subjects with lots of motion you can use -twopass...its robust but takes a while to run.
I don’t see how affine registration could adequately account for eddy current distortions. Affine registration comes from a global fit with a fixed number of levers to pull at for matching, and it doesn’t have the ability to deal with local/twisty/pulling distortions. I know that some other eddy correction tools do just use affine registration, but I don’t see how that kind of alignment could provide enough appropriate correction.
2) 3dQwarp for B0 to pseudo-T2 distortion correction but with a slightly lower penalty (1 instead of 5). I also limited number of iterations so that it doesn't get weird results from over warping since they are close to begin with.
It seemed to give me reasonable results for the corrections. Plus I could use wsinc5 to write out files for improved interpolation.
I’m not sure what pseudo-T2 distortion correction is-- is that EPI distortion correction?
Sidenote: you can use 3dedge3 to make “edge” volumes to help see how alignments really line up across the brain.
QUESTIONS:
1) The part that is a bit more difficult is how to rotate the bvecs. I used MRtrix3 to import the nifti and output the bval/bvec in "FSL format" which I assume is just the row vector and has nothing to do with sign of values. I want to apply my 3dAllineate matrix but I only want to apply motion related 6dof from the 12dof matrix for the rotation of bvecs, which I DO NOT THINK the following afni blogs perform. It seems that I would want to keep rotation and translation and throw out scaling and shear to accomplish this goal, but the scripts below throw out translation (not sure why).
I’d have to read more about the scripts; this would be another case where using TORTOISE would handle all of this consistently and internally.
2) Another question is regarding afni implementations I found:
[blog.cogneurostats.com]
Vecwarp -matvec tmp.transform.final.${aRow} -input tmp.bvecs.${aRow} -forward >> bvec_rotated.1D
When comparing the post above to one of Daniel's old post, there was a conflict in the following line:
[afni.nimh.nih.gov]
Vecwarp -matvec tempmatvec0.1D -backward -input tempvector.1D -force -output temprotgrad.1D > & /dev/null
The difference between these two afni suggestions could be due to the way 3dAllineate and WarpDrive function differently , or there is a mistake in one of these two versions. Is the -forward option correct for applying 3dAllineate matrix?
The different functions do work differently in many respects; one difference between forward/backward might be whether A is aligned to B in one case, and B aligned to A in the other. I’m not certain offhand; I’d have to look at the scripts closely, and probably even test data. But the fact that the scripts use very different functions would lead me to not be surprised that subsequent steps could be different.
3) For Afni's DTI Fit is the reweight/nonlinear option the same as Restore/iRestore algorithm or different?
I think they have similar aspects of weighting and refitting (and can be repeated a given/large number of times); I would have to look at the full Restore paper, though, to see what other tricks might be involved. Basically, ‘-reweight’ just repeats weighting and refitting; my guess is that details differ, such as cost function used and things like that, at a minimum.
So, in summary, my main advice would be to use TORTOISE to address pretty much all of the above issues…
–pt