class_docstr: Class to contain ND image as list of (N-1)D images 
docstr: An implementation of a list of images.
  
  Parameters
  ----------
  images : iterable
     an iterable object whose items are meant to be images; this is
     checked by asserting that each has a `coordmap` attribute and a
     ``get_fdata`` method.  Note that Image objects are not iterable by
     default; use the ``from_image`` classmethod or ``iter_axis`` function
     to convert images to image lists - see examples below for the latter.
  
  Examples
  --------
  >>> from nipy.testing import funcfile
  >>> from nipy.core.api import Image, ImageList, iter_axis
  >>> from nipy.io.api import load_image
  >>> funcim = load_image(funcfile)
  >>> iterable_img = iter_axis(funcim, 't')
  >>> ilist = ImageList(iterable_img)
  >>> sublist = ilist[2:5]
  
  Slicing an ImageList returns a new ImageList
  
  >>> isinstance(sublist, ImageList)
  True
  
  Indexing an ImageList returns a new Image
  
  >>> newimg = ilist[2]
  >>> isinstance(newimg, Image)
  True
  >>> isinstance(newimg, ImageList)
  False
  >>> np.asarray(sublist).shape
  (3, 17, 21, 3)
  >>> newimg.get_fdata().shape
  (17, 21, 3)
docstr_tok: ["An","implementation","of","a","list","of","images",".","Parameters","--","--","--","--","--","images",":","iterable","an","iterable","object","whose","items","are","meant","to","be","images",";","this","is","checked","by","asserting","that","each","has","a","`","coordmap","`","attribute","and","a","``","get_fdata","``","method",".","Note","that","Image","objects","are","not","iterable","by","default",";","use","the","``","from_image","``","classmethod","or","``","iter_axis","``","function","to","convert","images","to","image","lists","-","see","examples","below","for","the","latter",".","Examples","--","--","--","--",">",">",">","from","nipy.testing","import","funcfile",">",">",">","from","nipy.core.api","import","Image",",","ImageList",",","iter_axis",">",">",">","from","nipy.io.api","import","load_image",">",">",">","funcim","=","load_image","(","funcfile",")",">",">",">","iterable_img","=","iter_axis","(","funcim",",","'t","'",")",">",">",">","ilist","=","ImageList","(","iterable_img",")",">",">",">","sublist","=","ilist","[","2:5","]","Slicing","an","ImageList","returns","a","new","ImageList",">",">",">","isinstance","(","sublist",",","ImageList",")","True","Indexing","an","ImageList","returns","a","new","Image",">",">",">","newimg","=","ilist","[","2","]",">",">",">","isinstance","(","newimg",",","Image",")","True",">",">",">","isinstance","(","newimg",",","ImageList",")","False",">",">",">","np.asarray","(","sublist",")",".shape","(","3",",","17",",","21",",","3",")",">",">",">","newimg.get_fdata","(",")",".shape","(","17",",","21",",","3",")"]
code: def __init__(self, images=None):
      """
      An implementation of a list of images.
  
      Parameters
      ----------
      images : iterable
         an iterable object whose items are meant to be images; this is
         checked by asserting that each has a `coordmap` attribute and a
         ``get_fdata`` method.  Note that Image objects are not iterable by
         default; use the ``from_image`` classmethod or ``iter_axis`` function
         to convert images to image lists - see examples below for the latter.
  
      Examples
      --------
      >>> from nipy.testing import funcfile
      >>> from nipy.core.api import Image, ImageList, iter_axis
      >>> from nipy.io.api import load_image
      >>> funcim = load_image(funcfile)
      >>> iterable_img = iter_axis(funcim, 't')
      >>> ilist = ImageList(iterable_img)
      >>> sublist = ilist[2:5]
  
      Slicing an ImageList returns a new ImageList
  
      >>> isinstance(sublist, ImageList)
      True
  
      Indexing an ImageList returns a new Image
  
      >>> newimg = ilist[2]
      >>> isinstance(newimg, Image)
      True
      >>> isinstance(newimg, ImageList)
      False
      >>> np.asarray(sublist).shape
      (3, 17, 21, 3)
      >>> newimg.get_fdata().shape
      (17, 21, 3)
      """
      if images is None:
          self.list = []
          return
      images = list(images)
      if not all(is_image(im) for im in images):
          raise ValueError(
              "Expecting each element of images to have "
              "the Image API"
          )
      self.list = images
  
file_path: nipy/nipy/core/image/image_list.py
imports: import warnings
  import numpy
  from ..reference.coordinate_map import AxisError, drop_io_dim, io_axis_indices
  from .image import Image, is_image, iter_axis
label_desc: Use image node_id 1 to create a new ImageList object  with example: obj = ImageList(images)