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.

nilearn.image.copy_img

nilearn.image.copy_img(img)[source]

Copy an image to a nibabel.Nifti1Image.

Parameters:
imgimage

nibabel SpatialImage object to copy.

Returns:
img_copyimage

copy of input (data, affine and header)