esmraldi.viewer3D

3D viewer for MS images Based on vedo (inherits Plotter)

Module Contents

Classes

Slicer

Generate a Plotter window with slicing planes for the input Volume.

class esmraldi.viewer3D.Slicer(volume, qtWidget, alpha=1, cmaps=('gist_ncar_r', 'hot_r', 'bone_r', 'jet', 'Spectral_r'), map2cells=False, clamp=True, useSlider3D=False, size=(850, 700), screensize='auto', title='', bg='white', bg2='lightblue', axes=1, draggable=False, verbose=True)

Bases: vedo.plotter.Plotter

Generate a Plotter window with slicing planes for the input Volume. Returns the Plotter object.

Parameters
  • alpha (float) – transparency of the slicing planes

  • cmaps (list) – list of color maps names to cycle when clicking button

  • map2cells (bool) – scalars are mapped to cells, not intepolated.

  • clamp (bool) – clamp scalar to reduce the effect of tails in color mapping

  • useSlider3D (bool) – show sliders attached along the axes

  • size (list) – rendering window size in pixels

  • screensize (list) – size of the screen can be specified

  • title (str) – window title

  • bg – background color

  • bg2 – background gradient color

  • axes (int) – axis type number

  • draggable (bool) – make the icon draggable

display_all_slices(axis)

Display all 2D slices in the 3D volume

setOTF()

Function to initialize transfer function. Useful for volume rendering

sliderThreshold(widget, event)

Action on intensity changes

sliderOpacityThreshold(widget, event)

Action on opacity changes

refresh()

Refresh view on internal events

update(vol)

Update the volume on external events (key or mouse events), which happen on other elements in the Application (e.g. matplotlib plot).

Example: selection of a new m/z image on the spectrum

Parameters
self: type

description

vol: Volume

Volume