XNAT Browser for CAWorks

The XNAT Browser for CAWorks can download a file from XNAT and open the file in CAWorks. The XNAT Browser also can save data from CAWorks to a file in XNAT. The XNAT Browser handles CAWorks-style multiblock files. The XNAT Browser enables the user to view the projects, subjects, sessions and their files stored in XNAT. The XNAT Browser is implemented as a plugin to CAWorks. The XNAT Browser plugin is automatically loaded when CAWorks starts.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_5.png

The XNAT Browser is usually positioned on the right side of the CAWorks window. However, the XNAT Browser is a dockable window. The XNAT Browser can be torn off as its own floating window by clicking on the double rectangle icon button in its upper right corner. The XNAT Browser can be hidden by clicking on the x icon button in its upper right corner. If the XNAT Browser is not visible, open the View menu item in the CAWorks menu bar and click on the XNAT Browser menu item to make it visible.

XNAT Data Hierarchy

The chart below shows how data sets are organized in XNAT and displayed in the XNAT Browser. The XNAT Browser displays the word XNAT at the top of the hierarchy. The words Scan and Reconstruction are shown in their appropriate places in the hierarchy. The types in angle brackets are replaced by identifiers. For example, <Project> is replaced by BAYV13MAY in the XNAT Browser screenshot above. Hovering the mouse pointer over an identifier displays the type of the identifier in the XNAT Browser.

The XNAT data hierarchy is organized in the following manner. An XNAT web application contains many projects. Each project defines a collection of data stored in XNAT. Each project is associated with owners or principal investigators, members who have full access to the data, and collaborators who have read-only data access. Each project has a group of subjects, or patients, who participate in the study. An experiment, or session, for each subject represents a set of data on the subject that has been acquired, calibrated and analyzed. For example, an experiment in the CBIS XNAT begins with an MRI brain scan of the subject carried out on a certain date and time. The two categories of data for each subject and experiment are scan and reconstruction. The scan category contains the measurements on the subject. DICOM data sets containing the MRI brain scans are stored within the scan category in the CBIS XNAT. The reconstruction category holds the results from processing and analyzing the data. Each category is subdivided into resources which hold the data files.

XNAT Data Hierarchy        
======================
XNAT                  
  <Project>             
    <Subject>           
      <Experiment>      
        Scan
          <Scan>         
            <Resource>    
              <File>      
        Reconstruction
          <Reconstruction>
            <Resource>    
              <File>      

Main XNAT Browser Functions

The five main functions of the XNAT Browser are activated by means of the five buttons grouped at the top of the XNAT Browser. The functions of these buttons are explained in the following sections. Note that the Login, Set Work Directory, and Help buttons are always enabled, while the Download and Open and Save Data and Upload buttons are only enabled when the user has made the appropriate supporting selections.

Login

Clicking on the Login button in the XNAT Browser displays the Login to XNAT dialog shown below. Enter the URL for an XNAT web application and a valid user name and password. Click the OK button. The XNAT Browser connects to the XNAT web application and shows the word XNAT at the top of the data hierarchy.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_4.png

To switch to a different XNAT web application, simply click on the Login button, enter the new XNAT URL, user name and password in the Login to XNAT dialog, and click the OK button. The XNAT Browser connects to the specified XNAT and again shows the word XNAT at the top of the data hierarchy.

Note that when it pops up, the Login to XNAT dialog displays the XNAT URL and the user name from the last successful connection.

Set Work Directory

Behind the scenes the work directory supports the transfer of files between CAWorks and XNAT. An intermediate step of each file transfer process writes the file to its own subdirectory of the work directory. The name of the current work directory is displayed in the text field to the right of the Set Work Directory button in the XNAT Browser. Click on the Set Work Directory button to display a file browser dialog and change the name of the work directory.

The work directory is initially set to the current directory when the XNAT Browser is first started. Once the work directory name is changed, the XNAT Browser remembers the last name to which the work directory was set.

Download and Open

Clicking on the Download and Open button in the XNAT Browser causes the selected file to be downloaded from XNAT and opened in CAWorks. The Download and Open button is enabled only when a file has been selected in the XNAT data hierarchy, as shown below in the CAWorks window.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_1_1000x700.png

Save Data and Upload

Clicking on the Save Data and Upload button in the XNAT Browser causes the data of a pipeline object in the Pipeline Browser in CAWorks to be written to a file which is uploaded to a resource of a reconstruction in XNAT. The Save Data and Upload button is enabled only when a pipeline object is selected in the CAWorks Pipeline Browser and a resource of a reconstruction is chosen in the XNAT data hierarchy displayed in the XNAT Browser, as shown below in the CAWorks window. Note that the XNAT Browser does not save data and upload files to the resources in scans.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_2_1000x700.png

The dialog shown below is displayed when the Save Data and Upload button is activated. The user must specify a filename and select a file type from the pull-down list. The data of the pipeline object is written to the file and the file is uploaded to XNAT when the user clicks the OK button.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_3.png

Help

Clicking on the Help button in the XNAT Browser pops up a text viewer containing explanatory information similar to the contents of this page.

More XNAT Functions

The XNAT Browser provides additional capabilities for interacting with XNAT that do not also involve CAWorks. Clicking on the plus sign icon box to the left of the phrase More XNAT Functions exposes six buttons. The functions of these buttons are explained in the following sections. Note that the Refresh button is enabled only when the user has logged into an XNAT web application, while the Create New, Delete, Download, Download All and Upload buttons are only enabled when the user has made the appropriate supporting selections in the XNAT data hierarchy.

http://caportal.cis.jhu.edu/wiki/tutorials/xnat_browser_documentation/CAWorks_XnatBrowser_6.png

Refresh

Clicking on the Refresh button refreshes the display of the XNAT data hierarchy in the XNAT Browser. The Refresh button is enabled whenever the user has successfully logged into an XNAT web application.

Create New

Selecting a reconstruction in the XNAT Browser and clicking on the Create New button creates a new resource in the reconstruction. Selecting the reconstruction category and clicking on the Create New button creates a new reconstruction. If an experiment has no reconstruction category and no reconstructions, selecting the experiment and clicking on the Create New button creates a new reconstruction (as well as the reconstruction category). The user specifies the name of the new resource or reconstruction in a popup dialog. The Create New button is enabled only when a reconstruction or the reconstruction category (or an experiment if the experiment has no reconstructions) is the current selection in the XNAT Browser. Note that the XNAT Browser does not create new resources in a scan, or new scans in the scan category.

Delete

Clicking on the Delete button deletes the selected file in a resource for a reconstruction, the selected resource for a reconstruction, or the selected reconstruction. After the Delete button is actuated, a pop up dialog gives the user the option to confirm or cancel the deletion. The selected item is removed only if the user clicks the Yes button in the dialog. When a resource is deleted, all files in the resource are also removed. When a reconstruction is deleted, all resources in the reconstruction are also removed. The Delete button is enabled only when a file in a resource for a reconstruction, a resource for a reconstruction, or a reconstruction is the current selection in the XNAT Browser. Note that the XNAT Browser does not delete files in resources for a scan, resources for a scan, or scans.

Download

Selecting a file in the XNAT Browser and clicking on the Download button brings up a file browser dialog, in which the target directory and the local filename for the file to be downloaded are specified. The Download button is enabled only when a file is the current selection in the XNAT Browser.

Download All

A group of files can be copied from XNAT to the local file system by selecting a resource, scan, reconstruction or category, and clicking on the Download All button. These actions bring up a file browser dialog, in which the target directory for the download is chosen. The Download All button is enabled only when a resource, scan, reconstruction or category is the current selection in the XNAT Browser.

The table below identifies the group of files that is downloaded for each allowed selection in the XNAT data hierarchy.

Selection

Files Downloaded

Scan

All files in all resources for all scans

<Scan>

All files in all resources for selected scan

<Resource>

All files in selected resource of a scan

Reconstruction

All files in all resources for all reconstructions

<Reconstruction>

All files in all resources for selected reconstruction

<Resource>

All files in selected resource of a reconstruction

Upload

Selecting a resource in a reconstruction and clicking on the Upload button brings up a file browser dialog, in which a file can be chosen for upload to XNAT. The Upload button is enabled only when a resource for a reconstruction is the current selection in the XNAT Browser. Note that the XNAT Browser does not upload files to the resources in scans.

A popup menu may be displayed when the user right-clicks on an element of the XNAT data hierarchy in the XNAT Browser. The items in the popup menu are listed for each selection in the following table.

Selection

Popup Menu Items

Scan

Download All

<Scan>

Download All

<Resource>

Download All

<File>

Download, Download and Open

Reconstruction

Download All, Create New

<Reconstruction>

Download All, Create New, Delete

<Resource>

Download All, Upload, Save Data and Upload, Delete

<File>

Download, Download and Open, Delete