class_docstr: Class to implement image list interface for FMRI time series
  
  Allows metadata such as volume and slice times
docstr: Create an FmriImageList from a 4D Image
  
  Get images by extracting 3d images along the 't' axis.
  
  Parameters
  ----------
  fourdimage : ``Image`` instance
      A 4D Image
  volume_start_times: None or float or (N,) ndarray
      start time of each frame. It can be specified either as an ndarray
      with ``N=len(images)`` elements or as a single float, the TR. None
      results in ``np.arange(len(images)).astype(np.float64)``
  slice_times: None or (N,) ndarray
      specifying offset for each slice of each frame, from the frame start
      time.
  
  Returns
  -------
  filist : ``FmriImageList`` instance
docstr_tok: ["Create","an","FmriImageList","from","a","4D","Image","Get","images","by","extracting","3d","images","along","the","'t","'","axis",".","Parameters","--","--","--","--","--","fourdimage",":","``","Image","``","instance","A","4D","Image","volume_start_times",":","None","or","float","or","(","N",",",")","ndarray","start","time","of","each","frame",".","It","can","be","specified","either","as","an","ndarray","with","``","N=len","(","images",")","``","elements","or","as","a","single","float",",","the","TR",".","None","results","in","``","np.arange","(","len","(","images",")",")",".astype","(","np.float64",")","``","slice_times",":","None","or","(","N",",",")","ndarray","specifying","offset","for","each","slice","of","each","frame",",","from","the","frame","start","time",".","Returns","--","--","--","-","filist",":","``","FmriImageList","``","instance"]
code: def from_image(
      klass,
      fourdimage,
      axis="t",
      volume_start_times=None,
      slice_times=None,
  ):
      """Create an FmriImageList from a 4D Image
  
      Get images by extracting 3d images along the 't' axis.
  
      Parameters
      ----------
      fourdimage : ``Image`` instance
          A 4D Image
      volume_start_times: None or float or (N,) ndarray
          start time of each frame. It can be specified either as an ndarray
          with ``N=len(images)`` elements or as a single float, the TR. None
          results in ``np.arange(len(images)).astype(np.float64)``
      slice_times: None or (N,) ndarray
          specifying offset for each slice of each frame, from the frame start
          time.
  
      Returns
      -------
      filist : ``FmriImageList`` instance
      """
      if fourdimage.ndim != 4:
          raise ValueError("expecting a 4-dimensional Image")
      image_list = ImageList.from_image(fourdimage, axis)
      return klass(
          images=image_list.list,
          volume_start_times=volume_start_times,
          slice_times=slice_times,
      )
  
file_path: nipy/nipy/modalities/fmri/fmri.py
imports: import numpy
  from ...core.api import ImageList
label_desc: Use image node_id 3 for calling the FmriImageList obj's underlying member method code with example usage: obj.from_image(klass, fourdimage, axis, volume_start_times, slice_times) and returns: klass