-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize_vista.m
69 lines (49 loc) · 2.06 KB
/
initialize_vista.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
58
59
60
61
62
63
64
65
66
67
function initialize_vista(sub_num)
% This script was taken from Winawer lab wiki, and is being modified to use
% with child fMRI data.
% Set session and anatomy paths
% Modify: sess_path, subj_id
% %% To build a 3d surface (mesh) - will worry about this later EK
% anat_dir = strcat('/mnt/scratch/', folder,'/',sub_num,'/MNINonLinear');
% cd(anat_dir)
% ribbonfile = strcat('/mnt/scratch/', folder, '/',sub_num,'/MNINonLinear/ribbon.nii.gz');
% outfile = strcat('/mnt/scratch/', folder, '/',sub_num,'/MNINonLinear/t1_class.nii.gz');
% alignTo = strcat('/mnt/scratch/', folder, '/',sub_num,'/MNINonLinear/T1w.nii.gz');
% fillWithCSF = true;
% fs_ribbon2itk(ribbonfile, outfile, fillWithCSF, alignTo)
%% To initialize the vista session
% Set session path
sess_path = strcat('/home/ekubota/Desktop/',sub_num);
cd(sess_path)
% Created path to anatomy to identify T1W file (not the most elegant, but
% functional for how the data is arranged)
%anat_path = strcat('/home/ekubota/Desktop/', sub_num);
% Set paths to scan files
%Specify functionals
epi_file{1} = fullfile('run01.nii.gz');
assert(exist(epi_file{1},'file')>0)
epi_file{2} = fullfile('run02.nii.gz');
assert(exist(epi_file{2},'file')>0)
% Specify INPLANE file
inplane_file = fullfile('Inplane.nii.gz');
assert(exist(inplane_file, 'file')>0)
% Specify 3DAnatomy file -EK need to change path
%cd(anat_path)
anat_file = fullfile('t1_acpc.nii.gz');
assert(exist(anat_file, 'file')>0)
%cd(sess_path)
% Create params structure
% Generate the expected generic params structure
params = mrInitDefaultParams;
% And insert the required parameters:
params.inplane = inplane_file;
params.functionals = epi_file;
params.sessionDir = sess_path;
% Set optional parameters (specific to experiment)
% Modify: params.subject, params.annotations (e.g. 'FacesHouses' 'Words' 'Bars' 'Bars' 'OnOff'), params.coParams.nCycles (for each scan, can be determined from par files)
params.subject = sub_num;
params.annotations = {'run01', 'run02'};
% Specify some optional parameters
params.vAnatomy = anat_file;
% Go!
ok = mrInit(params);