visualizecell_morphology_visualizerCellMorphologyInteractiveVisualizer

CellMorphologyInteractiveVisualizer

class visualize.cell_morphology_visualizer.CellMorphologyInteractiveVisualizer(cell, align_trunk=True, dash_ip=None, show=True, renderer='notebook_connected', t_start=None, t_stop=None, t_step=None)

Plot an interactive 3D render of a cell morphology using Plotly and Dash.

Initializes the CellMorphologyInteractiveVisualizer object.

Parameters:
  • cell (Cell) – Cell object

  • align_trunk (bool) – Whether or not to align the cell trunk with the z-axis.

  • dash_ip (str) – IP address to run dash server on.

  • show (bool) – set to False for testing

  • renderer (str) – Type of backend renderer to use for rendering the javascript/HTML VBox. Defaults to “notebook_connected”

  • t_start (float) – start time point of our time series visualization

  • t_stop (float) – last time point of our time series visualization

  • t_step (float) – time between the different time points of our visualization

Attributes:

dash_ip

IP address to run dash server on.

Type:

str

show

Whether to show the plot. Set to False for testing purposes. Default: True

Type:

bool

background_color

Background color of the plot. Defaults to “#f0f0f0”

Type:

str

renderer

Type of backend renderer to use for rendering the javascript/HTML VBox. Defaults to “notebook_connected”. Available renderers are:

  • ‘plotly_mimetype’

  • ‘jupyterlab’

  • ‘nteract’

  • ‘vscode’

  • ‘notebook’

  • ‘notebook_connected’

  • ‘kaggle’

  • ‘azure’

  • ‘colab’

  • ‘cocalc’

  • ‘databricks’

  • ‘json’

  • ‘png’

  • ‘jpeg’

  • ‘jpg’

  • ‘svg’

  • ‘pdf’

  • ‘browser’

  • ‘firefox’

  • ‘chrome’

  • ‘chromium’

  • ‘iframe’

  • ‘iframe_connected’

  • ‘sphinx_gallery’

  • ‘sphinx_gallery_png’

Type:

str

Methods:

_get_interactive_cell(color, time_point, diameter)

Setup plotly for rendering in notebooks.

_get_interactive_dash_app(color, t_start, t_stop, t_step)

This is the main function to set up an interactive plot with scalar data overlayed.

interactive_plot(color, renderer, diameter, time_point, show)

This method shows a plot with an interactive cell, overlayed with scalar data (if provided with the data argument).

interactive_app(color, t_start, t_stop, t_step)

Parameters:
  • color (str | list) – If you want some other color overlayed on the cell morphology.