How to use the XNAT platform for accessing and downloading MRI and MEG scan data
WIN hosts an internal imaging system using the open-source XNAT platform. This platform will be used to store the majority of raw MRI and MEG scans that take place within WIN.
Note: MRI scanners are not yet setup for this system, please see the Uploading Data tab for details of the status of each scanner.
You will need to be on a university network to access the site, and it can then be accessed here: xnat.win.ox.ac.uk. To login to XNAT you will need to have a valid WIN Computing account, you can use these details to authenticate. You will initially be presented with a register page, once you click register you will be logged into the site.
How to access data in XNAT
MEG and MRI Projects in Calpendo will be mirrored in XNAT (provided data from the project has been uploaded to XNAT). The system will attempt to assign a PI, project owner, and project users to the XNAT project based on the details it finds in Calpendo. This sync happens twice a day, so any changes made in Calpendo should be reflected in XNAT within 12 hours. Provided you are listed in Calpendo as a user of a project, you should have access to all that projects’ data in XNAT.
Finding your data in XNAT
From the XNAT homepage, on the left you will see a list of projects you have access to. On the right, you will see an activity feed for recently uploaded or modified data you have access to, with quick links to take you directly to them (Image 1). Clicking on a project name will take you to the project page.
Image 1: XNAT Homepage example
On a project page you will see metadata for the project taken from Calpendo, along with a list of subjects (Image 2). Clicking on a subject name will take you to that subjects’ page.
Image 2: XNAT Project page example
On a subject page you will see a list of all imaging sessions for that subject (Image 3). You will see a mix of the terms “Experiment” and “Session”, in XNAT they are interchangeable. Clicking on an experiment will take you to that experiments’ page.
Image 3: XNAT Subject page example
On an experiment page you will see a list of the individual scans in the session, with descriptions and file counts.
Image 4: XNAT Session page example
How to download data from XNAT
Browser Data Retrieval
On any project, subject, or experiment page you can use the Download > Download Images button found in the Actions menu on the top right of the page (Image 5).
Image 5: Download Images
This will take you to the "Imaging Data Download" page where you can customise the data you want to download. The first two columns allow you to select what data will be downloaded (Image 6).
Image 6: Imaging Data Download Page (Project Level)
If you access this page from the project level, you will have access to all subjects within the project, and all their experiments (Image 6). If you access it from a subject page, you will have access to all experiments for that subject. If you load it from an experiment page, you will only have access to that experiments’ data (Image 7).
Image 7: Imaging Data Download Page (Experiment Level)
There are multiple ways you can download your data from this page, you should use either:
- Download via Desktop Client – This requires the XNAT Desktop Client to be installed (it is best suited for Windows and Mac devices – see the install guide for details).
- ZIP download – Your selected data will be downloaded via the browser in a .zip file.
Once you have selected the data you want, and the method you want to use to download it, you can click the Submit button to start the process (Image 7).
Alternative Download Method
On an experiment page scans can also be selected for downloading. Check the boxes to the left of the scan ID's to select what to include, and then use the Download button above them to start a .zip download (Image 8).
Image 8: Experiment page downloading
Programmatic Data Retrieval
Downloading data is also supported via the command line. We recommend the XNATpy python library for this approach. For examples of how you might do this, see the XNATpy tutorials.
For further documentation and guides relating to downloading data from XNAT, please refer to the Resources tab above.
How to upload data to XNAT
Automatic Data Uploads
The majority of raw MRI and MEG data will be automatically uploaded to the XNAT platform after the scans are completed, using systems we have developed for individual scanners. In most cases, data will be available in XNAT within 1-2 hours after the scanning has completed.
The status of these systems can be seen below:
- OHBA MEG - Active, running for all projects
- OHBA 3T - Active, running for a limited number of projects
- FMRIB 3T - Not active, in development
- FMRIB 7T - Not active, in development
- BSB 7T Small Mammal - Not active, in development
If you have DICOM data to upload not already in XNAT, you can upload via the Desktop Client – This requires the XNAT Desktop Client to be installed (it is best suited for Windows and Mac devices – see the install guide for details).
Alternatively you can upload DICOM data from the XNAT homepage, from the top menu use Upload > Images > Compressed Uploader. This will allow you to upload a .zip or .tar file to XNAT containing DICOM data. You will be asked if you want to upload to the Pre-Archive or the Archive, if you are unsure then please read Using the Prearchive first.
Non DICOM Uploading
For any data not exclusively in DICOM format, it's easiest to use a script approach to upload to XNAT. We recommend the XNATpy python library for this approach. For examples of how you might do this, see the XNATpy tutorial
For further documentation and guides relating to uploading data to XNAT, please refer to the Resources tab above.
Useful links and resources to help use XNAT
How To Use XNAT - Official XNAT documentation and guides
Downloading from XNAT - Official downloading guides
Uploading to XNAT - Official uploading guides
XNATpy - The recommended XNAT Python client
Understanding User Roles and Permissions
It is important to understand the default roles within XNAT, and what each role offers a user. See Understanding User Roles and Permissions for details.
Understanding the XNAT Data Model
See the image below for a diagram explaining the XNAT Data Model. For further details, see Understanding the XNAT Data Model.
XNAT troubleshooting help
Unable to login to XNAT
You should use your WIN Computing account username and password to login to XNAT. If you are having problems, you can check your Computing account username and reset your password on the WIN Registration Page.
Missing XNAT projects
If you log into XNAT and don't see your expected project(s) on the homepage, you need to check your current XNAT email address. You can do this by clicking on your username at the top right of the page, from any XNAT screen (just above the search bar in the top right of the screen). This page will show you your current email address used in XNAT. You need to check this matches the one you use in Calpendo in order for your project access in XNAT to be granted. If this does not match, you can change your XNAT email address on this page.
Unexpected folders in downloaded .zip files
Due to the way XNAT's data model is configured (see the Resources tab for details), you may find unexpected folders in your .zip files when downloading data via the browser. While this can't be completely disabled when downloading via the browser, provided you use the Imaging Data Download page (see the Downloading Data tab for details) and make sure "Simplify downloaded archive structure" is enabled above the Submit button, this will reduce the number of them. If you write your own script to download data, this can be avoided completely.