fsleyes.plugins.controls.atlaspanel.atlasinfopanel¶
This module provides the AtlasInfoPanel, which is a sub-panel
that is used by the AtlasPanel.
-
class
fsleyes.plugins.controls.atlaspanel.atlasinfopanel.AtlasInfoPanel(parent, overlayList, displayCtx, atlasPanel)[source]¶ 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, atlasPanel)[source]¶ Create an
AtlasInfoPanel.- Parameters
parent – the
wxparent object.overlayList – The
OverlayListinstance.displayCtx – The
DisplayContextinstance.atlasPanel – The
AtlasPanelinstance that has created thisAtlasInfoPanel.
-
destroy()[source]¶ Must be called when this
AtlasInfoPanelis 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
atlasesmodule for details on atlas IDs).If
refreshisTrue(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.fsldirchanges. 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 thewxidle loop.
-
__locationChanged(*a)¶ Called when the
DisplayContext.locationproperty 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
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.plugins.controls.atlaspanel.atlasinfopanel'¶
-
class
fsleyes.plugins.controls.atlaspanel.atlasinfopanel.AtlasListWidget(parent, listIdx, atlasInfoPanel, atlasID, enabled=False)[source]¶ Bases:
__main__.docbuilder.run.<locals>.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)[source]¶ 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).
-
__onEnable(ev)¶ Called when this
AtlasListWidgetis clicked. Toggles information display for the atlas associated with this widget.
-
__module__= 'fsleyes.plugins.controls.atlaspanel.atlasinfopanel'¶
-