def __init__(self, scale, reference=None, interp='linear'):
        """
        Initialize a TranslateImage transform

        Arguments
        ---------
        scale : list, tuple, or numpy.ndarray
            relative scaling along each axis

        reference : ANTsImage (optional)
            image which provides the reference physical space in which
            to perform the transform

        interp : string
            type of interpolation to use
            options: linear, nearest

        Example
        -------
        >>> import ants
        >>> translater = ants.contrib.TranslateImage((10,10), interp='linear')
        """
        if interp not in {'linear', 'nearest'}:
            raise ValueError('interp must be one of {linear, nearest}')

        self.scale = list(scale)
        self.reference = reference
        self.interp = interp
def __init__ ( self , scale , reference = None , interp = 'linear' ) : if interp not in { 'linear' , 'nearest' } : raise ValueError ( 'interp must be one of {linear, nearest}' ) self . scale = list ( scale ) self . reference = reference self . interp = interp
Initialize a TranslateImage transform

        Arguments
        ---------
        scale : list, tuple, or numpy.ndarray
            relative scaling along each axis

        reference : ANTsImage (optional)
            image which provides the reference physical space in which
            to perform the transform

        interp : string
            type of interpolation to use
            options: linear, nearest

        Example
        -------
        >>> import ants
        >>> translater = ants.contrib.TranslateImage((10,10), interp='linear')