#
# dmrirc.long.example
#
# This example is applicable to longitudinal studies, where DWI data from
# multiple time points are available for each subject. For a simple example
# with a single DWI data set per subject, see dmrirc.example instead.
#
# This file contains commands that will be run by trac-all before an analysis.
# It is used to set all parameters needed for the analysis.
#
# Remove a parameter from your dmrirc file if you want use the default value.
# Parameters that don't have default values must be specified.
#
# Any other commands that you might want to run before an analysis can be added
# to this file.
#
# Original Author: Anastasia Yendiki
# CVS Revision Info:
#    $Author: zkaufman $
#    $Date: 2016/12/20 17:04:05 $
#    $Revision: 1.3.2.1 $
#
# Copyright © 2011 The General Hospital Corporation (Boston, MA) "MGH"
#
# Terms and conditions for use, reproduction, distribution and contribution
# are found in the 'FreeSurfer Software License Agreement' contained
# in the file 'LICENSE' found in the FreeSurfer distribution, and here:
#
# https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSoftwareLicense
#
# Reporting: freesurfer@nmr.mgh.harvard.edu
#
#

# FreeSurfer SUBJECTS_DIR
# T1 images and FreeSurfer segmentations are expected to be found here
# 
setenv SUBJECTS_DIR /Volumes/DANIEL/freesurfer_pin/

# Output directory where trac-all results will be saved
# Default: Same as SUBJECTS_DIR

set dtroot = /Volumes/DANIEL/dti_pin/trac

# Subject IDs (one per time point per subject)
#
set subjlist = (APOE.124 APOE.125 APOE.126 APOE.127 APOE.129 APOE.132 APOE.134 APOE.136 APOE.139 APOE.141 APOE.143 APOE.144 APOE.145 APOE.147 APOE.148 APOE.149 APOE.150 APOE.151 APOE.153 APOE.155 APOE.156 APOE.157 APOE.158 APOE.159 APOE.160 APOE.166 APOE.167 APOE.168 APOE.169 APOE.171 APOE.174 APOE.176 APOE.177 APOE.180 APOE.183 APOE.187 APOE.188 APOE.190 APOE.196 APOE.197 APOE.199 APOE.203 APOE.209 APOE.212 APOE.215 APOE.221 APOE.227 APOE.228 APOE.229 APOE.230 APOE.231 APOE.234 APOE.235 APOE.237 APOE.240 APOE.243 APOE.249 APOE.250 APOE.251 APOE.252 APOE.253 APOE.254 APOE.256 APOE.259 APOE.260 APOE.262 APOE.269 APOE.270 APOE.275 APOE.276 APOE.278 APOE.279 APOE.289 APOE.299 APOE.324 APOE.401 APOE.404 APOE.405 APOE.406 APOE.408 APOE.428 APOE.432 APOE.445 APOE.453 APOE.460 APOE.465 APOE.469 APOE.470)


# In case you want to analyze only Huey and Louie
# Default: Run analysis on all time points and subjects
#1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
set runlist = (1)

# Input diffusion DICOMs (file names relative to dcmroot)
# If original DICOMs don't exist, these can be in other image format
# but then the gradient table and b-value table must be specified (see below)
#
set dcmroot = /Volumes/DANIEL/PIN/DTI/
set dcmlist = (APOE.124.dwi.nii.gz APOE.158.dwi.nii.gz APOE.215.dwi.nii.gz APOE.269.dwi.nii.gz
APOE.125.dwi.nii.gz APOE.159.dwi.nii.gz APOE.221.dwi.nii.gz APOE.270.dwi.nii.gz
APOE.126.dwi.nii.gz APOE.160.dwi.nii.gz APOE.227.dwi.nii.gz APOE.275.dwi.nii.gz
APOE.127.dwi.nii.gz APOE.166.dwi.nii.gz APOE.228.dwi.nii.gz APOE.276.dwi.nii.gz
APOE.129.dwi.nii.gz APOE.167.dwi.nii.gz APOE.229.dwi.nii.gz APOE.278.dwi.nii.gz
APOE.132.dwi.nii.gz APOE.168.dwi.nii.gz APOE.230.dwi.nii.gz APOE.279.dwi.nii.gz
APOE.134.dwi.nii.gz APOE.169.dwi.nii.gz APOE.231.dwi.nii.gz APOE.289.dwi.nii.gz
APOE.136.dwi.nii.gz APOE.171.dwi.nii.gz APOE.234.dwi.nii.gz APOE.299.dwi.nii.gz
APOE.139.dwi.nii.gz APOE.174.dwi.nii.gz APOE.235.dwi.nii.gz APOE.324.dwi.nii.gz
APOE.141.dwi.nii.gz APOE.176.dwi.nii.gz APOE.237.dwi.nii.gz APOE.401.dwi.nii.gz
APOE.143.dwi.nii.gz APOE.177.dwi.nii.gz APOE.240.dwi.nii.gz APOE.404.dwi.nii.gz
APOE.144.dwi.nii.gz APOE.180.dwi.nii.gz APOE.243.dwi.nii.gz APOE.405.dwi.nii.gz
APOE.145.dwi.nii.gz APOE.183.dwi.nii.gz APOE.249.dwi.nii.gz APOE.406.dwi.nii.gz
APOE.147.dwi.nii.gz APOE.187.dwi.nii.gz APOE.250.dwi.nii.gz APOE.408.dwi.nii.gz
APOE.148.dwi.nii.gz APOE.188.dwi.nii.gz APOE.251.dwi.nii.gz APOE.428.dwi.nii.gz
APOE.149.dwi.nii.gz APOE.190.dwi.nii.gz APOE.252.dwi.nii.gz APOE.432.dwi.nii.gz
APOE.150.dwi.nii.gz APOE.196.dwi.nii.gz APOE.253.dwi.nii.gz APOE.445.dwi.nii.gz
APOE.151.dwi.nii.gz APOE.197.dwi.nii.gz APOE.254.dwi.nii.gz APOE.453.dwi.nii.gz
APOE.153.dwi.nii.gz APOE.199.dwi.nii.gz APOE.256.dwi.nii.gz APOE.460.dwi.nii.gz
APOE.155.dwi.nii.gz APOE.203.dwi.nii.gz APOE.259.dwi.nii.gz APOE.465.dwi.nii.gz
APOE.156.dwi.nii.gz APOE.209.dwi.nii.gz APOE.260.dwi.nii.gz APOE.469.dwi.nii.gz
APOE.157.dwi.nii.gz APOE.212.dwi.nii.gz APOE.262.dwi.nii.gz APOE.470.dwi.nii.gz)

# Diffusion gradient tables (if there is a different one for each scan)
# Must be specified if they cannot be read from the DICOM headers
# The tables must have either three columns, where each row is a gradient vector
# or three rows, where each column is a gradient vector
# There must be as many gradient vectors as volumes in the diffusion data set
# Default: Read from DICOM header
#
set bveclist = ()

# Diffusion gradient table (if using the same one for all scans)
# Must be specified if it cannot be read from the DICOM headers
# The table must have either three columns, where each row is a gradient vector
# or three rows, where each column is a gradient vector
# There must be as many gradient vectors as volumes in the diffusion data set
# Default: Read from DICOM header
#
set bvecfile = ()

# Diffusion b-value tables (if there is a different one for each scan)
# Must be specified if they cannot be read from the DICOM headers
# There must be as many b-values as volumes in the diffusion data set
# Default: Read from DICOM header
#
set bvallist = ()

# Diffusion b-value table
# Must be specified if it cannot be read from the DICOM headers
# There must be as many b-values as volumes in the diffusion data set
# Default: Read from DICOM header
#
set bvalfile = ()

# Perform registration-based B0-inhomogeneity compensation?
# Default: 0 (no)
#
set dob0 = 1

# Input B0 field map magnitude DICOMs (file names relative to dcmroot)
# Only used if dob0 = 1
# Default: None
#
set b0mlist = (AES101.Ex/field/TE4.92_image000001.dcm AES101.Rest/field/TE4.92_image000001.dcm  AES102.Ex/field/TE4.92_image000001.dcm AES102.Rest/field/TE4.92_image000001.dcm AES104.Ex/field/TE4.92_image000001.dcm AES104.Rest/field/TE4.92_image000001.dcm AES107.Ex/field/TE4.92_image000001.dcm AES107.Rest/field/TE4.92_image000001.dcm AES108.Ex/field/TE4.92_image000001.dcm AES108.Rest/field/TE4.92_image000001.dcm AES109.Ex/field/TE4.92_image000001.dcm AES109.Rest/field/TE4.92_image000001.dcm AES110.Ex/field/TE4.92_image000001.dcm AES110.Rest/field/TE4.92_image000001.dcm AES111.Ex/field/TE4.92_image000001.dcm AES111.Rest/field/TE4.92_image000001.dcm AES113.Ex/field/TE4.92_image000001.dcm AES113.Rest/field/TE4.92_image000001.dcm AES114.Ex/field/TE4.92_image000001.dcm AES114.Rest/field/TE4.92_image000001.dcm AES115.Ex/field/TE4.92_image000001.dcm AES115.Rest/field/TE4.92_image000001.dcm AES116.Ex/field/TE4.92_image000001.dcm AES116.Rest/field/TE4.92_image000001.dcm AES117.Ex/field/TE4.92_image000001.dcm AES117.Rest/field/TE4.92_image000001.dcm AES118.Ex/field/TE4.92_image000001.dcm AES118.Rest/field/TE4.92_image000001.dcm AES119.Ex/field/TE4.92_image000001.dcm AES119.Rest/field/TE4.92_image000001.dcm AES120.Ex/field/TE4.92_image000001.dcm AES120.Rest/field/TE4.92_image000001.dcm AES121.Ex/field/TE4.92_image000001.dcm AES121.Rest/field/TE4.92_image000001.dcm AES122.Ex/field/TE4.92_image000001.dcm AES122.Rest/field/TE4.92_image000001.dcm AES123.Ex/field/TE4.92_image000001.dcm AES123.Rest/field/TE4.92_image000001.dcm AES124.Ex/field/TE4.92_image000001.dcm AES124.Rest/field/TE4.92_image000001.dcm AES126.Ex/field/TE4.92_image000001.dcm AES126.Rest/field/TE4.92_image000001.dcm AES127.Ex/field/TE4.92_image000001.dcm AES127.Rest/field/TE4.92_image000001.dcm AES129.Ex/field/TE4.92_image000001.dcm AES129.Rest/field/TE4.92_image000001.dcm AES130.Ex/field/TE4.92_image000001.dcm AES130.Rest/field/TE4.92_image000001.dcm AES133.Ex/field/TE4.92_image000001.dcm AES133.Rest/field/TE4.92_image000001.dcm AES134.Ex/field/TE4.92_image000001.dcm AES134.Rest/field/TE4.92_image000001.dcm AES136.Ex/field/TE4.92_image000001.dcm AES136.Rest/field/TE4.92_image000001.dcm AES137.Ex/field/TE4.92_image000001.dcm AES137.Rest/field/TE4.92_image000001.dcm AES138.Ex/field/TE4.92_image000001.dcm AES138.Rest/field/TE4.92_image000001.dcm AES139.Ex/field/TE4.92_image000001.dcm AES139.Rest/field/TE4.92_image000001.dcm )

# Input B0 field map phase DICOMs (file names relative to dcmroot)
# Only used if dob0 = 1
# Default: None
#
set b0plist = ( AES101.Ex/phase/TE7.38_image000001.dcm AES101.Rest/phase/TE7.38_image000001.dcm  AES102.Ex/phase/TE7.38_image000001.dcm AES102.Rest/phase/TE7.38_image000001.dcm AES104.Ex/phase/TE7.38_image000001.dcm AES104.Rest/phase/TE7.38_image000001.dcm AES107.Ex/phase/TE7.38_image000001.dcm AES107.Rest/phase/TE7.38_image000001.dcm AES108.Ex/phase/TE7.38_image000001.dcm AES108.Rest/phase/TE7.38_image000001.dcm AES109.Ex/phase/TE7.38_image000001.dcm AES109.Rest/phase/TE7.38_image000001.dcm AES110.Ex/phase/TE7.38_image000001.dcm AES110.Rest/phase/TE7.38_image000001.dcm AES111.Ex/phase/TE7.38_image000001.dcm AES111.Rest/phase/TE7.38_image000001.dcm AES113.Ex/phase/TE7.38_image000001.dcm AES113.Rest/phase/TE7.38_image000001.dcm AES114.Ex/phase/TE7.38_image000001.dcm AES114.Rest/phase/TE7.38_image000001.dcm AES115.Ex/phase/TE7.38_image000001.dcm AES115.Rest/phase/TE7.38_image000001.dcm AES116.Ex/phase/TE7.38_image000001.dcm AES116.Rest/phase/TE7.38_image000001.dcm AES117.Ex/phase/TE7.38_image000001.dcm AES117.Rest/phase/TE7.38_image000001.dcm AES118.Ex/phase/TE7.38_image000001.dcm AES118.Rest/phase/TE7.38_image000001.dcm AES119.Ex/phase/TE7.38_image000001.dcm AES119.Rest/phase/TE7.38_image000001.dcm AES120.Ex/phase/TE7.38_image000001.dcm AES120.Rest/phase/TE7.38_image000001.dcm AES121.Ex/phase/TE7.38_image000001.dcm AES121.Rest/phase/TE7.38_image000001.dcm AES122.Ex/phase/TE7.38_image000001.dcm AES122.Rest/phase/TE7.38_image000001.dcm AES123.Ex/phase/TE7.38_image000001.dcm AES123.Rest/phase/TE7.38_image000001.dcm AES124.Ex/phase/TE7.38_image000001.dcm AES124.Rest/phase/TE7.38_image000001.dcm AES126.Ex/phase/TE7.38_image000001.dcm AES126.Rest/phase/TE7.38_image000001.dcm AES127.Ex/phase/TE7.38_image000001.dcm AES127.Rest/phase/TE7.38_image000001.dcm AES129.Ex/phase/TE7.38_image000001.dcm AES129.Rest/phase/TE7.38_image000001.dcm AES130.Ex/phase/TE7.38_image000001.dcm AES130.Rest/phase/TE7.38_image000001.dcm AES133.Ex/phase/TE7.38_image000001.dcm AES133.Rest/phase/TE7.38_image000001.dcm AES134.Ex/phase/TE7.38_image000001.dcm AES134.Rest/phase/TE7.38_image000001.dcm AES136.Ex/phase/TE7.38_image000001.dcm AES136.Rest/phase/TE7.38_image000001.dcm AES137.Ex/phase/TE7.38_image000001.dcm AES137.Rest/phase/TE7.38_image000001.dcm AES138.Ex/phase/TE7.38_image000001.dcm AES138.Rest/phase/TE7.38_image000001.dcm AES139.Ex/phase/TE7.38_image000001.dcm AES139.Rest/phase/TE7.38_image000001.dcm )

# Echo spacing for field mapping sequence (from sequence printout)
# Only used if dob0 = 1
# Default: None
#
set echospacing = 0.88

# Perform registration-based eddy-current compensation?
# Default: 1 (yes)
#
set doeddy = 1

# Rotate diffusion gradient vectors to match eddy-current compensation?
# Only used if doeddy = 1
# Default: 1 (yes)
#
set dorotbvecs = 0

# Fractional intensity threshold for BET mask extraction from low-b images
# This mask is used only if usemaskanat = 0
# Default: 0.3
#
set thrbet = 0.3

# Perform diffusion-to-T1 registration by flirt?
# Default: 0 (no)
#
set doregflt = 0

# Perform diffusion-to-T1 registration by bbregister?
# Default: 1 (yes)
#
set doregbbr = 1

# Perform registration of T1 to MNI template?
# Default: 1 (yes)
#
set doregmni = 1

# MNI template
# Only used if doregmni = 1
# Default: $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz
#
set mnitemp = $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz

# Perform registration of T1 to CVS template?
# Default: 0 (no)
#
set doregcvs = 0

# CVS template subject ID
# Only used if doregcvs = 1
# Default: cvs_avg35
#
set cvstemp =

# Parent directory of the CVS template subject
# Only used if doregcvs = 1
# Default: $FREESURFER_HOME/subjects
#
set cvstempdir =

# Use brain mask extracted from T1 image instead of low-b diffusion image?
# Has no effect if there is no T1 data
# Default: 1 (yes)
#
set usemaskanat = 1

# Paths to reconstruct
# Default: All paths in the atlas
#
set pathlist = ( lh.cst_AS rh.cst_AS \
                 lh.unc_AS rh.unc_AS \
                 lh.ilf_AS rh.ilf_AS \
                 fmajor_PP fminor_PP \
                 lh.atr_PP rh.atr_PP \
                 lh.ccg_PP rh.ccg_PP \
                 lh.cab_PP rh.cab_PP \
                 lh.slfp_PP rh.slfp_PP \
                 lh.slft_PP rh.slft_PP )

# Number of path control points
# It can be a single number for all paths or a different number for each of the
# paths specified in pathlist
# Default: 7 for the forceps major, 6 for the corticospinal tract,
#          4 for the angular bundle, and 5 for all other paths
#
set ncpts = (6 6 5 5 5 5 7 5 5 5 5 5 4 4 5 5 5 5)

# List of training subjects
# This text file lists the locations of training subject directories
# Default: $FREESURFER_HOME/trctrain/trainlist.txt
#
set trainfile = $FREESURFER_HOME/trctrain/trainlist.txt

# Number of "sticks" (anisotropic diffusion compartments) in the bedpostx
# ball-and-stick model
# Default: 2
#
set nstick = 2

# Number of MCMC burn-in iterations
# (Path samples drawn initially by MCMC algorithm and discarded)
# Default: 200
#
set nburnin = 200

# Number of MCMC iterations
# (Path samples drawn by MCMC algorithm and used to estimate path distribution)
# Default: 7500
#
set nsample = 10000

# Frequency with which MCMC path samples are retained for path distribution
# Default: 5 (keep every 5th sample)
#
set nkeep = 5

# Reinitialize path reconstruction?
# This is an option of last resort, to be used only if one of the reconstructed
# pathway distributions looks like a single curve. This is a sign that the
# initial guess for the pathway was problematic, perhaps due to poor alignment
# between the individual and the atlas. Setting the reinit parameter to 1 and
# rerunning "trac-all -prior" and "trac-all -path", only for the specific
# subjects and pathways that had this problem, will attempt to reconstruct them
# with a different initial guess.
# Default: 0 (do not reinitialize)
#
set reinit = 0

