Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
melodic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
melodic
Commits
f5fc1e8d
Commit
f5fc1e8d
authored
4 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Use a namespace, as there are other things in the world called "data",
"glm", etc etc.
parent
ed7d1421
No related branches found
No related tags found
1 merge request
!9
mnt/conda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl_glm.cc
+50
-47
50 additions, 47 deletions
fsl_glm.cc
with
50 additions
and
47 deletions
fsl_glm.cc
+
50
−
47
View file @
f5fc1e8d
...
...
@@ -21,6 +21,8 @@ using namespace std;
// The two strings below specify the title and example usage that is
// printed out as the help or usage message
namespace
FSL_GLM
{
string
title
=
string
(
"fsl_glm"
)
+
string
(
"
\n
Author: Christian F. Beckmann
\n
Copyright(C) 2006-2013 University of Oxford
\n
"
)
+
string
(
"
\n
Simple GLM allowing temporal or spatial regression on either text data or images
\n
"
);
...
...
@@ -309,57 +311,58 @@ using namespace std;
write_res
();
return
0
;
}
}
////////////////////////////////////////////////////////////////////////////
using
namespace
FSL_GLM
;
int
main
(
int
argc
,
char
*
argv
[]){
Tracer
tr
(
"main"
);
OptionParser
options
(
title
,
examples
);
try
{
// must include all wanted options here (the order determines how
// the help message is printed)
options
.
add
(
fnin
);
options
.
add
(
fnout
);
options
.
add
(
fndesign
);
options
.
add
(
fncontrasts
);
options
.
add
(
fnmask
);
options
.
add
(
fnftest
);
options
.
add
(
dofset
);
options
.
add
(
normdes
);
options
.
add
(
normdat
);
options
.
add
(
perfvn
);
options
.
add
(
perf_demean
);
options
.
add
(
help
);
options
.
add
(
debug
);
options
.
add
(
outcope
);
options
.
add
(
outz
);
options
.
add
(
outt
);
options
.
add
(
outp
);
options
.
add
(
outf
);
options
.
add
(
outpf
);
options
.
add
(
outres
);
options
.
add
(
outvarcb
);
options
.
add
(
outsigsq
);
options
.
add
(
outdata
);
options
.
add
(
outvnscales
);
options
.
add
(
textConfounds
);
options
.
add
(
voxelwiseConfounds
);
options
.
parse_command_line
(
argc
,
argv
);
int
main
(
int
argc
,
char
*
argv
[]){
Tracer
tr
(
"main"
);
OptionParser
options
(
title
,
examples
);
try
{
// must include all wanted options here (the order determines how
// the help message is printed)
options
.
add
(
fnin
);
options
.
add
(
fnout
);
options
.
add
(
fndesign
);
options
.
add
(
fncontrasts
);
options
.
add
(
fnmask
);
options
.
add
(
fnftest
);
options
.
add
(
dofset
);
options
.
add
(
normdes
);
options
.
add
(
normdat
);
options
.
add
(
perfvn
);
options
.
add
(
perf_demean
);
options
.
add
(
help
);
options
.
add
(
debug
);
options
.
add
(
outcope
);
options
.
add
(
outz
);
options
.
add
(
outt
);
options
.
add
(
outp
);
options
.
add
(
outf
);
options
.
add
(
outpf
);
options
.
add
(
outres
);
options
.
add
(
outvarcb
);
options
.
add
(
outsigsq
);
options
.
add
(
outdata
);
options
.
add
(
outvnscales
);
options
.
add
(
textConfounds
);
options
.
add
(
voxelwiseConfounds
);
options
.
parse_command_line
(
argc
,
argv
);
// line below stops the program if the help was requested or
// a compulsory option was not set
if
(
(
help
.
value
())
||
(
!
options
.
check_compulsory_arguments
(
true
))
){
options
.
usage
();
exit
(
EXIT_FAILURE
);
}
else
{
// Call the local functions
return
do_work
(
argc
,
argv
);
}
}
catch
(
X_OptionError
&
e
)
{
// line below stops the program if the help was requested or
// a compulsory option was not set
if
(
(
help
.
value
())
||
(
!
options
.
check_compulsory_arguments
(
true
))
){
options
.
usage
();
cerr
<<
endl
<<
e
.
what
()
<<
endl
;
exit
(
EXIT_FAILURE
);
}
catch
(
std
::
exception
&
e
)
{
cerr
<<
e
.
what
()
<<
endl
;
}
else
{
// Call the local functions
return
do_work
(
argc
,
argv
);
}
}
catch
(
X_OptionError
&
e
)
{
options
.
usage
();
cerr
<<
endl
<<
e
.
what
()
<<
endl
;
exit
(
EXIT_FAILURE
);
}
catch
(
std
::
exception
&
e
)
{
cerr
<<
e
.
what
()
<<
endl
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment