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.Action

The BrowseXNATAction allows the user to open files from an XNAT repository. It opens a XNATBrowser`, and adds the files that the user selected into the OverlayList.

__init__(overlayList, displayCtx, frame)

Create a BrowseXNATAction.

Parameters
_BrowseXNATAction__openBrowser()

Opens a XNATBrowser, then adds any files that the user selected to the OverlayList.

__module__ = 'fsleyes.actions.browsexnat'
class fsleyes.actions.browsexnat.XNATBrowser(parent, knownHosts=None, knownAccounts=None)

Bases: __main__.MockClass

The XNATBrowser contains a wxnat.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 the GetPaths() method.

__init__(parent, knownHosts=None, knownAccounts=None)

Create a XNATBrowser.

Parameters
  • parentwx parent object

  • knownHosts – List of hosts to use as auto-complete options

  • knownAccounts – Mapping containing login credentials, in the { host : (username, password) }.

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'