# Downloading Data

## Summary of tools and methods to download your data

| Method/Tool                            | Recommended Usage                                                                                                               | Requirements                                                                                                                                                                                                       |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Download via UI                        | Downloading DICOM data that is not super large and when pausing, resuming is not needed.                                        | Browser (campus network)                                                                                                                                                                                           |
| Download via XNAT Desktop Client       | Download DICOM data with greater granularity and for large number of participants. Pausing, resuming and reporting is available | App installed. Doesn't work in OSCAR                                                                                                                                                                               |
| Download via xnat-tools python package | Programmatic download. Great for batch uploads and for combining with **BIDS conversion**                                       | Installation of xnat-tools python package. This can be done from local computer or Oscar as explained in the [XNAT2BIDS section](https://docs.ccv.brown.edu/bnc-user-manual/xnat-to-bids-intro/xnat2bids-software) |

## 1. Download via Web UI&#x20;

This is the **simplest but slowest** way to download data. If you'll be downloading multiple imaging sessions, you may want to refer to other options below

### 1.1 Navigate to your MR Data Session

![MR session list for a given participant](https://4276957606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtSg7ZEM6EHbi9iE84a%2Fuploads%2F4i20Lg4StIKLAfKUaPYd%2Fimage.png?alt=media\&token=98d08bb2-de5f-4229-b655-737f71726c45)

### 1.2 Download ONE sequence

If you only need to download one sequence, you can use the download button on the corresponding row

![Highlighting download button for a single sequence](https://4276957606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtSg7ZEM6EHbi9iE84a%2Fuploads%2FNazpNFiTawZo7jbVoIwl%2Fimage.png?alt=media\&token=187ca631-1ea5-404f-b3f6-6f419ca0917e)

### 1.3 Download ALL sequences

You have multiple options here

#### 1.3.1 Select ALL and use the download bulk action

Depending on the size of your data, this may take a while

![Highlighting SELECT ALL and BULK DOWNLOAD BUTTONS](https://4276957606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtSg7ZEM6EHbi9iE84a%2Fuploads%2Fi8QPKm04ZPnCAk97pm9P%2Fimage.png?alt=media\&token=bd889628-aae5-41fb-8e8c-a2f590c35335)

### 1.4 Download with granularity

If you wish to have greater granularity on the types of resources downloaded you can use the menu under **Actions -> Download -> Images.**&#x20;

![Highlighting the Actions -> Download menu to access detailed downloading options](https://4276957606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LtSg7ZEM6EHbi9iE84a%2Fuploads%2Fg8z0xCwjN4jJvO9wZPEI%2Fimage.png?alt=media\&token=47ac5d20-bbf3-44e6-bc1e-73f19f601745)

## 2. Downloading via XNAT Desktop Client

The [XNAT Desktop Client](https://wiki.xnat.org/xnat-tools/xnat-desktop-client-dxm) is a convenient way to upload and download data to XNAT. Unfortunately, at this time, the application doesn't work in Oscar, but if you are downloading data to your personal computer, you may want to give it a try.

The [documentation](https://wiki.xnat.org/xnat-tools/xnat-desktop-client-dxm) for the Desktop Client is quite detailed, so we won't repeat the steps here.

## 3. Download data programmatically

We maintain a python package [xnat-tools](https://github.com/brown-bnc/xnat-tools) that facilitates downloading your data and converting it to BIDS. The optimal way to install and run the code depends on your computation environment. The package [documentation](https://brown-bnc.github.io/xnat-tools/) explains different installation and execution methods for a general user.&#x20;

If you do not need BIDS, you'll only need the [xnat-dicom-export](https://brown-bnc.github.io/xnat-tools/1.0.6/dicom_export/) utility. If you will be downloading and converting to BIDS, then please follow the instructions in the [XNAT TO BIDS](https://docs.ccv.brown.edu/bnc-user-manual/xnat-to-bids-intro) section.
