class_docstr: Class to represent a sequence of 3d scans (possibly acquired on a
  slice-by-slice basis).
  
  Object remains empty until the data array is actually loaded in memory.
  
  Parameters
  ----------
    data : nd array or proxy (function that actually gets the array)
class_docstr_tok: ["Class","to","represent","a","sequence","of","3d","scans","(","possibly","acquired","on","a","slice-by-slice","basis",")",".","Object","remains","empty","until","the","data","array","is","actually","loaded","in","memory",".","Parameters","--","--","--","--","--","data",":","nd","array","or","proxy","(","function","that","actually","gets","the","array",")"]
docstr: Configure fMRI acquisition time parameters.
docstr_tok: ["Configure","fMRI","acquisition","time","parameters","."]
code: def __init__(self, data, affine, tr, slice_times, slice_info=None):
      """
      Configure fMRI acquisition time parameters.
      """
      self.affine = np.asarray(affine)
      self.tr = float(tr)
  
      # guess the slice axis and direction (z-axis)
      (
          self.slice_axis,
          self.slice_direction,
      ) = guess_slice_axis_and_direction(slice_info, self.affine)
  
      # unformatted parameters
      self._slice_times = slice_times
  
      if isinstance(data, np.ndarray):
          self._data = data
          self._shape = data.shape
          self._get_data = None
          self._init_timing_parameters()
      else:
          self._data = None
          self._shape = None
          self._get_data = data
  
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 1 to create a new Image4d object  with example: obj = Image4d(data, affine, tr, slice_times, slice_info)