class_docstr: Interpolate Image instance at arbitrary points in world space
  
  The resampling is done with ``scipy.ndimage``.
code: def _buildknots(self):
      data = np.nan_to_num(self.image.get_fdata()).astype(np.float64)
      if self.order > 1:
          if self.mode in ("nearest", "grid-constant"):
              # See: https://github.com/scipy/scipy/issues/13600
              self._n_prepad = self.n_prepad_if_needed
              if self._n_prepad != 0:
                  data = np.pad(data, self._n_prepad, mode="edge")
          kwargs = {"order": self.order}
          kwargs["mode"] = self.mode
          data = spline_filter(data, **kwargs)
      self._datafile = tempfile.TemporaryFile()
      data.tofile(self._datafile)
      self._data = np.memmap(
          self._datafile, dtype=data.dtype, mode="r+", shape=data.shape
      )
      del data
  
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 4 for calling the ImageInterpolator obj's underlying member method code with example usage: obj._buildknots() without return types