A lightweight implementation of a list of images.
Parameters: | images: a sliceable object whose items are meant to be images, :
>>> from numpy import asarray : >>> from nipy.testing import funcfile : >>> from nipy.core.api import Image, ImageList : >>> from nipy.io.api import load_image : >>> funcim = load_image(funcfile) : >>> ilist = ImageList(funcim) : >>> 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 : >>> asarray(sublist).shape : (3, 20, 2, 20) : >>> asarray(newimg).shape : (20, 2, 20) : |
---|