ants.ops.resample_image
- resample_image(image, resample_params, use_voxels=False, interp_type=1)[source]
Resample image by spacing or number of voxels with various interpolators. Works with multi-channel images.
ANTsR function: resampleImage
- Parameters:
- Return type:
ants.core.ANTsImage
Example
>>> import ants >>> fi = ants.image_read( ants.get_ants_data("r16")) >>> finn = ants.resample_image(fi,(50,60),True,0) >>> filin = ants.resample_image(fi,(1.5,1.5),False,1) >>> img = ants.image_read( ants.get_ants_data("r16")) >>> img = ants.merge_channels([img, img]) >>> outimg = ants.resample_image(img, (128,128), True)