Created
August 31, 2022 21:01
-
-
Save dangom/31304a2ca5ee8f6f3f3464cd2ddde666 to your computer and use it in GitHub Desktop.
Registration example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
fixedfile=$1 | |
movingfile=$2 | |
output=$3 | |
antsRegistration --dimensionality 3 --float 0 --verbose 1 \ | |
--output [$output,${output}.nii.gz] \ | |
--interpolation LanczosWindowedSinc \ | |
--winsorize-image-intensities [0.005,0.995] \ | |
--use-histogram-matching 1 \ | |
--transform Translation[ 0.075 ] \ | |
--metric Mattes[ ${fixedfile},${movingfile},1,32,None ] \ | |
--convergence [ 500x500x500x500x500x500,1e-7,10 ] \ | |
--shrink-factors 5x5x5x5x4x3 \ | |
--smoothing-sigmas 5.078205771322212x4.651927085986457x4.225322606736783x3.798282560433022x3.370641399941647x2.942137020149432mm \ | |
--masks [ NOMASK,NOMASK ] \ | |
--transform Rigid[ 0.1 ] \ | |
--metric Mattes[ ${fixedfile},${movingfile},1,32,None ] \ | |
--convergence [ 500x500x500x500x500x500,1e-7,10 ] \ | |
--shrink-factors 5x5x4x3x2x1 \ | |
--smoothing-sigmas 3.798282560433022x3.370641399941647x2.942137020149432x2.5123277660148595x2.0804050381276458x1.6447045940431997mm \ | |
--masks [ NOMASK,NOMASK ] | |
if [ -f ${output}0GenericAffine.mat ] ; then | |
mv ${output}0GenericAffine.mat ${output}.mat | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment