fsleyes.actions.browsexnat¶
This module provides the BrowseXNATAction, which allows the user
to connect to and browse an XNAT repository. If wxnatpy
(https://github.com/pauldmccarthy/wxnatpy) is not present, the action is
disabled.
-
class
fsleyes.actions.browsexnat.BrowseXNATAction(overlayList, displayCtx, frame)[source]¶ Bases:
fsleyes.actions.base.ActionThe
BrowseXNATActionallows the user to open files from an XNAT repository. It opens aXNATBrowser`, and adds the files that the user selected into theOverlayList.-
__init__(overlayList, displayCtx, frame)[source]¶ Create a
BrowseXNATAction.- Parameters
overlayList – The
OverlayList.displayCtx – The
DisplayContext.frame – The
FSLeyesFrame.
-
__openBrowser()¶ Opens a
XNATBrowser, then adds any files that the user selected to theOverlayList.
-
__module__= 'fsleyes.actions.browsexnat'¶
-
-
class
fsleyes.actions.browsexnat.XNATBrowser(parent, loadFunc=None)[source]¶ Bases:
__main__.docbuilder.run.<locals>.MockClassThe
XNATBrowsercontains awxnat.XNATBrowserPanel, allowing the user to connect to and browse an XNAT repository. It contains a Download button which, when clicked, downloads all selected files from the repository into a temporary directory, and passes the file paths to a provided callback function.-
__init__(parent, loadFunc=None)[source]¶ Create a
XNATBrowser.- Parameters
parent –
wxparent objectloadFunc – Function to call when the user has downloaded some files. Passed a list of files paths.
-
__onHighlight(ev)¶ Called when the item selection in the tree browser is changed. Enables/disables the download button depending on whether any files are highlighted.
-
__onDownload(ev)¶ Called when the Download button is pushed. Prompts the user to select a directory, and then downloads the files.
-
__onClose(ev)¶ Called on EVT_CLOSE events. Destroys this dialog.
-
__onCloseButton(ev)¶ Called when the Close button is pushed. Closes the dialog.
-
__module__= 'fsleyes.actions.browsexnat'¶
-