OverlaySpec

OverlaySpec#

class braincell.vis.OverlaySpec(region=None, locset=None, values=None)[source]#

User-facing overlay request passed through plot2d / plot3d.

The scene builders translate this into concrete overlay primitives (HighlightStroke2D / Marker2D / HighlightStroke3D / Marker3D) that the backends then render on top of the base scene.

Fields are plain masks so callers can build them with region_expr.evaluate(morpho) / locset_expr.evaluate(morpho).

values may be either a bare array (interpreted with default styling) or a ValueSpec carrying colormap / bounds / label information.

values_spec()[source]#

Return the normalized ValueSpec, or None.

Accepts either a bare array (upgraded to ValueSpec with default styling) or an already-constructed ValueSpec.

Return type:

ValueSpec | None