Package mvpa :: Package misc :: Package plot :: Module mri

[hide private]
[frames] | no frames]

# Module mri

source code

Basic (f)MRI plotting with ability to interactively perform thresholding

Functions | [hide private]

plotMRI(background=None, background_mask=None, cmap_bg='gray', overlay=None, overlay_mask=None, cmap_overlay='autumn', vlim=(0.0,None), vlim_type=None, do_stretch_colors=False, add_info=True, add_hist=True, add_colorbar=True, fig=None, interactive=None, nrows=None, ncolumns=None) Very basic plotting of 3D data with interactive thresholding. | source code

Variables | [hide private]

| _interactive_backends = `['GTKAgg', 'TkAgg']`

Imports: P, N, mpl, warning, externals, NiftiImage

Function Details | [hide private]

### plotMRI(background=None, background_mask=None, cmap_bg='gray', overlay=None, overlay_mask=None, cmap_overlay='autumn', vlim=(0.0,None), vlim_type=None, do_stretch_colors=False, add_info=True, add_hist=True, add_colorbar=True, fig=None, interactive=None, nrows=None, ncolumns=None)

source code

Very basic plotting of 3D data with interactive thresholding.

Background/overlay could be nifti files names or NiftiImage objects, or 3D ndarrays. if no mask provided, only non-0 elements are plotted

Available colormaps are presented nicely on
  http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps
TODO:
  - Make interface more attractive/usable
  - allow multiple overlays... or just unify for them all to be just a list of entries
  - handle cases properly when there is only one - background/overlay

Parameters:
  - `do_stretch_colors` (bool) - Stratch color range to the data (not just to visible data)
  - `vlim` - 2 element tuple of low/upper bounds of values to plot
  - `vlim_type` (None or 'symneg_z') -
    If not None, then vlim would be treated accordingly:
      symneg_z
        z-score values of symmetric normal around 0, estimated by symmetrizing negative part of the distribution, which often could be assumed when total distribution is a mixture of by-chance performance normal around 0, and some other in the positive tail
  - `ncolumns` (int or None) - Explicit starting number of columns into which position the slice renderings. If None, square arrangement would be used
  - `nrows` (int or None) - Explicit starting number of rows into which position the slice renderings. If None, square arrangement would be used
  - `add_hist` (bool or tuple (int, int)) - If True, add histogram and position automagically. If a tuple -- use as (row, column)
  - `add_info` (bool or tuple (int, int)) - If True, add information and position automagically. If a tuple -- use as (row, column).