Giving credit

Previous topic

7.5.15. nilearn.image.smooth_img

Next topic

7.5.17. nilearn.image.threshold_img

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

7.5.16. nilearn.image.swap_img_hemispheres

nilearn.image.swap_img_hemispheres(img)

Performs swapping of hemispheres in the indicated nifti.

Use case: synchronizing ROIs across hemispheres
Parameters:

img: Niimg-like object

Returns:

output: nibabel.Nifti1Image

hemispherically swapped image

Notes

Supposes a nifti of a brain that is sagitally aligned

Should be used with caution (confusion might be caused with radio/neuro conventions)

Note that this does not require a change of the affine matrix.