class_docstr: Interpolate Image instance at arbitrary points in world space
  
  The resampling is done with ``scipy.ndimage``.
docstr: Parameters
  ----------
  image : Image
     Image to be interpolated.
  order : int, optional
     order of spline interpolation as used in ``scipy.ndimage``.
     Default is 3.
  mode : str, optional
     Points outside the boundaries of the input are filled according to
     the given mode ('constant', 'nearest', 'reflect' or 'wrap'). Default
     is 'constant'.
  cval : scalar, optional
     Value used for points outside the boundaries of the input if
     mode='constant'. Default is 0.0.
docstr_tok: ["Parameters","--","--","--","--","--","image",":","Image","Image","to","be","interpolated",".","order",":","int",",","optional","order","of","spline","interpolation","as","used","in","``","scipy.ndimage","``",".","Default","is","3.","mode",":","str",",","optional","Points","outside","the","boundaries","of","the","input","are","filled","according","to","the","given","mode","(","'constant","'",",","'nearest","'",",","'reflect","'","or","'wrap","'",")",".","Default","is","'constant","'",".","cval",":","scalar",",","optional","Value","used","for","points","outside","the","boundaries","of","the","input","if","mode='constant","'",".","Default","is","0.0","."]
code: def __init__(self, image, order=3, mode="constant", cval=0.0):
      """
      Parameters
      ----------
      image : Image
         Image to be interpolated.
      order : int, optional
         order of spline interpolation as used in ``scipy.ndimage``.
         Default is 3.
      mode : str, optional
         Points outside the boundaries of the input are filled according to
         the given mode ('constant', 'nearest', 'reflect' or 'wrap'). Default
         is 'constant'.
      cval : scalar, optional
         Value used for points outside the boundaries of the input if
         mode='constant'. Default is 0.0.
      """
      # order and mode are read-only to allow pre-calculation of spline
      # filters.
      self.image = image
      self._order = order
      self._mode = mode
      self.cval = cval
      self._datafile = None
      self._n_prepad = 0  # Non-zero for 'nearest' and 'grid-constant'
      self._buildknots()
  
file_path: nipy/nipy/algorithms/interpolation.py
imports: import tempfile
  import numpy
  from scipy.ndimage import map_coordinates, spline_filter
  from ..utils import seq_prod
label_desc: Use image node_id 1 to create a new ImageInterpolator object  with example: obj = ImageInterpolator(image, order, mode, cval)