# nipy.labs.datasets.volumes.volume_field.VolumeField.resampled_to_img¶

VolumeField.resampled_to_img(target_image, interpolation=None)

Resample the volume to be sampled similarly than the target volumetric structure.

Parameters
target_imagenipy volume

Nipy volume structure onto the grid of which the data will be resampled.

interpolationNone, ‘continuous’ or ‘nearest’, optional

Interpolation type used when calculating values in different word spaces. If None, the volume’s interpolation logic is used.

Returns
resampled_imagenipy_image

New nipy image with the data resampled.

Notes

Both the target image and the original image should be embedded in the same world space.