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)[source]¶ Bases:
fsleyes.panel.FSLeyesPanel
The
AtlasInfoPanel
displays region information about the currentDisplayContext.location
from a set ofatlases
chosen by the user.An
AtlasInfoPanel
looks something like this:The
AtlasInfoPanel
contains two main sections:A
fsleyes_widgets.elistbox.EditableListBox
filled withAtlasListWidget
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 theAtlasPanel.toggleOverlay()
method).
-
__init__
(parent, overlayList, displayCtx, frame, atlasPanel)[source]¶ Create an
AtlasInfoPanel
.- Parameters
parent – the
wx
parent object.overlayList – The
OverlayList
instance.displayCtx – The
DisplayContext
instance.frame – The
FSLeyesFrame
instance.atlasPanel – The
AtlasPanel
instance that has created thisAtlasInfoPanel
.
-
destroy
()[source]¶ Must be called when this
AtlasInfoPanel
is to be destroyed. De-registers various property listeners and callsFSLeyesPanel.destroy()
.
-
enableAtlasInfo
(atlasID, refresh=True)[source]¶ Enables information display for the atlas with the specified ID (see the
atlases
module for details on atlas IDs).If
refresh
isTrue
(the default), the HTML information panel is updated.
-
disableAtlasInfo
(atlasID)[source]¶ Disables information display for the atlas with the specified ID.
-
__fslDirChanged
(*a)¶ Called when the
Platform.fsldir
changes. Refreshes the atlas list.
-
__atlasAdded
(registry, topic, atlasDesc)¶ Called when a new atlas is added to the
AtlasRegistry
. Re-generates the atlas list.
-
__atlasRemoved
(registry, topic, atlasDesc)¶ Called when an atlas is removed from the
AtlasRegistry
. Re-generates the atlas list.
-
__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 thewx
idle loop.
-
__locationChanged
(*a)¶ Called when the
DisplayContext.location
property changes. Updates the information shown in the HTML window.
-
__infoPanelLinkClicked
(ev)¶ Called when a hyperlink is clicked in the HTML window. Toggles the respective atlas overlay - see the
AtlasPanel.toggleOverlay()
method.
-
__selectedOverlayChanged
(*a)¶ Called when the
OverlayList
or theDisplayContext.location
changes. Refreshes the displayed atlas information (see__locationChanged()
), and adds a listener to theDisplayOpts.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)[source]¶ Bases:
__main__.docbuilder.run.<locals>.MockClass
An
AtlasListWidget
is awx.CheckBox
which is used by theAtlasInfoPanel
. AnAtlasListWidget
is shown alongside each atlas in the atlas list.Toggling the checkbox will add/remove information for the respective atlas (see
AtlasInfoPanel.enableAtlasInfo()
andAtlasInfoPanel.disableAtlasInfo()
).-
__init__
(parent, listIdx, atlasInfoPanel, atlasID, enabled=False)[source]¶ Create an
AtlasListWidget
.- Parameters
parent – The
wx
parent object, assumed to be anEditableListBox
.listIdx – Index of this
AtlasListWidget
in theEditableListBox
.atlasInfoPanel – the
AtlasInfoPanel
instance that owns thisAtlasListWidget
.atlasID – The atlas identifier associated with this
AtlasListWidget
.enabled – Initial checkbox state (defaults to False).
-
__onEnable
(ev)¶ Called when this
AtlasListWidget
is clicked. Toggles information display for the atlas associated with this widget.
-
__module__
= 'fsleyes.controls.atlasinfopanel'¶
-