-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinternal_TL_analysis.m
57 lines (47 loc) · 1.97 KB
/
internal_TL_analysis.m
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
function [obj] = internal_TL_analysis(...
BOLD_fMRI_unsmoothed_data, ...
BOLD_fMRI_Smoothed_data, ...
runMotionParameters, ...
FreeSurfer_segmentation_Atlas_path, ...
FreeSurfer_Thalamic_Segmentation, ...
participant_TL_task_log_path, ...
subjectID, ...
TR, ...
left_AC_search_region_mask, ...
right_AC_search_region_mask, ...
left_VC_search_region_mask, ...
right_VC_search_region_mask, ...
intermediatesOutputDirectory, ...
fROIoutputDirectory ...
)
if (~exist(intermediatesOutputDirectory,'dir'))
mkdir(intermediatesOutputDirectory);
end
if (~exist(fROIoutputDirectory,'dir'))
mkdir(fROIoutputDirectory);
end
obj.spmuse.TR = TR;
obj.home = intermediatesOutputDirectory;
obj.par.par.name = subjectID;
obj.par.par.home = intermediatesOutputDirectory;
obj.td.logs.source = participant_TL_task_log_path;
obj.tMNI_run = BOLD_fMRI_unsmoothed_data;
obj.stMNI_run = BOLD_fMRI_Smoothed_data;
obj.MPfile_name_run = runMotionParameters;
[Y_grayMatter_mask,V_grayMatter_mask, ...
Y_whiteMatter_mask,Y_CSF_mask, ...
grayMatterMask_eroded,whiteMatterMask_eroded,csfMask_eroded] = ...
TLmakeMasks(FreeSurfer_segmentation_Atlas_path);
% run all the main 6 functions of the pipeline.
obj = TLreadLogs(obj , participant_TL_task_log_path);
obj = TLprep1l(obj,Y_grayMatter_mask,V_grayMatter_mask);
obj = TLrun1l(obj);
obj = TLmakeSearchSpace(obj,FreeSurfer_Thalamic_Segmentation,FreeSurfer_segmentation_Atlas_path);
obj = TLgetROIs(obj, ...
left_AC_search_region_mask,right_AC_search_region_mask, ...
left_VC_search_region_mask,right_VC_search_region_mask, ...
Y_grayMatter_mask,Y_whiteMatter_mask,Y_CSF_mask,...
grayMatterMask_eroded,whiteMatterMask_eroded,csfMask_eroded, ...
intermediatesOutputDirectory, ...
fROIoutputDirectory);
end