For the complete documentation index, see llms.txt. This page is also available as Markdown.

Uploading raw spectroscopy data

How to use our custom webapp to upload your MRS data to XNAT

When you collect MR spectroscopy data at the scanner and send your data to XNAT, the DICOM-formatted version gets automatically transferred along with the rest of your DICOMs.

We have developed a simple webapp (available on github) that allows you to upload your raw spectroscopy data as well (.rda and .dat files), and it will automatically attach them to their matching DICOM(s). Then, when you run the xnat2bids conversion, the raw spectroscopy data will be exported as well and placed in the sourcedata subdirectory of your BIDS directory.

Follow these steps to get your raw MRS data to XNAT

  1. On the transfer computer in the MRF waiting room, log in to XNAT and verify that your new data has appeared in your project (this usually takes ~10 mins from the time the data was sent from the scanner, but it depends on the size of your dataset).

  2. Once your DICOMs are on XNAT, launch the XNAT Spectroscopy Uploader from the desktop.

    XNAT spectroscopy uploader icon on the desktop of the transfer Mac. Icon has a blue-green gradient with a white spectroscopy trace and an arrow pointing up, with the text "XNAT Spectro Uploader"
  3. The uploader login page will open in a new Chrome window. Enter your XNAT login credentials and click Log In.

    Login page for the spectroscopy uploader. "Quit" button in upper right corner, with fields for "Username" and "Password" below. Blue Log In button below that.
  4. After successful authentication, you'll see the uploader. Click the "Select .rda and/or .dat files" button to choose the raw data files you'd like to upload.

    Spectroscopy uploader without any data loaded. A "Select .rda and/or .dat files" button at the top says "No files loaded". Below is a tip "RDA file headers are used to automatically determine Project, Subject, Session & Scan. TWIX (.dat) files inherit this information only when matching is unambiguous. If this fails, you will need to manually enter it prior to uploading." Below is an empty table with column headers "Filename", "Scan ID", "Series Description", "Project", "Subject", "Session", "Remove", "Upload Error". At the bottom are "Preview XNAT Session(s)" and "Upload" buttons
    Raw spectroscopy data XNAT uploader without any data loaded
    Mac file selection dialogue, showing selection of 4 files from the "scannershare" drive, two .dat and two .rdas
    Selecting raw .dat and .rda files from scannershare
  5. Your selected files will populate the table. RDA files contain all the information needed to determine where they belong on XNAT, but .dat files do not. If you upload your .rda and .dat files together, the uploader will try to match .dat files with their respective .rda(s) and, if successful, the .dat will inherit the same metadata. If necessary, you can fill in any missing information manually, or correct anything that is incorrect (i.e. your scan was mistakenly registered as a different study during scanning, so you need to correct the project name). If you want to double-check where your data will land, you can click the "Preview on XNAT" button.

    Raw data uploader with the two rda and two dat files now listed in the table, with "Scan ID", "Series Description", "Project", "Subject", and "Session" determined automatically. Red Xs are visible in the "remove" column.
    Raw data ready for upload, with metadata automatically determined from the files
  6. When you are satisfied that everything looks correct, click "Upload".

    View of the uploading screen, with a spinner and "Uploading..." in the center
  7. If successful, you will see the message "Upload complete: X file(s) uploaded", and XNAT will open in a new Chrome tab. Here, you can check that your raw data files have ended up where you expect. If you hover over the rightmost column, you can see that two raw data files were attached to our mrs-mrsref_acq-PRESS_voi-Lacc DICOM in an MRS folder (the DICOM is in a secondary folder). If you want to view the names of the files attached to each DICOM, you can click "Manage Files" in the Actions section at the top of the page.

    View of the two spectroscopy DICOMs in XNAT, with a yellow box on the right that says MRS: 121.6MB in 2 files
    XNAT actions menu on the left, with the File Manager view on the right. Series 16 - 24 are listed, with the MRS folder of series 24 expanded to show the two uploaded raw MRS files
  8. If your upload encounters errors (maybe you incorrectly changed the project name), you can hover over the "upload failed" message for more details, correct the metadata in the table, and click Upload to try again.

    View of the spectroscopy upload table with "upload failed" for each of the four data files. The message "XNAT could not find the specified project/subject/session scan. Please check the values in the table and try again." is visible.
  9. Click Quit when you are done.

Last updated

Was this helpful?