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

ENH: Coordinate with other n4 usage. #560

Merged
merged 1 commit into from
Mar 8, 2024
Merged
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
9 changes: 5 additions & 4 deletions ants/utils/bias_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def n3_bias_field_correction2(
image to bias correct

mask : ANTsImage
input mask, if one is not passed one will be made
Input mask. If not specified, the entire image is used.

rescale_intensities : boolean
At each iteration, a new intensity mapping is
Expand Down Expand Up @@ -112,7 +112,7 @@ def n3_bias_field_correction2(
iters = convergence["iters"]
tol = convergence["tol"]
if mask is None:
mask = get_mask(image)
mask = image * 0 + 1
if spline_param is None:
spline_param = [1] * image.dimension

Expand Down Expand Up @@ -182,7 +182,7 @@ def n4_bias_field_correction(
image to bias correct

mask : ANTsImage
input mask, if one is not passed one will be made
Input mask. If not specified, the entire image is used.

rescale_intensities : boolean
At each iteration, a new intensity mapping is
Expand Down Expand Up @@ -228,8 +228,9 @@ def n4_bias_field_correction(
image = image.clone("float")
iters = convergence["iters"]
tol = convergence["tol"]

if mask is None:
mask = get_mask(image)
mask = image * 0 + 1
if spline_param is None:
spline_param = [1] * image.dimension

Expand Down
Loading