Viewer Class — imagedata 1.3.0 documentation

# Viewer Class

Viewer – a graphical tool to display and interact with Series objects.

class `imagedata.viewer.` `Viewer`(images, fig=None, ax=None, follow=False, cmap='gray', window=None, level=None, link=False)

  Viewer – a graphical tool to display and interact with Series objects.

  Parameters

    - images (Series or list) – Series object or list of Series objects to view.

    - fig (Figure) – matplotlib.plt.figure if already exist (optional).

    - ax (Axes) – matplotlib axis if already exist (optional).

    - follow (bool) – Copy ROI to next tag. Default: False.

    - cmap (str) – Colour map for display. Default: gray.

    - windows (number) – Window width of signal intensities. Default: DICOM Window Width.

    - level (number) – Window level of signal intensities. Default: DICOM Window Center.

    - link (bool) – Whether scrolling is linked between displayed objects. Default: False.

  `advance_data`(inaxes, increment)

    Advance display to next/previous tag value

  `get_roi`()

    Return drawn ROI.

    Returns

      Dict of slices, index as [tag,slice] or [slice], each is list of (x,y) pairs.

  `grid_from_roi`()

    Return drawn ROI as grid.

    Returns

      Numpy ndarray with shape (nz,ny,nx) from original image, dtype ubyte. Voxels inside ROI is 1, 0 outside.

  `set_default_viewport`(axes)

    View as many Series as there are axes