==== makeFirstAnat.sh Example Script: ==== the following is an example script that will convert your raw anatomical image (with bxh header) into LAS orientation, and into nifti format. #!/bin/bash SUBJ=$1 ANATDIR=~/path/to/raw/data/$SUBJ FSLDATADIR=/path/to/put/converted/anat/$SUBJ/rawdata SEGDIR=/path/to/segmentation/dir/$SUBJ/firstSeg #### make the directories if they do not exist mkdir -p $FSLDATADIR mkdir -p $SEGDIR #### converts anatomical to LAS #### bxhreorient --orientation=LAS $ANATDIR/series${2}/*bxh $FSLDATADIR/T1.bxh bxh2analyze -s --niigz $FSLDATADIR/T1.bxh $SEGDIR/T1_las #### creates a neck mask for running first, may need to change dimensions fslmaths $SEGDIR/T1_flip -roi 0 256 0 256 30 136 0 1 $SEGDIR/neckMask == to run the script: == bash -x makeFirstAnat SUBJ# SERIES#