PickInfo

Contents

PickInfo#

class braincell.vis.PickInfo(branch_index, branch_name, branch_type, segment_index=None, x=None, value=None, position_um=None, artist=None)[source]#

Payload delivered to a VisHooks callback.

Parameters:
  • branch_index (int) – Index of the branch inside morpho.branches.

  • branch_name (str) – Human-readable branch name.

  • branch_type (str) – Branch type string ("soma", "apical_dendrite", …).

  • segment_index (int | None) – Segment index within the branch (0 for the proximal segment), or None if the artist does not resolve to a single segment.

  • x (float | None) – Fractional arc-length coordinate along the branch in [0, 1], or None if the pick cannot be placed precisely.

  • value (float | None) – Scalar at the picked segment when the scene carries a colour-by-values overlay. None when no values were supplied.

  • position_um (ndarray | None) – Pick location in scene coordinates (2-D for matplotlib, 3-D for PyVista). None when the backend did not report a location.

  • artist (Any) – The underlying backend artist (e.g. LineCollection, pyvista.PolyData). Opaque to generic code but useful for tests and advanced callers.