docstr: Resample a particular time frame on the (sub-sampled) working
  grid.
  
  x,y,z,t are "head" grid coordinates
  X,Y,Z,T are "scanner" grid coordinates
docstr_tok: ["Resample","a","particular","time","frame","on","the","(","sub-sampled",")","working","grid",".","x",",","y",",","z",",","t","are","``","head","''","grid","coordinates","X",",","Y",",","Z",",","T","are","``","scanner","''","grid","coordinates"]
code: def resample(self, t):
      """
      Resample a particular time frame on the (sub-sampled) working
      grid.
  
      x,y,z,t are "head" grid coordinates
      X,Y,Z,T are "scanner" grid coordinates
      """
      X, Y, Z = scanner_coords(
          self.xyz,
          self.transforms[t].as_affine(),
          self.inv_affine,
          self.affine,
      )
      if self.time_interp:
          T = self.scanner_time(Z, self.timestamps[t])
          _cspline_sample4d(
              self.data[:, t],
              self.cbspline,
              X,
              Y,
              Z,
              T,
              mx="reflect",
              my="reflect",
              mz="reflect",
              mt="reflect",
          )
      else:
          _cspline_sample3d(
              self.data[:, t],
              self.cbspline[:, :, :, t],
              X,
              Y,
              Z,
              mx="reflect",
              my="reflect",
              mz="reflect",
          )
  
imports: import os
  import warnings
  import numpy
  from nibabel import io_orientation
  from nibabel.affines import apply_affine
  from ...core.image.image_spaces import as_xyz_image, make_xyz_image, xyz_affine
  from ...io.nibcompat import get_header
  from ..slicetiming import timefuncs
  from ._registration import _cspline_sample3d, _cspline_sample4d, _cspline_transform
  from .affine import Affine, Rigid
  from .optimizer import configure_optimizer, use_derivatives
  from .type_check import check_type, check_type_and_shape
label_desc: Use image node_id 2 for calling the Realign4dAlgorithm obj's underlying member method code with example usage: obj.resample(t) without return types