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.Action
The
BrowseXNATAction
allows 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
.
- __annotations__ = {}¶
- __module__ = 'fsleyes.actions.browsexnat'¶
- class fsleyes.actions.browsexnat.XNATBrowser(parent, knownHosts=None, knownAccounts=None)[source]¶
Bases:
__main__.docbuilder.run.<locals>.MockClass
The
XNATBrowser
contains 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 –
wx
parent objectknownHosts – List of hosts to use as auto-complete options
knownAccounts – Mapping containing login credentials, in the
{ host : (username, password) }
.
- __onOk(ev)¶
Called when the Ok button is pushed. Prompts the user to select a directory, and then downloads the files.
- __onCancel(ev)¶
Called when the Cancel button is pushed. Closes the dialog.
- __annotations__ = {}¶
- __module__ = 'fsleyes.actions.browsexnat'¶