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)¶ 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)¶ Create a
BrowseXNATAction.Parameters: - overlayList – The
OverlayList. - displayCtx – The
DisplayContext. - frame – The
FSLeyesFrame.
- overlayList – The
-
_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)¶ 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)¶ Create a
XNATBrowser.Parameters: - parent –
wxparent object - knownHosts – List of hosts to use as auto-complete options
- knownAccounts – Mapping containing login credentials, in the
{ host : (username, password) }.
- parent –
-
GetPaths()¶ Returns paths to the files that were downloaded.
-
GetHosts()¶ Wraps
wxnat.XNATBrowserPanel.GetHosts.
-
GetAccounts()¶ Wraps
wxnat.XNATBrowserPanel.GetAccounts.
-
_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'¶
-