Raw Data

The first step in any image analysis pipeline is actually acquiring the data. After data is acquired at the scanner, it is pushed to a server called CBIHome.

You can read more about this process via the linked PowerPoint made by the CBI.

1. Downloading scan data from CBIHome

  • Open Filezilla (or the FTP software of your choice)

  • Enter the address to CBIHome (sftp://cbihome.musc.edu), as well as your NetID and password

  • Navigate to the top level directory, then to MRData, then to your PI's folder, then to the study folder of your choice

  • Download scans of your choice

    • Note that you can set the output destination for your downloads - set this to the folder on your desktop in which you will organize your newly downloaded data

2. Unzipping dicom folders

cd [filezilla download directory]
find . -type f -name '*.zip' -exec unzip {} \;

3. Sorting dicoms by sequence type

In order to access dicoms in a manageable way, they need to be sorted. This is done by looking at dicom meta data and sorting each dicom file based on a piece of meta data. There are many tools that allow a user to do this, such as simple-dicom-sort ( see https://bridge-lab.gitbook.io/docs/general/onboarding/research-specialist-training#id-5.-workspace-setup for more details).

Our study dicoms are typically sorted by series/sequence name - the name of the type of scan to which the dicoms belong. Below is the simple-dicom-sort command to sort a set of dicoms. This can be placed into a for-loop in bash to sort many subjects' dicoms at once.

dicom_sort [input] [output] %SeriesName%

4. Converting dicoms to nifti format

Similar to dicom sort, dicom conversion is done by matching dicoms based on meta data and then converting dicom sets into a single nifti file. The go-to tool for this task is dcm2niix, a tool that is packaged along with MRIcron ( see https://bridge-lab.gitbook.io/docs/general/onboarding/research-specialist-training#id-5.-workspace-setup for more details).

dcm2niix -o [output folder] -f %p [input folder]

5. Sorting niftis

For ease of access and use, we also organize our nifti files. These are typically organized into three main folders - dwi, anat, other - as well as folders with sequences specific to each study (eg. fmri, vista, etc).

dwi - all diffusion data (DTI, DKI, FBI, etc)

anat - all structural data (T1, T2, etc)

other - all headcoil and extraneous data generated by the scanner as accessory to other scans

How you decide to sort niftis will vary by study. However, generally niftis can easily be sorted in bash with a command similar to:

mv [input path]/T* [output path]/anat
mv [input path]/D* [output path]/dwi

These examples use wildcards (*) to select all files that begin with T or D to move to the anat or dwi folders respectively.

Last updated