Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANTsCT random seed #1541

Merged
merged 2 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Scripts/antsBrainExtraction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ Optional arguments:
Without this option, this script calls antsAI to search for a good initial moving
transform.
-s: Image file suffix Any of the standard ITK IO formats e.g. nrrd, nii.gz, mhd (default = $OUTPUT_SUFFIX)
-u: Use random seeding Use random number generated from system clock (1) or a fixed seed (0). Using
"-u 0" overrides a system setting of ANTS_RANDOM_SEED. To produce identical results,
multi-threading must also be disabled by setting the environment variable
-u: Use random seeding Use random number generated from system clock (1) or a fixed seed (0). To produce identical
results, multi-threading must also be disabled by setting the environment variable
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1. Default = $USE_RANDOM_SEEDING.
-k: Keep temporary files Keep brain extraction/segmentation warps, etc (default = $KEEP_TMP_IMAGES).
-q: Use single floating point precision Use antsRegistration with single (1) or double (0) floating point precision (default = $USE_FLOAT_PRECISION).
Expand Down
18 changes: 14 additions & 4 deletions Scripts/antsCorticalThickness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ We use *label* to denote a label image with values in range 0 to N.
* Registration metric mask (-f)
* Thickness prior image (-r).

-m: Brain extraction probability mask Brain *probability* mask in the segmentation template space. A binary mask
-m: Brain extraction probability mask Brain *probability* mask in the segmentation template space. A binary mask
is an acceptable probability image.

-p: Brain segmentation priors Tissue *probability* priors corresponding to the image specified
Expand Down Expand Up @@ -127,7 +127,7 @@ Optional arguments:
https://github.com/ANTsX/ANTs/wiki.

-f: extraction registration mask Binary metric mask defined in the segmentation template space (-e). During the
registration for brain extraction, the similarity metric is only computed within
registration for brain extraction, the similarity metric is only computed within
this mask.

-k: keep temporary files Keep brain extraction/segmentation warps, etc (default = 0).
Expand All @@ -147,7 +147,10 @@ Optional arguments:

-j: use floating-point precision Use single float precision in registrations (default = 0).

-u: use random seeding Use random number generated from system clock in Atropos (default = 1).
-u: use random seeding Use random number generated from system clock (default = 1). If 0, a fixed
random seed is used. To set your own seed, set this option to 0 and export the
environment variable ANTS_RANDOM_SEED. To achieve exactly identical results, you must
also set ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS to 1.

-v: use b-spline smoothing Use B-spline SyN for registrations and B-spline exponential mapping in DiReCT (default = 0).

Expand All @@ -173,7 +176,7 @@ Optional arguments:
Another example would be computing cortical thickness in the presence
of white matter lesions. We can accommodate this by specifying a lesion mask
posterior as an additional posterior (suppose label '7'), combining this with
normal white matter in the thickness estimation by specifying '-c "WM[ 7 ]"'
normal white matter in the thickness estimation by specifying '-c "WM[ 7 ]"'
or '-c "3[ 7 ]"'.

-q: Use quick registration parameters If = 1, use antsRegistrationSyNQuick.sh as the basis for registration
Expand Down Expand Up @@ -540,6 +543,13 @@ if [[ $DEBUG_MODE -gt 0 ]];

fi

if [[ ${USE_RANDOM_SEEDING} -eq 0 ]]; then
# Use fixed random seed unless one is already defined
if [[ -z $ANTS_RANDOM_SEED ]] ; then
export ANTS_RANDOM_SEED=19650218
fi
fi

################################################################################
#
# Preliminaries:
Expand Down