图像配准之一二三
基于FSL flirt
在flirt中,cost function {mutualinfo,corratio,normcorr,normmi,leastsq,labeldiff,bbr} (default is corratio)。分析的数据是single-shell data and one b0,DWI配准受损失函数cost function 影响较大。通过调整损失函数,可改变DWI图像配准方向。参考b站视频。
flirt.fsl -dof 6 -cost normmi -ref T1.nii.gz -in b0_denoise_bias.nii -omat T_fsl.txt
transformconvert T_fsl.txt b0_denoise_bias.nii T1.nii.gz flirt_import T_DWItoT1.txt
mrtransform -linear T_DWItoT1.txt dwi_denoise_preproc_bias.mif align.mif
2.基于基于FSL flirt BBR
Boundary-Based Registration (BBR)损失函数,需要FSL FAST生成的白质模板作为边界参考。参考网页:https://community.mrtrix.org/t/registration-of-structural-and-diffusion-weighted-data/203/17
https://community.mrtrix.org/t/a-problem-about-co-register/3804/6
flirt -in b0_denoise_bias.nii -ref T1.nii.gz -dof 6 -cost bbr -wmseg wm_pve_2.nii.gz -omat T_fsl.txt
transformconvert T_fsl.txt b0_denoise_bias.nii T1.nii.gz flirt_import T_DWItoT1.txt -force
mrtransform -linear T_DWItoT1.txt dwi_denoise_preproc_bias.mif align.mif
3. MRtrix Tutorial #6: Creating the Tissue Boundaries
参考网页:https://andysbrainbook.readthedocs.io/en/latest/MRtrix/MRtrix_Course/MRtrix_06_TissueBoundary.html
mrconvert T1.nii.gz T1.mif
5ttgen fsl T1.mif 5tt_nocoreg.mif
mrconvert 5tt_nocoreg.mif 5tt_nocoreg.nii.gz
# Grey Matter segmentation
fslroi 5tt_nocoreg.nii.gz 5tt_vol0.nii.gz 0 1
mrconvert mean_b0.mif mean_b0.nii.gz
flirt -in mean_b0.nii.gz -ref 5tt_vol0.nii.gz -interp nearestneighbour -dof 6 -omat diff2struct_fsl.mat
transformconvert diff2struct_fsl.mat b0.nii.gz 5tt_nocoreg.nii.gz flirt_import diff2struct_mrtrix.txt
mrtransform -linear diff2struct_mrtrix.txt dwi_denoise_preproc_bias.mif align.mif -force
分析总结,实践数据为single-shell and one b0,上述三种方法可能不能把所有DWI数据都配准,方法1计算所需时间最短,方法3步骤多,方法2需要FAST处理T1数据。相对来讲,采用方法1,调整不同损失函数可使得DWI数据与T1数据配准。