fsleyes.views.lightboxpanel

This module provides the LightBoxPanel, which displays multiple 2D slices of 3D overlays.

class fsleyes.views.lightboxpanel.LightBoxPanel(*args, **kwargs)[source]

Bases: CanvasPanel

The LightBoxPanel is a FSLeyes view which is capable of displaying multiple 2D slices of the 3D overlays conatined in an OverlayList. A LightBoxPanel looks something like the following:

_images/lightboxpanel.png

The LightBoxPanel uses a LightBoxCanvas panel to display the slices, and a LightBoxOpts instance to manage the display settings. The canvas is accessed through the getCanvas() and getGLCanvases() methods, and the LightBoxOpts instanace can be retrieved via the CanvasPanel.sceneOpts() property.

The LightBoxPanel adds scrolling capability to the LightBoxCanvas - a scroll bar is displayed which can be used to scroll through the slices. This is achieved by adjusting the LightBoxCanvasOpts.zrange 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:
destroy()[source]

Must be called when this LightBoxPanel is closed.

Removes property listeners, destroys the LightBoxCanvas, and calls CanvasPanel.destroy().

getActions()[source]

Overrides ActionProvider.getActions(). Returns all of the actions that are defined on this LightBoxPanel.

getGLCanvases()[source]

Returns a list containing the LightBoxCanvas contained within this LightBoxPanel.

getCanvas()[source]

Returns a reference to the LightBoxCanvas instance.

property canvas

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 or DisplayContext.radioOrientation properties change. Updates the LightBoxCanvas.invertX property as needed.

__onLightBoxChange(*a)

Called when any LightBoxOpts property changes.

Updates the scrollbar to reflect the current number of slices being displayed.

__onScroll(*a)

Called when the scrollbar is moved.

Updates the Z range displayed on the LightBoxCanvas.

__annotations__ = {}
__module__ = 'fsleyes.views.lightboxpanel'
property scrollpos

Returns the current scroll position - the index of the first displayed row on the canvas.