class_docstr: Class returns a list of Ecat images, with one image(hdr/data) per frame
class_docstr_tok: ["Class","returns","a","list","of","Ecat","images",",","with","one","image","(","hdr\/data",")","per","frame"]
docstr: Initialize Image
  
  The image is a combination of
  (array, affine matrix, header, subheader, mlist)
  with optional meta data in `extra`, and filename / file-like objects
  contained in the `file_map`.
  
  Parameters
  ----------
  dataobj : array-like
      image data
  affine : None or (4,4) array-like
      homogeneous affine giving relationship between voxel coords and
      world coords.
  header : None or header instance
      meta data for this image format
  subheader : None or subheader instance
      meta data for each sub-image for frame in the image
  mlist : None or array
      Matrix list array giving offset and order of data in file
  extra : None or mapping, optional
      metadata associated with this image that cannot be
      stored in header or subheader
  file_map : mapping, optional
      mapping giving file information for this image format
  
  Examples
  --------
  >>> import os
  >>> import nibabel as nib
  >>> nibabel_dir = os.path.dirname(nib.__file__)
  >>> from nibabel import ecat
  >>> ecat_file = os.path.join(nibabel_dir,'tests','data','tinypet.v')
  >>> img = ecat.load(ecat_file)
  >>> frame0 = img.get_frame(0)
  >>> frame0.shape == (10, 10, 3)
  True
  >>> data4d = img.get_fdata()
  >>> data4d.shape == (10, 10, 3, 1)
  True
docstr_tok: ["Initialize","Image","The","image","is","a","combination","of","(","array",",","affine","matrix",",","header",",","subheader",",","mlist",")","with","optional","meta","data","in","`","extra","`",",","and","filename","\/","file-like","objects","contained","in","the","`","file_map","`",".","Parameters","--","--","--","--","--","dataobj",":","array-like","image","data","affine",":","None","or","(","4,4",")","array-like","homogeneous","affine","giving","relationship","between","voxel","coords","and","world","coords",".","header",":","None","or","header","instance","meta","data","for","this","image","format","subheader",":","None","or","subheader","instance","meta","data","for","each","sub-image","for","frame","in","the","image","mlist",":","None","or","array","Matrix","list","array","giving","offset","and","order","of","data","in","file","extra",":","None","or","mapping",",","optional","metadata","associated","with","this","image","that","can","not","be","stored","in","header","or","subheader","file_map",":","mapping",",","optional","mapping","giving","file","information","for","this","image","format","Examples","--","--","--","--",">",">",">","import","os",">",">",">","import","nibabel","as","nib",">",">",">","nibabel_dir","=","os.path.dirname","(","nib.__file__",")",">",">",">","from","nibabel","import","ecat",">",">",">","ecat_file","=","os.path.join","(","nibabel_dir",",","'tests","'",",","'data","'",",","'tinypet.v","'",")",">",">",">","img","=","ecat.load","(","ecat_file",")",">",">",">","frame0","=","img.get_frame","(","0",")",">",">",">","frame0.shape","==","(","10",",","10",",","3",")","True",">",">",">","data4d","=","img.get_fdata","(",")",">",">",">","data4d.shape","==","(","10",",","10",",","3",",","1",")","True"]
code: def __init__(
      self,
      dataobj,
      affine,
      header,
      subheader,
      mlist,
      extra=None,
      file_map=None,
  ):
      """Initialize Image
  
      The image is a combination of
      (array, affine matrix, header, subheader, mlist)
      with optional meta data in `extra`, and filename / file-like objects
      contained in the `file_map`.
  
      Parameters
      ----------
      dataobj : array-like
          image data
      affine : None or (4,4) array-like
          homogeneous affine giving relationship between voxel coords and
          world coords.
      header : None or header instance
          meta data for this image format
      subheader : None or subheader instance
          meta data for each sub-image for frame in the image
      mlist : None or array
          Matrix list array giving offset and order of data in file
      extra : None or mapping, optional
          metadata associated with this image that cannot be
          stored in header or subheader
      file_map : mapping, optional
          mapping giving file information for this image format
  
      Examples
      --------
      >>> import os
      >>> import nibabel as nib
      >>> nibabel_dir = os.path.dirname(nib.__file__)
      >>> from nibabel import ecat
      >>> ecat_file = os.path.join(nibabel_dir,'tests','data','tinypet.v')
      >>> img = ecat.load(ecat_file)
      >>> frame0 = img.get_frame(0)
      >>> frame0.shape == (10, 10, 3)
      True
      >>> data4d = img.get_fdata()
      >>> data4d.shape == (10, 10, 3, 1)
      True
      """
      self._subheader = subheader
      self._mlist = mlist
      self._dataobj = dataobj
      if affine is not None:
          # Check that affine is array-like 4,4.  Maybe this is too strict at
          # this abstract level, but so far I think all image formats we know
          # do need 4,4.
          affine = np.array(affine, dtype=np.float64, copy=True)
          if not affine.shape == (4, 4):
              raise ValueError("Affine should be shape 4,4")
      self._affine = affine
      if extra is None:
          extra = {}
      self.extra = extra
      self._header = header
      if file_map is None:
          file_map = self.__class__.make_file_map()
      self.file_map = file_map
      self._data_cache = None
      self._fdata_cache = None
  
imports: import warnings
  from numbers import Integral
  import numpy
  from .arraywriters import make_array_writer
  from .fileslice import canonical_slicers, predict_shape, slice2outax
  from .spatialimages import SpatialHeader, SpatialImage
  from .volumeutils import array_from_file, make_dt_codes, native_code, swapped_code
  from .wrapstruct import WrapStruct
label_desc: Use image node_id 1 to create a new EcatImage object from inherited base classes: SpatialImage with example: obj = EcatImage(dataobj, affine, header, subheader, mlist, extra, file_map)