fsleyes.controls.atlasinfopanel

This module provides the AtlasInfoPanel, which is a sub-panel that is used by the AtlasPanel.

class fsleyes.controls.atlasinfopanel.AtlasInfoPanel(parent, overlayList, displayCtx, frame, atlasPanel)

Bases: fsleyes.panel.FSLeyesPanel

The AtlasInfoPanel displays region information about the current DisplayContext.location from a set of atlases chosen by the user.

An AtlasInfoPanel looks something like this:

_images/atlasinfopanel.png

The AtlasInfoPanel contains two main sections:

  • A fsleyes_widgets.elistbox.EditableListBox filled with AtlasListWidget controls, one for each available atlas. The user is able to choose which atlases to show information for.
  • A wx.html.HtmlWindow which contains information for each selected atlas. The information contains hyperlinks for each atlas, and each region which, when clicked, toggles on/off relevant atlas overlays (see the AtlasPanel.toggleOverlay() method).
__init__(parent, overlayList, displayCtx, frame, atlasPanel)

Create an AtlasInfoPanel.

Parameters:
destroy()

Must be called when this AtlasInfoPanel is to be destroyed. De-registers various property listeners and calls FSLeyesPanel.destroy().

enableAtlasInfo(atlasID, refresh=True)

Enables information display for the atlas with the specified ID (see the atlases module for details on atlas IDs).

If refresh is True (the default), the HTML information panel is updated.

disableAtlasInfo(atlasID)

Disables information display for the atlas with the specified ID.

_AtlasInfoPanel__atlasAdded(registry, topic, atlasDesc)

Called when a new atlas is added to the AtlasRegistry. Re-generates the atlas list.

_AtlasInfoPanel__atlasRemoved(registry, topic, atlasDesc)

Called when an atlas is removed from the AtlasRegistry. Re-generates the atlas list.

_AtlasInfoPanel__buildAtlasList()

Clears and then builds the list of available atlases. The This is performed asynchronously, via the idle.run() function, although the atlas list widget is updated on the wx idle loop.

_AtlasInfoPanel__fslDirChanged(*a)

Called when the Platform.fsldir changes. Refreshes the atlas list.

_AtlasInfoPanel__infoPanelLinkClicked(ev)

Called when a hyperlink is clicked in the HTML window. Toggles the respective atlas overlay - see the AtlasPanel.toggleOverlay() method.

_AtlasInfoPanel__locationChanged(*a)

Called when the DisplayContext.location property changes. Updates the information shown in the HTML window.

_AtlasInfoPanel__selectedOverlayChanged(*a)

Called when the OverlayList or the DisplayContext.location changes. Refreshes the displayed atlas information (see __locationChanged()), and adds a listener to the DisplayOpts.bounds property so that, when it changes, the atlas information is refreshed.

__module__ = 'fsleyes.controls.atlasinfopanel'
class fsleyes.controls.atlasinfopanel.AtlasListWidget(parent, listIdx, atlasInfoPanel, atlasID, enabled=False)

Bases: __main__.MockClass

An AtlasListWidget is a wx.CheckBox which is used by the AtlasInfoPanel. An AtlasListWidget is shown alongside each atlas in the atlas list.

Toggling the checkbox will add/remove information for the respective atlas (see AtlasInfoPanel.enableAtlasInfo() and AtlasInfoPanel.disableAtlasInfo()).

__init__(parent, listIdx, atlasInfoPanel, atlasID, enabled=False)

Create an AtlasListWidget.

Parameters:
  • parent – The wx parent object, assumed to be an EditableListBox.
  • listIdx – Index of this AtlasListWidget in the EditableListBox.
  • atlasInfoPanel – the AtlasInfoPanel instance that owns this AtlasListWidget.
  • atlasID – The atlas identifier associated with this AtlasListWidget.
  • enabled – Initial checkbox state (defaults to False).
_AtlasListWidget__onEnable(ev)

Called when this AtlasListWidget is clicked. Toggles information display for the atlas associated with this widget.

__module__ = 'fsleyes.controls.atlasinfopanel'