-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_tracking_dtidet_tck.py
35 lines (27 loc) · 1.88 KB
/
init_tracking_dtidet_tck.py
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
import sys
import utils.copy_template as copier
dataset, subject, root = copier.parseCommandLine(sys.argv)
print("Warning, this can only be run after init_tracking_dtidet_trk.py has been run")
name = copier.subjectNameFromNumber(subject)
repititions = ['0' + `i` for i in range(1,10)] + ["10"]
rep_str = copier.arrToInterpolateString(repititions)
anatomy = copier.getAnatomy(root, dataset, subject)
lifebid_root = "/N/dc2/projects/lifebid/"
mapping = {}
mapping["stn"] = {
"input": root + "O3D_STN/derivatives/tracking_dtidet_trk/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.trk",
"output": root + "O3D_STN/derivatives/tracking_dtidet_tck/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.tck"
}
mapping["hcp3t"] = {
"input": root + "O3D_HCP3T/derivatives/tracking_dtidet_trk/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.trk",
"output": root + "O3D_HCP3T/derivatives/tracking_dtidet_tck/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.tck"
}
mapping["hcp7t"] = {
"input": root + "O3D_HCP7T/derivatives/tracking_dtidet_trk/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.trk",
"output": root + "O3D_HCP7T/derivatives/tracking_dtidet_tck/sub-{}/dwi/sub-{}_dwi_var-dtidet_run-{}_tract.tck"
}
# Need script to compute AFTER-LIFE trk files, then run that here as well.
# matlab -nosplash -nodesktop -r "addpath(genpath('/N/dc2/projects/lifebid/Paolo/local/matlab'));fe2trk /N/dc2/projects/lifebid/code/ccaiafa/Caiafa_Pestilli_paper2015/paper_datasets/STN/sub-FP/fe_structures/fe_structure_FP_96dirs_b2000_1p5iso_STC_run01_tensor__connNUM01.mat /N/dc2/projects/lifebid/code/ccaiafa/Caiafa_Pestilli_paper2015/paper_datasets/STN/sub-FP/dwi/run01_fliprot_aligned_trilin.nii.gz out.trk"
in_str = mapping[dataset]["input"].format(subject, subject, rep_str)
out_str = mapping[dataset]["output"].format(subject, subject, rep_str)
copier.copy(in_str, out_str, anatomy = anatomy, action = "trk2tck", dummy = False)