-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_Parameters.m
More file actions
92 lines (79 loc) · 3.19 KB
/
get_Parameters.m
File metadata and controls
92 lines (79 loc) · 3.19 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
function ParameterOutput=get_Parameters(Option)
%ParameterOutput=get_Parameters('All')
%ParameterOutput=get_Parameters('MainFunctionPath')
%ParameterOutput=get_Parameters('SpmFunctionPath')
%TemplatePath=get_Parameters('TemplatePath')
%FunctionName=get_Parameters('FunctionName')
%FunctionName=get_Parameters('Ch2FileName')
%ParameterOutput=get_Parameters('MainFunctionWholeName')
%ParameterOutput=get_Parameters('ParaSavePath')
%MaskPath=get_Parameters('MaskPath')
%get_Parameters('CurrentVersion')
%-----------------------------------------------------------
% Copyright(c) 2015
% Center for Cognition and Brain Disorders, Hangzhou Normal University, Hangzhou 310015, China
% Written by JIA Xi-Ze 201410
% http://www.restfmri.net/
% Mail to Authors: jxz.rest@gmail.com, jiaxize@foxmail.com
if nargin<=0
Option='All';
end
switch upper(Option)
case 'ALL' %'All'
ParameterOutput=out_AllParameters();
case 'MAINFUNCTIONWHOLENAME' %MainFunctionWholeName
ParameterOutput=out_MainFunctionWholeName();
case 'MAINFUNCTIONPATH' %'MainFunctionPath'
ParameterOutput=out_MainFunctionPath();
case 'SPMFUNCTIONPATH' %'SpmFunctionPath'
ParameterOutput=out_SpmFunctionPath();
case upper('CurrentVersion')
ParameterOutput='RESTplus_V1.0_beta';
case 'TEMPLATEPATH' %'TemplatePath'
ParameterOutput=out_TemplatePath();
case 'MASKPATH' %'MaskPath'
ParameterOutput=out_MaskPath();
case 'FUNCTIONNAME' %FunctionName
ParameterOutput=out_FunctionName();
case 'CH2FILENAME'%Ch2FileName
ParameterOutput=out_Ch2FileName();
case 'PARASAVEPATH_BASIC'%ParaSavePath_Basic
ParameterOutput=out_ParaSavePath_Basic();
case upper('ParaSavePath_Advance')
ParameterOutput=out_ParaSavePath_Advance();
end
end
function ParameterOutput=out_AllParameters()
ParameterOutput.MainFunctionPath=out_MainFunctionPath();
ParameterOutput.SpmFunctionPath=out_SpmFunctionPath();
ParameterOutput.TemplatePath=out_TemplatePath();
end
function ParameterOutput=out_MainFunctionWholeName()
ParameterOutput='restplus.m';
end
function ParameterOutput=out_TemplatePath()
MainFunPath=out_MainFunctionPath();
ParameterOutput=[MainFunPath filesep 'Template'];
end
function ParameterOutput=out_MaskPath()
MainFunPath=out_MainFunctionPath();
ParameterOutput=[MainFunPath filesep 'mask'];
end
function ParameterOutput=out_MainFunctionPath()
[ParameterOutput, Name, Ext] = fileparts(which(get_Parameters('MainFunctionWholeName')));
end
function ParameterOutput=out_SpmFunctionPath()
[ParameterOutput, Name, Ext] = fileparts(which('spm.m'));
end
function ParameterOutput=out_FunctionName()
ParameterOutput='Restpro';
end
function ParameterOutput=out_Ch2FileName()
ParameterOutput='ch2.nii';
end
function ParameterOutput=out_ParaSavePath_Basic()
ParameterOutput=[get_Parameters('MainFunctionPath') filesep 'ParaSave' filesep 'BasicVersion'];
end
function ParameterOutput=out_ParaSavePath_Advance()
ParameterOutput=[get_Parameters('MainFunctionPath') filesep 'ParaSave' filesep 'AdvanceVersion'];
end