We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b6e9f0 commit 23af0acCopy full SHA for 23af0ac
1 file changed
TPTBox/core/nii_wrapper.py
@@ -954,7 +954,10 @@ def n4_bias_field_correction(
954
assert self.seg is False, "n4 bias field correction on a segmentation does not make any sense"
955
# install antspyx not ants!
956
import ants
957
- import ants.utils.bias_correction as bc # install antspyx not ants!
+ try:
958
+ import ants.ops.bias_correction as bc # install antspyx not ants!
959
+ except ModuleNotFoundError:
960
+ import ants.utils.bias_correction as bc # install antspyx not ants!
961
from ants.utils.convert_nibabel import from_nibabel
962
from scipy.ndimage import binary_dilation, generate_binary_structure
963
dtype = self.dtype
0 commit comments