<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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 ------- """

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