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.CanvasPanel
The
LightBoxPanel
is a FSLeyes view which is capable of displaying multiple 2D slices of the 3D overlays conatined in anOverlayList
. ALightBoxPanel
looks something like the following:The
LightBoxPanel
uses aLightBoxCanvas
panel to display the slices, and aLightBoxOpts
instance to manage the display settings. The canvas is accessed through thegetCanvas()
andgetGLCanvases()
methods, and theLightBoxOpts
instanace can be retrieved via theCanvasPanel.sceneOpts()
property.-
static
defaultLayout
()[source]¶ Returns a list of control panel types to be added for the default lightbox panel layout.
-
static
controlOrder
()[source]¶ Returns a list of control panel names, specifying the order in which they should appear in the FSLeyes ortho panel settings menu.
-
__init__
(parent, overlayList, displayCtx, frame)[source]¶ Create a
LightBoxPanel
.- Parameters
parent – A
wx
parent object.overlayList – A
OverlayList
instance.displayCtx – A
DisplayContext
instance.frame – The
FSLeyesFrame
instance.
-
destroy
()[source]¶ Must be called when this
LightBoxPanel
is closed.Removes property listeners, destroys the
LightBoxCanvas
, and callsCanvasPanel.destroy()
.
-
getActions
()[source]¶ Overrides
ActionProvider.getActions()
. Returns all of theactions
that are defined on thisLightBoxPanel
.
-
getGLCanvases
()[source]¶ Returns a list containing the
LightBoxCanvas
contained within thisLightBoxPanel
.
-
getCanvas
()[source]¶ Returns a reference to the
LightBoxCanvas
instance.
-
centrePanelLayout
()[source]¶ Overrides
CanvasPanel.centrePanelLayout()
. Adds the scrollbar to the centre panel.
-
__radioOrientationChanged
(*a)¶ Called when the
DisplayContext.displaySpace
orDisplayContext.radioOrientation
properties change. Updates theLightBoxCanvas.invertX
property as needed.
-
__selectedOverlayChanged
(*a)¶ Called when the
DisplayContext.selectedOverlay
changes.If the currently selected overlay is a
Nifti
instance, or has an associated reference image (seeDisplayOpts.referenceImage()
), a listener is registered on the reference imageNiftiOpts.transform
property, so that the__transformChanged()
method will be called when it changes.
-
__transformChanged
(*a)¶ Called when the
NiftiOpts.transform
property for the reference image of the currently selected overlay changes.Updates the
LightBoxOpts.sliceSpacing
andLightBoxOpts.zrange
properties to values sensible to the new overlay display space.
-
__onZoom
(*a)¶ Called when the
SceneOpts.zoom
property changes. Updates the number of slice columns shown.
-
__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).
-
__ncolsChanged
(*a)¶ Called when the
LightBoxOpts.ncols
property changes. Calculates the number of rows to display, and updates the scrollbar.
-
__onLightBoxChange
(*a)¶ Called when any
LightBoxOpts
property changes.Updates the scrollbar to reflect the change.
-
__onScroll
(*a)¶ Called when the scrollbar is moved.
Updates the top row displayed on the
LightBoxCanvas
.
-
__module__
= 'fsleyes.views.lightboxpanel'¶
-
static