class_docstr: The `Image` class provides the core object type used in nipy.
  
  An `Image` represents a volumetric brain image and provides means
  for manipulating the image data.  Most functions in the image module
  operate on `Image` objects.
  
  Notes
  -----
  Images can be created through the module functions.  See nipy.io for
  image IO such as ``load`` and ``save``
  
  Examples
  --------
  Load an image from disk
  
  >>> from nipy.testing import anatfile
  >>> from nipy.io.api import load_image
  >>> img = load_image(anatfile)
  
  Make an image from an array.  We need to make a meaningful coordinate map
  for the image.
  
  >>> arr = np.zeros((21,64,64), dtype=np.int16)
  >>> cmap = AffineTransform('kji', 'zxy', np.eye(4))
  >>> img = Image(arr, cmap)
docstr: Slicing an image returns an Image.
  
  Parameters
  ----------
  slice_object: int, slice or sequence of slice
      An object representing a numpy 'slice'.
  
  Returns
  -------
  img_subsampled: Image
      An Image with data self.get_fdata()[slice_object] and an
      appropriately corrected CoordinateMap.
  
  Examples
  --------
  >>> from nipy.io.api import load_image
  >>> from nipy.testing import funcfile
  >>> im = load_image(funcfile)
  >>> frame3 = im[:,:,:,3]
  >>> np.allclose(frame3.get_fdata(), im.get_fdata()[:,:,:,3])
  True
code: def __getitem__(self, slice_object):
      """Slicing an image returns an Image.
  
      Parameters
      ----------
      slice_object: int, slice or sequence of slice
          An object representing a numpy 'slice'.
  
      Returns
      -------
      img_subsampled: Image
          An Image with data self.get_fdata()[slice_object] and an
          appropriately corrected CoordinateMap.
  
      Examples
      --------
      >>> from nipy.io.api import load_image
      >>> from nipy.testing import funcfile
      >>> im = load_image(funcfile)
      >>> frame3 = im[:,:,:,3]
      >>> np.allclose(frame3.get_fdata(), im.get_fdata()[:,:,:,3])
      True
      """
      data = self.get_fdata()[slice_object]
      g = ArrayCoordMap(self.coordmap, self.shape)[slice_object]
      coordmap = g.coordmap
      if coordmap.function_domain.ndim > 0:
          return self.__class__.from_image(
              self, data=data, coordmap=coordmap
          )
      else:
          return data
  
imports: import warnings
  from copy import copy
  from itertools import chain
  import numpy
  from nibabel.onetime import auto_attr
  from ..reference.array_coords import ArrayCoordMap
  from ..reference.coordinate_map import AffineTransform, CoordinateSystem, input_axis_index
label_desc: Use image node_id 16 for calling the Image obj's underlying member method code with example usage: obj.__getitem__(slice_object) and returns: self, data