Probabilistic Atlas in Advanced Normalization Tools (ANTs)

162 views Asked by At

I'm new in the world of neuroimaging, where I want to quantify certain structures in the brain (Locus coeruleus), using ANTS and a Probabilistic Atlas of the Human Locus Coeruleu (https://www.nitrc.org/projects/lc_7t_prob/)

The creators of the atlas provide a pipeline, which I attach below. My question is, if I have the database of subjects with their respective MRI images (T1, FLAIR, etc), how do I run the pipeline using ANTS, to quantify through the atlas?

I´m currently working on macOS M1

pipeline:

 #!/bin/bash

module load ANTS/2.2.0

#1. Build averaged MT-on image while registering individual images in an unified step
antsMultivariateTemplateConstruction2.sh -d 3 -o t_ -i 4 -g 0.1 -j 1 -c 5 -k 1 -w 1 -f 8x4x2x1 -s 3x2x1x0 -q 100x70x50x20 -n 1 -r 1 -l 1 -m MI -t Rigid *LC_SN_112*.nii.gz

#2. Co-register MT-off image to the corresponding individual averaged MT-on image
N4BiasFieldCorrection -d 3 -i noMT.nii.gz -o n4_noMT.nii -r 1 -c [50x50x30x20,1e-6] -b [200]; 
gzip n4_noMT.nii

antsRegistration -v 1 -d 3 -o noMT_to_average -n Linear -u 0 -w [0.005,0.995] -r [t_template0.nii.gz,n4_noMT.nii.gz,1] -t Rigid[0.1] -m MI[t_template0.nii.gz,n4_noMT.nii.gz,1,32,Regular,0.25] -c [1000x500x250x100,1e-6,10] -f 12x8x4x2 -s 4x3x2x1vox -x [NULL,NULL] -u 0

antsApplyTransforms -d 3 -i n4_noMT.nii.gz -o noMT_to_template0.nii.gz -r t_template0.nii.gz -n Linear -t noMT_to_average0GenericAffine.mat

#3. Co-register MT-off image to the corresponding individual T1 MP2RAGE image
antsRegistration -v 1 -d 3 -o [noMT_to_T1,noMT_to_T1Warped.nii.gz,noMT_to_T1InverseWarped.nii.gz] -n Linear -u 0 -w [0.005,0.995] -t Rigid[0.1] -m MI[n4mag0000_PSIR_std.nii,n4_noMT.nii.gz,1,32,Regular,0.25] -c [1000x500x250x100,1e-6,10] -f 12x8x4x2 -s 4x3x2x1vox -x [NULL,NULL] -u 0

antsApplyTransforms -d 3 -i n4_noMT.nii.gz -o noMT_to_T1.nii.gz -r n4mag0000_PSIR_std.nii -n Linear -t noMT_to_T10GenericAffine.mat 

#4. Build the study-wise T1 template
antsMultivariateTemplateConstruction2.sh -d 3 -c 5 -g 0.1 -i 6 -q 100x100x70x50x20 -f 10x6x4x2x1 -s 5x3x2x1x0vox -n 0 -o T1TMP_ -r 0 -l 1 -m CC -t SyN -k 1 -v 8gb T1_list_brain_CSFin_denoised_n53.txt 

#5. Coregister T1 template to the ICBM2009b template
source=T1TMP_template0.nii
target=mni_icbm152_t1_tal_nlin_asym_09b_hires_FSL_bbox_struc_brain_CSFin.nii

antsRegistration \
--verbose 1 \
--dimensionality 3 \
--float 0 \
--output \
[T1TMP_53_To_MNI152,T1TMP_53_To_MNI152_Warped.nii.gz,T1TMP_53_To_MNI152_InverseWarped.nii.gz] \
--interpolation Linear \
--use-histogram-matching 0 \
--winsorize-image-intensities [0.005,0.995] \
--initial-moving-transform [${target},${source},1] \
--transform Rigid[0.1] \
--metric CC[${target},${source},1,4] \
--convergence [100x70x50x50,1e-6,10] \
--shrink-factors 8x4x2x1 \
--smoothing-sigmas 3x2x1x0vox \
--transform Affine[0.1] \
--metric MI[${target},${source},1,32,Regular,0.25] \
--convergence [1000x500x250x100,1e-6,10] \
--shrink-factors 12x8x4x2 \
--smoothing-sigmas 4x3x2x1vox \
--transform SyN[0.1,3,0] \/Users/VictorVidal/R08_t1_mprage_sag_p2_iso_20180520172539_5.nii
--metric CC[${target},${source},1,4] \
--convergence [100x100x70x50x20,1e-6,10] \
--shrink-factors 10x6x4x2x1 \
--smoothing-sigmas 5x3x2x1x0vox \

#6. Coregister averaged MT-on images to MNI space
antsApplyTransforms -d 3 -i ${MT_Path}/t_template0.nii.gz -o ${output_Path}/avgMT_to_MNI_TL_CC.nii.gz -r ${MNI_Path}/mni_icbm152_t1_tal_nlin_asym_09b_hires_FSL_bbox_struc_brain_CSFin.nii -n Linear -t ${MNI_Path}/T1TMP_54_CC_To_MNI152_T109b_FSL_bbox_brain_CSFin_RegAllCC1Warp.nii.gz -t ${MNI_Path}/T1TMP_54_CC_To_MNI152_T109b_FSL_bbox_brain_CSFin_RegAllCC0GenericAffine.mat -t ${T1_Path}/T1TMP_${subj}_*1Warp.nii.gz -t ${T1_Path}/T1TMP_${subj}_*.mat -t [${MT_Path}/T1_to_noMT0GenericAffine.mat,1] -t [${MT_Path}/noMT_to_average0GenericAffine.mat,1] -v 1```


0

There are 0 answers