T1w/T2w normalised ratio using ANTs #1418
Neuroguide
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was recently working on computing T1/T2 ratios for a dataset of multiple sclerosis patients and I noticed that the currently applied pipelines are full of tools from various packages (FSL, AFNI, Freesurfer, SPM, c3d) and lack harmonisation. ANTs can in principle take care of all the steps, is free software and will improve the reproducibility of the results. The original approach was described in Miyasaki et al. and Bodurka 2015 https://onlinelibrary.wiley.com/doi/10.1002/mrm.25560 : Misaki M, Savitz J, Zotev V, Phillips R, Yuan H, Young KD, Drevets WC, Bodurka J. Contrast enhancement by combining T1- and T2-weighted structural brain MR Images. Magn Reson Med. 2015 Dec;74(6):1609-20. doi: 10.1002/mrm.25560. Epub 2014 Dec 22. PMID: 25533337; PMCID: PMC4476954.
The idea in short is to acquire 3D T1w and 3D T2w, bias field correct both acquisitions with N4, rigidly register T2w to T1w with antsRegistrationSyNQuick.sh, segment cortex on T1 using antsCorticalThickness.sh, compute the median signal from the cortex on T1w, compute median signal from the cortex on T2w registered to T1w, multiply the registered T2w by the ratio of median signal intensity of cortex T1w and T2w to get scaled T2w, subtract scaled T2w from T1w, add scaled T2w to T1, compute ratio of the last two images and voila!
I am not fully familiar with ImageMath tool to get the median signal from the cortex binary segmentation and scaling the T2 with the SI cortex T1w/T2w.
I would appreciate your thoughts on this and possible answers to the following questions on ImageMath and ROIStatistics:
id=$1
Bias field correction of the T1
N4BiasFieldCorrection -d 3 -i ${id}_t1.nii.gz -s 2 -c [100x100x100x100,0.0000000001] -o [${id}_t1_bias_corrected.nii.gz,${id}_t1_bias_field.nii.gz]
Bias field correction of the T2
N4BiasFieldCorrection -d 3 -i ${id}_t2.nii.gz -s 2 -c [100x100x100x100,0.0000000001] -o [${id}_t2_bias_corrected.nii.gz,${id}_t2_bias_field.nii.gz]
register T2 to T1 BF corrected file
antsRegistrationSyNQuick.sh -d 3 -f ${id}_t1_bias_corrected.nii.gz -m ${id}_t2_bias_corrected.nii.gz -t r -n 1 -o ${id}t2_bias_corrected_rregT1
segment the T1
antsCorticalThickness.sh -d 3 -a ${id}_t1_bias_corrected.nii.gz -e IXI_template/T_template0.nii.gz -m IXI_template/T_template_BrainCerebellumProbabilityMask.nii.gz -f IXI_template/T_template_BrainCerebellumExtractionMask.nii.gz -p IXI_template/Priors/priors%d.nii.gz -o ${id}t1_bias_corrected_DireCT
create cortex mask
ImageMath
compute median for the cortex on T1w
ImageMath
#compute median for the cortex on T2w
ImageMath
scale the T2w by the ratio of the median cortical signal T1w/T2w
ImageMath
compute the T1w and sT2w (scaled T2 weighted) difference
ImageMath 3 ${id}_T1w_sT2w_diff.nii.gz - ${id}_t1_bias_corrected.nii.gz ${id}_t2_bias_corrected_rregT1_Warped_scaled.nii.gz
compute the T1w and sT2w (scaled T2 weighted) sum
ImageMath 3 ${id}_T1w_sT2w_sum.nii.gz + ${id}_t1_bias_corrected.nii.gz ${id}_t2_bias_corrected_rregT1_Warped_scaled.nii.gz
compute sT1/T2 normalized ratio
ImageMath 3 ${id}_T1w_sT2w_diff_sum_ratio.nii.gz / ${id}_T1w_sT2w_diff.nii.gz ${id}_T1w_sT2w_sum.nii.gz
Thanks
Mikolaj Pawlak
Beta Was this translation helpful? Give feedback.
All reactions