top | previous

Data Conversion

In this exercise, an image from a scanner, in DICOM format, will be converted into mgz format, using recon-all.

You first want to make sure you are working in the appropriate directory and that you have set your SUBJECTS_DIR variable correctly. You can do this by entering the following directory:

cd $TUTORIAL_DATA/buckner_data/tutorial_subjs

Set the current directory to be the default subjects directory using this command:

export SUBJECTS_DIR=$PWD

Two acquisitions of an anonymized volume have been provided for this tutorial with the recognizable face characteristics removed, in the directory buckner_data/tutorial_subjs/014-anon and buckner_data/tutorial_subjs/015-anon. Using the recon-all script you can specify both the acquisitions to be converted to mgz format as well as the name you wish to give your subject in the following format:

recon-all -all -i <in volume 1> -i <in volume 2> -s <subject name>

where <in volume 1> is the first file that appears in the first acquisition directory, and <in volume 2> is the first file that appears in the second acquisition directory. For this example we will use anon as our <subject name>. To convert the two anon acquisitions use the command:

recon-all -i 014-anon/001.dcm -i 015-anon/001.dcm -s anon

The output file list can be viewed with the following command:

ls ${SUBJECTS_DIR}/anon/mri/orig

which will show:

001.mgz  002.mgz

View the output of the data conversion with tkmedit:

tkmedit -f ${SUBJECTS_DIR}/anon/mri/orig/001.mgz

The full path to the converted volume is specified with the -f option because a file is being specified explicitly. If tkmedit is called without the -f, it will assume that the data is in ${SUBJECTS_DIR}/<subject name>/mri, where <subject name> is the first argument on the tkmedit command line (anon in the example below).

You can motion correct your two acquisitions using the -motioncor option of recon-all like this:

recon-all -motioncor -s anon

Once motion correction has been performed using 001.mgz and 002.mgz, the volume ${SUBJECTS_DIR}/anon/mri/orig.mgz has been produced, tkmedit will be able to find that volume using the subject directory and the volume name:

tkmedit anon orig.mgz

FsTutorial/Conversion (last edited 2015-09-29 13:40:14 by LeeTirrell)