fsleyes.views.lightboxpanel¶
This module provides the LightBoxPanel, which displays multiple
2D slices of 3D overlays.
-
class
fsleyes.views.lightboxpanel.LightBoxPanel(parent, overlayList, displayCtx, frame)[source]¶ Bases:
fsleyes.views.canvaspanel.CanvasPanelThe
LightBoxPanelis a FSLeyes view which is capable of displaying multiple 2D slices of the 3D overlays conatined in anOverlayList. ALightBoxPanellooks something like the following:
The
LightBoxPaneluses aLightBoxCanvaspanel to display the slices, and aLightBoxOptsinstance to manage the display settings. The canvas is accessed through thegetCanvas()andgetGLCanvases()methods, and theLightBoxOptsinstanace can be retrieved via theCanvasPanel.sceneOpts()property.The
LightBoxPaneladds the following actions to those already provided by theCanvasPanel:Shows/hides a
LightBoxToolBar.-
__init__(parent, overlayList, displayCtx, frame)[source]¶ Create a
LightBoxPanel.- Parameters
parent – A
wxparent object.overlayList – A
OverlayListinstance.displayCtx – A
DisplayContextinstance.frame – The
FSLeyesFrameinstance.
-
destroy()[source]¶ Must be called when this
LightBoxPanelis closed.Removes property listeners, destroys the
LightBoxCanvas, and callsCanvasPanel.destroy().
-
toggleLightBoxToolBar()[source]¶ Shows/hides a
LightBoxToolBar. SeeViewPanel.togglePanel().
-
getActions()[source]¶ Overrides
ActionProvider.getActions(). Returns all of theactionsthat are defined on thisLightBoxPanel.
-
getGLCanvases()[source]¶ Returns a list containing the
LightBoxCanvascontained within thisLightBoxPanel.
-
getCanvas()[source]¶ Returns a reference to the
LightBoxCanvasinstance.
-
centrePanelLayout()[source]¶ Overrides
CanvasPanel.centrePanelLayout(). Adds the scrollbar to the centre panel.
-
_LightBoxPanel__ncolsChanged(*a)¶ Called when the
LightBoxOpts.ncolsproperty changes. Calculates the number of rows to display, and updates the scrollbar.
-
_LightBoxPanel__onLightBoxChange(*a)¶ Called when any
LightBoxOptsproperty changes.Updates the scrollbar to reflect the change.
-
_LightBoxPanel__onResize(ev=None)¶ Called when the panel is resized. Automatically adjusts the number of rows to the maximum displayable number (given that the number of columns is fixed).
-
_LightBoxPanel__onScroll(*a)¶ Called when the scrollbar is moved.
Updates the top row displayed on the
LightBoxCanvas.
-
_LightBoxPanel__onZoom(*a)¶ Called when the
SceneOpts.zoomproperty changes. Updates the number of slice columns shown.
-
_LightBoxPanel__radioOrientationChanged(*a)¶ Called when the
DisplayContext.displaySpaceorDisplayContext.radioOrientationproperties change. Updates theLightBoxCanvas.invertXproperty as needed.
-
_LightBoxPanel__selectedOverlayChanged(*a)¶ Called when the
DisplayContext.selectedOverlaychanges.If the currently selected overlay is a
Niftiinstance, or has an associated reference image (seeDisplayOpts.referenceImage()), a listener is registered on the reference imageNiftiOpts.transformproperty, so that the__transformChanged()method will be called when it changes.
-
_LightBoxPanel__transformChanged(*a)¶ Called when the
NiftiOpts.transformproperty for the reference image of the currently selected overlay changes.Updates the
LightBoxOpts.sliceSpacingandLightBoxOpts.zrangeproperties to values sensible to the new overlay display space.
-
__module__= 'fsleyes.views.lightboxpanel'¶
-