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.
-
_BrowseXNATAction__openBrowser()¶ Opens a
XNATBrowser, then adds any files that the user selected to theOverlayList.
-
__module__= 'fsleyes.actions.browsexnat'¶
-
-
class
fsleyes.actions.browsexnat.XNATBrowser(parent, knownHosts=None, knownAccounts=None)[source]¶ Bases:
__main__.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. Once the files have been downloaded, their paths can be retrieved via theGetPaths()method.-
__init__(parent, knownHosts=None, knownAccounts=None)[source]¶ Create a
XNATBrowser.- Parameters
parent –
wxparent objectknownHosts – List of hosts to use as auto-complete options
knownAccounts – Mapping containing login credentials, in the
{ host : (username, password) }.
-
_XNATBrowser__onCancel(ev)¶ Called when the Cancel button is pushed. Closes the dialog.
-
_XNATBrowser__onOk(ev)¶ Called when the Ok button is pushed. Prompts the user to select a directory, and then downloads the files.
-
__module__= 'fsleyes.actions.browsexnat'¶
-