-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetTimeSeriesROIs.m
More file actions
51 lines (41 loc) · 1.69 KB
/
GetTimeSeriesROIs.m
File metadata and controls
51 lines (41 loc) · 1.69 KB
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
% Translational Neuromodeling Project, ETH Zurich
% 'Decoding moral judgements from neurotypical individuals compared to
% individuals with ASD'
%--------------------------------------------------------------------------
% authors: Stephan Boner, Alexander Hess, Nina Stumpf
% date: 2019-05-30
% version: 1.0
%--------------------------------------------------------------------------
% This file specifies the MNI coordinates of our ROIs. The time-series are
% being extracted by calling 'GetTimeSeriesForFile.m'
%==========================================================================
regions = struct();
% specify ROI coordinates as [x,y,z] arrays
% size is radius of sphere around [x,y,z] centre coordinates
regions(1).name = 'MPFC';
regions(1).coordinates = [4.5, 49, 27.5];
regions(1).size = 9;
regions(end+1).name = 'LTPJ';
regions(end).coordinates = [-51, -56, 24];
regions(end).size = 9; % largest possible value such that still inside
regions(end+1).name = 'RTPJ';
regions(end).coordinates = [54, -54, 23];
regions(end).size = 9;
regions(end+1).name = 'PREC';
regions(end).coordinates = [0.5, -56, 34];
regions(end).size = 9;
spm('defaults','FMRI')
pathBase = what('TNproject');
pathBase = pathBase.path;
pathBase = fullfile(pathBase, 'data');
subjects = dir(fullfile(pathBase,'sub*'));
for f=1:numel(subjects)
subjectPath = fullfile(pathBase,subjects(f).name);
filenames = dir(fullfile(subjectPath, 'func', '*dis*.nii'));
glmPath = fullfile(subjectPath, 'GLM');
for i=1:numel(filenames)
fileNameBase = strrep(filenames(i).name, '.nii', '');
glmPathTask = fullfile(glmPath, fileNameBase);
GetTimeSeriesForFile(pathBase,glmPathTask,regions);
end
end