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
96143800
Commit
96143800
authored
11 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
added instacorr option
parent
55470a36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
meldata.cc
+26
-0
26 additions, 0 deletions
meldata.cc
meldata.h
+1
-0
1 addition, 0 deletions
meldata.h
melhlprfns.cc
+2
-0
2 additions, 0 deletions
melhlprfns.cc
melodic.h
+1
-1
1 addition, 1 deletion
melodic.h
meloptions.cc
+3
-0
3 additions, 0 deletions
meloptions.cc
meloptions.h
+6
-1
6 additions, 1 deletion
meloptions.h
with
39 additions
and
2 deletions
meldata.cc
+
26
−
0
View file @
96143800
...
...
@@ -115,6 +115,19 @@ namespace Melodic{
message
(
" done"
<<
endl
);
}
//convert to instacorrs
if
(
opts
.
insta_fn
.
value
()
>
""
){
Matrix
vscales
=
pow
(
stdev
(
tmpData
,
1
),
-
1
);
varnorm
(
tmpData
,
vscales
);
Matrix
tmpTC
=
tmpData
*
insta_mask
.
t
();
varnorm
(
tmpTC
,
pow
(
stdev
(
tmpTC
),
-
1
));
for
(
int
ctr
=
1
;
ctr
<=
tmpData
.
Ncols
();
ctr
++
)
tmpData
.
Column
(
ctr
)
=
SP
(
tmpData
.
Column
(
ctr
),
tmpTC
);
}
tmpData
.
Release
();
dbgmsg
(
string
(
"END: process_file"
)
<<
endl
);
return
tmpData
;
...
...
@@ -607,6 +620,19 @@ namespace Melodic{
create_RXweight
();
}
//set up instacorr mask image
if
(
opts
.
insta_fn
.
value
()
>
""
){
dbgmsg
(
string
(
" Setting up instacorr mask"
)
<<
endl
);
volume4D
<
float
>
tmp_im
;
read_volume4D
(
tmp_im
,
opts
.
insta_fn
.
value
());
if
(
!
samesize
(
Mean
,
tmp_im
[
0
])){
cerr
<<
"ERROR:: instacorr mask and data have different voxel dimensions
\n\n
"
;
exit
(
2
);
}
insta_mask
=
tmp_im
.
matrix
(
Mask
);
}
//seed the random number generator
double
tmptime
=
time
(
NULL
);
if
(
opts
.
seed
.
value
()
!=
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
meldata.h
+
1
−
0
View file @
96143800
...
...
@@ -241,6 +241,7 @@ namespace Melodic{
volume
<
float
>
Mask
;
volume
<
float
>
Mean
;
volume
<
float
>
background
;
Matrix
insta_mask
;
Matrix
Data
;
Matrix
PPCA
;
...
...
This diff is collapsed.
Click to expand it.
melhlprfns.cc
+
2
−
0
View file @
96143800
...
...
@@ -164,6 +164,8 @@ namespace Melodic{
return
tmpD
;
}
//RowVector varnorm
Matrix
SP2
(
const
Matrix
&
in
,
const
Matrix
&
weights
,
int
econ
)
{
Matrix
Res
;
...
...
This diff is collapsed.
Click to expand it.
melodic.h
+
1
−
1
View file @
96143800
...
...
@@ -66,7 +66,7 @@
namespace
Melodic
{
const
string
version
=
"3.13"
;
const
string
version
=
"3.13
1
"
;
// The two strings below specify the title and example usage that is
// printed out as the help or usage message
...
...
This diff is collapsed.
Click to expand it.
meloptions.cc
+
3
−
0
View file @
96143800
...
...
@@ -155,6 +155,9 @@ MelodicOptions* MelodicOptions::gopt = NULL;
if
(
numICs
.
value
()
>
0
){
explicitnums
=
true
;
}
if
(
insta_fn
.
value
()
>
""
){
varnorm
.
set_T
(
false
);
}
//in the case of indirect inputs, create the vector of input names here
if
(
!
fsl_imageexists
(
inputfname
.
value
().
at
(
0
))){
...
...
This diff is collapsed.
Click to expand it.
meloptions.h
+
6
−
1
View file @
96143800
/* MELODIC - Multivariate exploratory linear optimized decomposition into
/* MELODIC - Multivariate exploratory linear optimized decomposition into
independent components
meloptions.h - class for command line options
...
...
@@ -125,6 +125,7 @@ class MelodicOptions {
Option
<
float
>
nlconst1
;
Option
<
float
>
nlconst2
;
Option
<
float
>
smooth_probmap
;
Option
<
string
>
insta_fn
;
Option
<
bool
>
remove_meanvol
;
Option
<
bool
>
remove_meantc
;
...
...
@@ -391,6 +392,9 @@ class MelodicOptions {
smooth_probmap
(
string
(
"--smooth_pm"
),
0.0
,
string
(
"width of smoothing kernel for probability maps"
),
false
,
requires_argument
,
false
),
insta_fn
(
string
(
"--insta_fn"
),
string
(
""
),
string
(
" mask file name for instacorr calculation"
),
false
,
requires_argument
,
false
),
remove_meanvol
(
string
(
"--keep_meanvol"
),
true
,
string
(
"do not subtract mean volume"
),
false
,
no_argument
,
false
),
...
...
@@ -496,6 +500,7 @@ class MelodicOptions {
options
.
add
(
nlconst1
);
options
.
add
(
nlconst2
);
options
.
add
(
smooth_probmap
);
options
.
add
(
insta_fn
);
options
.
add
(
remove_meanvol
);
options
.
add
(
remove_meantc
);
options
.
add
(
remove_endslices
);
...
...
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