-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrun_SiemensMP2RAGErecon_cluster.m
executable file
·63 lines (55 loc) · 1.81 KB
/
run_SiemensMP2RAGErecon_cluster.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
% rawDataFile = ''; % <-- this must already be set before calling this script
if ~exist(rawDataFile,'file')
disp(['File ' rawDataFile ' not found, trying locally instead.'])
rawDataFile = fullfile(script_pwd,rawDataFile);
if ~exist(rawDataFile,'file')
disp(['Error: file ' rawDataFile ' not found either'])
else
disp(['File ' rawDataFile ' located!'])
end
end
disp(['Attempting to reconstruct: ' rawDataFile]);
run([getenv('RETROMOCOBOX_HOME') '/addRetroMoCoBoxToPath.m']);
%run([getenv('MIRT_HOME') '/setup.m']);
addpath(getenv('SPM_HOME'));
%% Haven't yet worked out a good way to feed these options from the command line launch for the cluster
if ~exist('FatNavRes_mm','var')
FatNavRes_mm = 2;
end
if ~exist('swapDims_xyz','var')
swapDims_xyz = [0 0 1]; % seems to be most common...
end
if ~exist('bKeepGRAPPArecon','var')
bKeepGRAPPArecon = 0;
end
if ~exist('bLinParSwap','var')
bLinParSwap = 0;
end
if ~exist('bFullParforRecon','var')
bFullParforRecon = 1;
end
if ~exist('bKeepComplexImageData','var')
bKeepComplexImageData = 0;
end
if ~exist('outRoot','var')
outRoot = [];
end
if ~exist('bUseGPU','var')
bUseGPU = 0;
end
if ~exist('outFolderPrefix','var')
outFolderPrefix = 'MPRAGE';
end
if ~exist('parpoolSize','var')
parpoolSize = 12;
end
if ~exist('NUFFTosf','var')
NUFFTosf = 1.5;
end
%%
dir(rawDataFile)
%%
reconstructSiemensMP2RAGEwithFatNavs(rawDataFile,'FatNavRes_mm',FatNavRes_mm,...
'bGRAPPAinRAM',1,'bKeepReconInRAM',1,'bFullParforRecon',bFullParforRecon,'swapDims_xyz',swapDims_xyz,'bKeepFatNavs',0,...
'bKeepGRAPPArecon',bKeepGRAPPArecon,'bLinParSwap',bLinParSwap,'bKeepComplexImageData',bKeepComplexImageData,...
'outRoot',outRoot,'bUseGPU',bUseGPU,'outFolderPrefix',outFolderPrefix,'parpoolSize',parpoolSize,'NUFFTosf',NUFFTosf);