Thank you. That makes perfect sense. I replaced T1_FLT with just the
original T1_brain and it works perfectly now. The instructions that I
was following from someone were incorrect.
Thanks again!!
On Wed, Sep 25, 2013 at 5:11 AM, Jesper Andersson
<[log in to unmask]> wrote:
> Dear Courtney,
>
> you have two transforms into standard space, one is
>
> T1->MNI through T1_FNT
>
> and the other is
>
> mag->MNI through mag_FLT.xfm
>
> When you now combine these two you will "overshoot" the target massively as you are basically applying two transforms designed to do the same thing.
>
> I don't quite know what your true intentions were, but my guess is that you want to replace "-ref T1_FLT" in your second flirt call with "-ref T1_brain".
>
> Jesper
>
> On 24 Sep 2013, at 20:39, 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
|