-
Notifications
You must be signed in to change notification settings - Fork 0
/
r_getInfoAllSubsSessRuns.m
57 lines (38 loc) · 1.62 KB
/
r_getInfoAllSubsSessRuns.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
%%% ======= BRAIN VOYAGER SCRIPT ======= %%%
%%% ======= BrainTrain Analysis ======== %%%
%%% ==================================== %%%
% Add folders to path
addpath('utils');
addpath('functions');
%% Configuration
clear, clc;
% Settings Structure
configs = struct();
rData = struct();
configs.numPats = 15;
configs.numSessions = 5;
configs.numRuns = 5;
configs.patsIdxs = {'01','02','03','04','05','06','07','08','09','10','11','12','13','14','15'};
configs.SessIdxs = {'_S1','_S2','_S3','_S4','_S5'};
configs.RunsIdxs = {'loc','train','fv1','fv2','trans'};
%%
rootPath = 'T:\DATA_ClinicalTrial';
for p = 1: numel( configs.patsIdxs )
patRootPath = fullfile(char( rootPath ), char( strcat('Subject', configs.patsIdxs{p})) );
for s = 1: numel( configs.SessIdxs )
sessRootPath = char(strcat( patRootPath, configs.SessIdxs{s} ));
for r = 1: numel( configs.RunsIdxs )
runRootPath = fullfile(sessRootPath, char(strcat(['run-' configs.RunsIdxs{r} '-data'], '')));
FmrFiles = dir(fullfile( runRootPath, 'PROJECT' , 'PROCESSING', '*.fmr'))
if (~numel(FmrFiles))
NrOfVolumesPerRun(p,s,r) = -1;
dataSource{p,s,r} = '';
else
fmrFile = xff(fullfile( runRootPath, 'PROJECT' , 'PROCESSING',FmrFiles(1).name))
NrOfVolumesPerRun(p,s,r) = fmrFile.NrOfVolumes;
dataSource{p,s,r} = fmrFile.FirstDataSourceFile;
end
end % end of runs for
end % end of sessions for
end % end of patients for
%%