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.FSLeyesPanelThe
AtlasInfoPaneldisplays region information about the currentDisplayContext.locationfrom a set ofatlaseschosen by the user.An
AtlasInfoPanellooks something like this:
The
AtlasInfoPanelcontains two main sections:- A
fsleyes_widgets.elistbox.EditableListBoxfilled withAtlasListWidgetcontrols, one for each available atlas. The user is able to choose which atlases to show information for. - A
wx.html.HtmlWindowwhich 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)¶ Create an
AtlasInfoPanel.Parameters: - parent – the
wxparent object. - overlayList – The
OverlayListinstance. - displayCtx – The
DisplayContextinstance. - frame – The
FSLeyesFrameinstance. - atlasPanel – The
AtlasPanelinstance that has created thisAtlasInfoPanel.
- parent – the
-
destroy()¶ Must be called when this
AtlasInfoPanelis to be destroyed. De-registers various property listeners and callsFSLeyesPanel.destroy().
-
enableAtlasInfo(atlasID, refresh=True)¶ Enables information display for the atlas with the specified ID (see the
atlasesmodule for details on atlas IDs).If
refreshisTrue(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 thewxidle loop.
-
_AtlasInfoPanel__fslDirChanged(*a)¶ Called when the
Platform.fsldirchanges. 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.locationproperty changes. Updates the information shown in the HTML window.
-
_AtlasInfoPanel__selectedOverlayChanged(*a)¶ Called when the
OverlayListor theDisplayContext.locationchanges. Refreshes the displayed atlas information (see__locationChanged()), and adds a listener to theDisplayOpts.boundsproperty so that, when it changes, the atlas information is refreshed.
-
__module__= 'fsleyes.controls.atlasinfopanel'¶
- A
-
class
fsleyes.controls.atlasinfopanel.AtlasListWidget(parent, listIdx, atlasInfoPanel, atlasID, enabled=False)¶ Bases:
__main__.MockClassAn
AtlasListWidgetis awx.CheckBoxwhich is used by theAtlasInfoPanel. AnAtlasListWidgetis 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)¶ Create an
AtlasListWidget.Parameters: - parent – The
wxparent object, assumed to be anEditableListBox. - listIdx – Index of this
AtlasListWidgetin theEditableListBox. - atlasInfoPanel – the
AtlasInfoPanelinstance that owns thisAtlasListWidget. - atlasID – The atlas identifier associated with this
AtlasListWidget. - enabled – Initial checkbox state (defaults to False).
- parent – The
-
_AtlasListWidget__onEnable(ev)¶ Called when this
AtlasListWidgetis clicked. Toggles information display for the atlas associated with this widget.
-
__module__= 'fsleyes.controls.atlasinfopanel'¶
-