Hi,
that's a great idea if T1w and DWI have the same spatial resolution.
What I did now is the following:
# create 3D field volume
fslmaths topup_field.nii.gz -mul 0 warp
fslmerge -t warp.nii.gz warp.nii.gz topup_field.nii.gz warp.nii.gz
# multiply with value from text file
fslmaths warp.nii.gz -mul -0.087 warp_0-087.nii.gz
# apply warp to every DWI
applywarp --ref=B0_AP.nii.gz --in=B0_AP.nii.gz --out=B0_AP_warped.nii.gz
--warp=warp_0-087.nii.gz
with the corresponding line in the text file being
0 -1 0 0.087
does this make sense?
And could I then add --premat=moco_0000.txt --postmat=dwi2t1.txt to
account for motion correction and alignment with the anatomical scan
(the text files are flirt matrices)?
Thanks,
Jan
On 12/18/2013 09:15 PM, romain valabregue wrote:
> Hello
>
> An other alternative would be to apply the affine transform to the nifti
> header in all the raw data
> before running topup. This is the way spm handel coregistration. (so if
> you use spm coregister, the header
> is change without interpolation).
> I can understand that in some case it may be confusing to change the
> header (and not to have an external transformation)
> but it is convenient to easily avoid several interpolation.
> I do not know if there is in fsl a way to apply an affine transformation
> to the nifti header (without changing the data)
> but it would be nice to have it
>
> Cheers
>
> Romain
>
>
> Le 15/10/2013 11:22, Jesper Andersson a écrit :
>> Dear Jan,
>>
>>>
>>> thank you for providing such great tools as topup and eddy!
>>> I have 2 questions:
>>>
>>> 1. Are my data interpolated only once when I feed the results from
>>> topup into eddy?
>> yes.
>>
>>> 2. Is it possible to align my diffusion data with a T1 or T1 weighted
>>> scan without adding an additional interpolation step?
>>> If not, would it theoretically be possible to extend eddy to do so
>>> with a reference image and affine transform? (That would be nice to
>>> know before I tried…)
>>> I guess when combining the exported fields from eddy with an affine
>>> transform from flirt (would that work?)
>> It is a good idea and something I will keep in mind for future
>> releases. It is certainly possible, but it would take a bit of coding
>> on your side. The field that you can get as output would need to be
>> combined with the rigid body parameters in the text file.
>>
>>> then I would miss the correction of corrupted slices.
>> The correction of corrupted slices is not "activated" in the current
>> release (unless I have somehow done that by mistake) as we need to do
>> more testing of that before we are happy with people using it. So
>> you'll miss that right now anyway.
>>
>> Jesper
>>
>>
>>> Thanks,
>>> Jan
|