[[FsTutorial|top]] | [[FsTutorial/MorphAndRecon|previous]] *To follow this exercise exactly be sure you've downloaded the [[FsTutorial/Data|tutorial data set]] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names. == 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 -i -s '' where is the first file that appears in the first acquisition directory, and is the first file that appears in the second acquisition directory. For this example we will use ''anon'' as our . 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}//mri, where 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 }}}