def resample_image(image, resample_params, use_voxels=False, interp_type=1):
    """
    Resample image by spacing or number of voxels with 
    various interpolators. Works with multi-channel images.

    ANTsR function: `resampleImage`

    Arguments
    ---------
    image : ANTsImage
        input image
    
    resample_params : tuple/list
        vector of size dimension with numeric values
    
    use_voxels : boolean
        True means interpret resample params as voxel counts
    
    interp_type : integer  
        one of 0 (linear), 1 (nearest neighbor), 2 (gaussian), 3 (windowed sinc), 4 (bspline)

    Returns
    -------
    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)
    """
    if image.components == 1:
        inimage = image.clone('float')
        outimage = image.clone('float')
        rsampar = 'x'.join([str(rp) for rp in resample_params])

        args = [image.dimension, inimage, outimage, rsampar, int(use_voxels), interp_type]
        processed_args = utils._int_antsProcessArguments(args)
        libfn = utils.get_lib_fn('ResampleImage')
        libfn(processed_args)
        outimage = outimage.clone(image.pixeltype)
        return outimage
    else:
        raise ValueError('images with more than 1 component not currently supported')
Resample image by spacing or number of voxels with 
    various interpolators. Works with multi-channel images.

    ANTsR function: `resampleImage`

    Arguments
    ---------
    image : ANTsImage
        input image
    
    resample_params : tuple/list
        vector of size dimension with numeric values
    
    use_voxels : boolean
        True means interpret resample params as voxel counts
    
    interp_type : integer  
        one of 0 (linear), 1 (nearest neighbor), 2 (gaussian), 3 (windowed sinc), 4 (bspline)

    Returns
    -------
    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)