Dear Sentao,
> Before you run fnirt, you need to remove the skull of the brain,
> which can be done by the BET command.
I am afraid that I will need to correct you here. The recommendation is to use the betted images for flirt, but the original images for fnirt. So your example below should really be
bet T1_patient.nii T1_patientbb.nii -S -B -f 0.25
flirt -ref MNI152_T1_2mm_brain.nii -in T1_patientbb.nii -out flirt_patient.nii -inweight maskcombine.nii -interp nearestneighbour -omat transfer.mat
fnirt --ref=MNI152_T1_2mm.nii --in=T1_patient.nii --aff=transfer.mat --cout=nonlinear_transfer --inmask=maskcombine.nii --config=T1_2_MNI152_2mm
and the transformation is no longer a matrix, so hence not a .mat file. It is a 4D displacement field and will be called nonlinear_transfer.nii.gz.
Best regards Jesper
> Then you need to use FLIRT and FNIRT to do the registration.
> The following is a example.
>
> bet T1_patient.nii T1_patientbb.nii -S -B -f 0.25
>
> flirt -ref MNI152_T1_2mm_brain.nii -in T1_patientbb.nii -out flirt_patient.nii -inweight maskcombine.nii -interp nearestneighbour -omat transfer.mat
>
>
> fnirt --ref=MNI152_T1_2mm_brain.nii --in=T1_patientbb.nii --aff=transfer.mat --cout=nonlinear_transfer --inmask=maskcombine.nii --config=T1_2_MNI152_2mm
>
> The transformation matrix is nonlinear_transfer.mat.
|