Giving credit

Table Of Contents

Previous topic

7.5.12. nilearn.image.resample_img

Next topic

7.5.14. nilearn.image.reorder_img


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.13. nilearn.image.resample_to_img

nilearn.image.resample_to_img(source_img, target_img, interpolation='continuous', copy=True, order='F')

Resample a Niimg-like source image on a target Niimg-like image (no registration is performed: the image should already be aligned).

New in version 0.2.4.


source_img: Niimg-like object

target_img: Niimg-like object

See Reference image taken for resampling.

interpolation: str, optional

Can be ‘continuous’ (default) or ‘nearest’. Indicates the resample method.

copy: bool, optional

If True, guarantees that output array has no memory in common with input array. In all cases, input images are never modified by this function.

order: “F” or “C”

Data ordering in output array. This function is slightly faster with Fortran ordering.


resampled: nibabel.Nifti1Image

input image, resampled to have respectively target image shape and affine as shape and affine. Examples using nilearn.image.resample_to_img