Bases: object
Class to contain ND image as list of (N-1)D images
Methods
from_image | |
next |
A lightweight implementation of a list of images.
Parameters : | images : iterable
>>> import numpy as np : >>> 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 : >>> np.asarray(sublist).shape : (3, 2, 20, 20) : >>> np.asarray(newimg).shape : (2, 20, 20) : |
---|