diff --git a/antspynet/utilities/brain_extraction.py b/antspynet/utilities/brain_extraction.py index 42a30f0..84c4615 100644 --- a/antspynet/utilities/brain_extraction.py +++ b/antspynet/utilities/brain_extraction.py @@ -177,6 +177,9 @@ def brain_extraction(image, reorient_template = reorient_template * reorient_template_mask reorient_template = ants.resample_image(reorient_template, (1, 1, 1), use_voxels=False, interp_type=0) reorient_template = pad_or_crop_image_to_size(reorient_template, (160, 176, 160)) + xfrm = ants.create_ants_transform(transform_type="Euler3DTransform", + center=np.asarray(ants.get_center_of_mass(reorient_template)), translation=(0, -10, -15)) + reorient_template = xfrm.apply_to_image(reorient_template) else: reorient_template = ants.image_read(get_antsxnet_data("S_template3")) if is_standard_network and (modality != "t1.v1" and modality != "mra"):