Replies: 2 comments
-
It's unrelated to repro mode, which is available in both scripts. The speed difference is for two main reasons: a faster metric (Mutual Information in quick instead of Cross Correlation) and fewer iterations. I believe the quick script does not do any iterations at full resolution. Both scripts will print the actual antsRegistration command before running it, so you can see exactly what is being done. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The complete differences in the script: --- /opt/quarantine/ANTs/bin/antsRegistrationSyN.sh 2020-06-18 10:17:13.000000000 -0400
+++ /opt/quarantine/ANTs/bin/antsRegistrationSyNQuick.sh 2020-06-18 10:17:13.000000000 -0400
@@ -76,7 +76,7 @@
br: rigid + deformable b-spline syn (2 stages)
bo: deformable b-spline syn only (1 stage)
- -r: radius for cross correlation metric used during SyN stage (default = 4)
+ -r: histogram bins for mutual information in SyN stage (default = 32)
-s: spline distance for deformable B-spline SyN transform (default = 26)
@@ -156,7 +156,7 @@
br: rigid + deformable b-spline syn (2 stages)
bo: deformable b-spline syn only (1 stage)
- -r: radius for cross correlation metric used during SyN stage (default = 4)
+ -r: histogram bins for mutual information in SyN stage (default = 32)
-s: spline distance for deformable B-spline SyN transform (default = 26)
@@ -228,7 +228,7 @@
Number of threads: $NUMBEROFTHREADS
Spline distance: $SPLINEDISTANCE
Transform type: $TRANSFORMTYPE
- CC radius: $CCRADIUS
+ MI histogram bins: $NUMBEROFBINS
Precision: $PRECISIONTYPE
Use histogram matching $USEHISTOGRAMMATCHING
======================================================================================
@@ -280,7 +280,7 @@
SPLINEDISTANCE=26
TRANSFORMTYPE='s'
PRECISIONTYPE='d'
-CCRADIUS=4
+NUMBEROFBINS=32
MASKIMAGES=()
USEHISTOGRAMMATCHING=0
COLLAPSEOUTPUTTRANSFORMS=1
@@ -296,7 +296,7 @@
;;
d) # dimensions
DIM=$OPTARG
- ;;
+ ;;
e) # seed
RANDOMSEED=$OPTARG
;;
@@ -325,7 +325,7 @@
PRECISIONTYPE=$OPTARG
;;
r) # cc radius
- CCRADIUS=$OPTARG
+ NUMBEROFBINS=$OPTARG
;;
s) # spline distance
SPLINEDISTANCE=$OPTARG
@@ -394,15 +394,15 @@
ORIGINALNUMBEROFTHREADS=${ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS}
# NUMBEROFTHREADS is > 0 if the option has been set to a positive value
-if [[ $NUMBEROFTHREADS -lt 1 ]];
+if [[ $NUMBEROFTHREADS -lt 1 ]]
then
# Number of threads not set on the command line, try ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
- if [[ $ORIGINALNUMBEROFTHREADS -gt 0 ]];
+ if [[ $ORIGINALNUMBEROFTHREADS -gt 0 ]]
then
NUMBEROFTHREADS=$ORIGINALNUMBEROFTHREADS
- else
+ else
NUMBEROFTHREADS=1
- fi
+ fi
fi
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=$NUMBEROFTHREADS
@@ -444,29 +444,29 @@
#
##############################
-RIGIDCONVERGENCE="[ 1000x500x250x100,1e-6,10 ]"
+RIGIDCONVERGENCE="[ 1000x500x250x0,1e-6,10 ]"
RIGIDSHRINKFACTORS="8x4x2x1"
RIGIDSMOOTHINGSIGMAS="3x2x1x0vox"
-AFFINECONVERGENCE="[ 1000x500x250x100,1e-6,10 ]"
+AFFINECONVERGENCE="[ 1000x500x250x0,1e-6,10 ]"
AFFINESHRINKFACTORS="8x4x2x1"
AFFINESMOOTHINGSIGMAS="3x2x1x0vox"
-SYNCONVERGENCE="[ 100x70x50x20,1e-6,10 ]"
+SYNCONVERGENCE="[ 100x70x50x0,1e-6,10 ]"
SYNSHRINKFACTORS="8x4x2x1"
SYNSMOOTHINGSIGMAS="3x2x1x0vox"
if [[ $ISLARGEIMAGE -eq 1 ]];
then
- RIGIDCONVERGENCE="[ 1000x500x250x100,1e-6,10 ]"
+ RIGIDCONVERGENCE="[ 1000x500x250x0,1e-6,10 ]"
RIGIDSHRINKFACTORS="12x8x4x2"
RIGIDSMOOTHINGSIGMAS="4x3x2x1vox"
- AFFINECONVERGENCE="[ 1000x500x250x100,1e-6,10 ]"
+ AFFINECONVERGENCE="[ 1000x500x250x0,1e-6,10 ]"
AFFINESHRINKFACTORS="12x8x4x2"
AFFINESMOOTHINGSIGMAS="4x3x2x1vox"
- SYNCONVERGENCE="[ 100x100x70x50x20,1e-6,10 ]"
+ SYNCONVERGENCE="[ 100x100x70x50x0,1e-6,10 ]"
SYNSHRINKFACTORS="10x6x4x2x1"
SYNSMOOTHINGSIGMAS="5x3x2x1x0vox"
fi
@@ -502,7 +502,7 @@
SYNMETRICS=''
for(( i=0; i<${#FIXEDIMAGES[@]}; i++ ))
do
- SYNMETRICS="$SYNMETRICS --metric CC[ ${FIXEDIMAGES[$i]},${MOVINGIMAGES[$i]},1,${CCRADIUS} ]"
+ SYNMETRICS="$SYNMETRICS --metric MI[ ${FIXEDIMAGES[$i]},${MOVINGIMAGES[$i]},1,${NUMBEROFBINS}]"
done
SYNSTAGE="${SYNMETRICS} \
@@ -512,7 +512,7 @@
if [[ $TRANSFORMTYPE == 'sr' ]] || [[ $TRANSFORMTYPE == 'br' ]];
then
- SYNCONVERGENCE="[ 50x20,1e-6,10 ]"
+ SYNCONVERGENCE="[ 50x0,1e-6,10 ]"
SYNSHRINKFACTORS="2x1"
SYNSMOOTHINGSIGMAS="1x0vox"
SYNSTAGE="${SYNMETRICS} \
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am confused what's the differences between antsRegistrationSyNQuick.sh and antsRegistrationSyN.sh? Why is it quicker using antsRegistrationSyNQuick.sh than antsRegistrationSyN.sh? Is it related with 'repro' mode?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions