I see, shouldn't you be registering the magnitude image to the original
T1_brain? Perhaps that is what is going wrong.
Peace,
Matt.
On 9/24/13 3:04 PM, "Courtney Haswell" <[log in to unmask]> wrote:
>I tried it that way, but it still looks the same after.
>
>On Tue, Sep 24, 2013 at 3:54 PM, Matt Glasser <[log in to unmask]> wrote:
>> Try it in applywarp using --premat and -w (without the --rel flag).
>>Does
>> that work better?
>>
>> Peace,
>>
>> Matt.
>>
>> On 9/24/13 2:39 PM, "Courtney Haswell" <[log in to unmask]>
>>wrote:
>>
>>>Hi,
>>>
>>>I am trying to combine a FLIRT output and FNIRT output with convertwarp.
>>>Both of these work well on their own, but when combined with
>>>convertwarp,
>>>the output registration is very distorted and shifted in the space. Any
>>>idea what I am doing wrong? Thanks!
>>>
>>>Code:
>>>#Linearly register T1 to standard
>>>flirt -in T1_brain.nii.gz -ref MNI152_T1_2mm_brain -omat T1_FLT.mat -out
>>>T1_FLT -dof 12
>>>
>>>#Nonlinear registration of T1 to standard
>>>fnirt --in=T1.nii.gz --aff=T1_FLT.mat --cout=T1_FNT
>>>--config=T1_2_MNI152_2mm
>>>
>>>#Linearly register magnitude image
>>>flirt -in mag_brain -ref T1_FLT -out mag_FLT -omat mag_FLT.xfm -searchrx
>>>-60 60 -searchry -60 60 -searchrz -60 60 -dof 12
>>>
>>>#Combine magnitude linear matrix with T1 nonlinear matrix
>>>convertwarp --ref=MNI152_T1_2mm --warp1=T1_FNT.nii.gz
>>>--premat=mag_FLT.xfm --relout --out=Forward_warps
>>>
>>>#warp mag suscesceptibility to MNI
>>>applywarp --ref=MNI152_T1_1mm --in=qsm.nii --warp=Forward_warps --rel
>>>--out=qsm_FNT
|