fsleyes.gl.ortholabels¶
This module provides the OrthoLabels class, which manages
anatomical orientation labels for an OrthoPanel.
This logic is independent from the OrthoPanel so it can be used in
off-screen rendering (see render).
-
class
fsleyes.gl.ortholabels.OrthoLabels(overlayList, displayCtx, orthoOpts, *canvases)[source]¶ Bases:
objectThe
OrthoLabelsclass manages anatomical orientation labels which are displayed on a set of threeSliceCanvasinstances, one for each plane in the display coordinate system, typically within anOrthoPanel.The
OrthoLabelsclass usesannotations.Textannotations, showing the user the anatomical orientation of the display on each canvas. These labels are only shown if the currently selected overlay (as dicated by theDisplayContext.selectedOverlayproperty) is aImageinstance, or theDisplayOpts.referenceImage()property for the currently selected overlay returns anImageinstance.-
__init__(overlayList, displayCtx, orthoOpts, *canvases)[source]¶ Create an
OrthoLabelsinstance.- Parameters
overlayList – The
OverlayList.displayCtx – The
DisplayContext.orthoOpts –
OrthoOptsinstance which contains display settings.canvases – The
SliceCanvasinstances to be labelled.
-
__overlayListChanged(*a)¶ Called when the
OverlayListchanges. Registers a listener on the attr:.DisplayOpts.bounds` property of every overlay in the list, so the labels are refreshed when any overlay bounds change.
-
__refreshLabels(*a)¶ Updates the attributes of the
Textanatomical orientation annotations on eachSliceCanvas.
-
__dict__= mappingproxy({'__module__': 'fsleyes.gl.ortholabels', '__doc__': 'The ``OrthoLabels`` class manages anatomical orientation labels which\n are displayed on a set of three :class:`.SliceCanvas` instances, one for\n each plane in the display coordinate system, typically within an\n :class:`.OrthoPanel`.\n\n The ``OrthoLabels`` class uses :class:`.annotations.Text` annotations,\n showing the user the anatomical orientation of the display on each\n canvas. These labels are only shown if the currently selected overlay (as\n dicated by the :attr:`.DisplayContext.selectedOverlay` property) is a\n :class:`.Image` instance, **or** the\n :meth:`.DisplayOpts.referenceImage` property for the currently selected\n overlay returns an :class:`.Image` instance.\n ', '__init__': <function OrthoLabels.__init__>, 'destroy': <function OrthoLabels.destroy>, 'refreshLabels': <function OrthoLabels.refreshLabels>, '_OrthoLabels__overlayListChanged': <function OrthoLabels.__overlayListChanged>, '_OrthoLabels__refreshLabels': <function OrthoLabels.__refreshLabels>, '__dict__': <attribute '__dict__' of 'OrthoLabels' objects>, '__weakref__': <attribute '__weakref__' of 'OrthoLabels' objects>, '__annotations__': {}})¶
-
__module__= 'fsleyes.gl.ortholabels'¶
-
__weakref__¶ list of weak references to the object (if defined)
-