# 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 of this documentation](/bnc-user-manual/xnat-to-bids-intro/xnat2bids-software.md) |

## 1. Download via Web UI

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

<figure><img src="/files/Adwq1MNSV9EBg99HK32g" alt="A view of the two sessions listed under Demodat2 subject 101 on the XNAT portal"><figcaption><p>MR session list for a given participant</p></figcaption></figure>

### 1.2 Download ONE sequence

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

<figure><img src="/files/UEiseYRVBIXFdpSstrwf" alt="A download button is located to the left of each individual scan name within one session on XNAT."><figcaption><p>Highlighting download button for a single sequence</p></figcaption></figure>

### 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

<figure><img src="/files/cKLoDYp7e9nq3uyfRZpl" alt="To download one entire session of data on XNAT, use the check box to select all runs, and press &#x22;Download&#x22;."><figcaption><p>Highlighting SELECT ALL and BULK DOWNLOAD BUTTONS</p></figcaption></figure>

### 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.**

<figure><img src="/files/A6fgcJDf2ZyaNxSdvb5f" alt="Data can be downloaded on XNAT by selecting one of the options in the &#x22;Download&#x22; tab, nested below &#x22;Actions&#x22;."><figcaption><p>Highlighting the Actions -> Download menu to access detailed downloading options</p></figcaption></figure>

## 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 for the Desktop Client](https://wiki.xnat.org/xnat-tools/xnat-desktop-client-dxm) 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 xnat-tools package documentation](https://brown-bnc.github.io/xnat-tools/) explains different installation and execution methods for a general user.

If you do not need BIDS, you'll only need the [xnat-dicom-export utility](https://brown-bnc.github.io/xnat-tools/1.0.6/dicom_export/). If you will be downloading and converting to BIDS, then please follow the instructions in the [XNAT2BIDS section of this documentation](/bnc-user-manual/xnat-to-bids-intro/getting-started.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ccv.brown.edu/bnc-user-manual/xnat/downloading-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
