Skip to content

Commit

Permalink
Merge pull request #1829 from ANTsX/DEFAULTS
Browse files Browse the repository at this point in the history
ENH:  Change radius and gradient step defaults.
  • Loading branch information
ntustison authored Jan 23, 2025
2 parents 9c98082 + c42cccd commit 0cff6f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Scripts/antsRegistrationSyN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ function reportMappingParameters {
Initial transforms: ${INITIALTRANSFORMS[@]}
Number of threads: $NUMBEROFTHREADS
Spline distance: $SPLINEDISTANCE
Linear gradient step: $LINEARGRADIENTSTEP
SyN gradient step: $SYNGRADIENTSTEP
Transform type: $TRANSFORMTYPE
CC radius: $CCRADIUS
Expand Down Expand Up @@ -283,10 +284,11 @@ INITIALTRANSFORMS=()
OUTPUTNAME=output
NUMBEROFTHREADS=0
SPLINEDISTANCE=26
SYNGRADIENTSTEP=0.1
LINEARGRADIENTSTEP=0.1
SYNGRADIENTSTEP=0.2
TRANSFORMTYPE='s'
PRECISIONTYPE='d'
CCRADIUS=4
CCRADIUS=2
MASKIMAGES=()
USEHISTOGRAMMATCHING=0
COLLAPSEOUTPUTTRANSFORMS=1
Expand Down Expand Up @@ -537,13 +539,13 @@ if [[ $TRANSFORMTYPE == 't' ]] ; then
tx=Translation
fi

RIGIDSTAGE="--transform ${tx}[ 0.1 ] \
RIGIDSTAGE="--transform ${tx}[ ${LINEARGRADIENTSTEP} ] \
--metric ${LINEARMETRIC}[ ${FIXEDIMAGES[0]},${MOVINGIMAGES[0]},1,${LINEARMETRICPARAMETER},Regular,0.25 ] \
--convergence $RIGIDCONVERGENCE \
--shrink-factors $RIGIDSHRINKFACTORS \
--smoothing-sigmas $RIGIDSMOOTHINGSIGMAS"

AFFINESTAGE="--transform Affine[ 0.1 ] \
AFFINESTAGE="--transform Affine[ ${LINEARGRADIENTSTEP} ] \
--metric ${LINEARMETRIC}[ ${FIXEDIMAGES[0]},${MOVINGIMAGES[0]},1,${LINEARMETRICPARAMETER},Regular,0.25 ] \
--convergence $AFFINECONVERGENCE \
--shrink-factors $AFFINESHRINKFACTORS \
Expand Down
8 changes: 5 additions & 3 deletions Scripts/antsRegistrationSyNQuick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ function reportMappingParameters {
Initial transforms: ${INITIALTRANSFORMS[@]}
Number of threads: $NUMBEROFTHREADS
Spline distance: $SPLINEDISTANCE
Linear gradient step: $LINEARGRADIENTSTEP
SyN gradient step: $SYNGRADIENTSTEP
Transform type: $TRANSFORMTYPE
MI histogram bins: $NUMBEROFBINS
Expand Down Expand Up @@ -286,7 +287,8 @@ INITIALTRANSFORMS=()
OUTPUTNAME=output
NUMBEROFTHREADS=0
SPLINEDISTANCE=26
SYNGRADIENTSTEP=0.1
LINEARGRADIENTSTEP=0.1
SYNGRADIENTSTEP=0.2
TRANSFORMTYPE='s'
PRECISIONTYPE='d'
NUMBEROFBINS=32
Expand Down Expand Up @@ -541,13 +543,13 @@ if [[ $TRANSFORMTYPE == 't' ]] ; then
tx=Translation
fi

RIGIDSTAGE="--transform ${tx}[ 0.1 ] \
RIGIDSTAGE="--transform ${tx}[ ${LINEARGRADIENTSTEP} ] \
--metric ${LINEARMETRIC}[ ${FIXEDIMAGES[0]},${MOVINGIMAGES[0]},1,${LINEARMETRICPARAMETER},Regular,0.25 ] \
--convergence $RIGIDCONVERGENCE \
--shrink-factors $RIGIDSHRINKFACTORS \
--smoothing-sigmas $RIGIDSMOOTHINGSIGMAS"

AFFINESTAGE="--transform Affine[ 0.1 ] \
AFFINESTAGE="--transform Affine[ ${LINEARGRADIENTSTEP} ] \
--metric ${LINEARMETRIC}[ ${FIXEDIMAGES[0]},${MOVINGIMAGES[0]},1,${LINEARMETRICPARAMETER},Regular,0.25 ] \
--convergence $AFFINECONVERGENCE \
--shrink-factors $AFFINESHRINKFACTORS \
Expand Down

0 comments on commit 0cff6f2

Please sign in to comment.