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
0e6ee78b
Commit
0e6ee78b
authored
17 years ago
by
Christian Beckmann
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
a37eae0f
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
fsl_regfilt.cc
+22
-5
22 additions, 5 deletions
fsl_regfilt.cc
meldata.cc
+0
-1
0 additions, 1 deletion
meldata.cc
melgmix.cc
+1
-3
1 addition, 3 deletions
melgmix.cc
meloptions.h
+1
-1
1 addition, 1 deletion
meloptions.h
melreport.h
+1
-1
1 addition, 1 deletion
melreport.h
with
25 additions
and
11 deletions
fsl_regfilt.cc
+
22
−
5
View file @
0e6ee78b
...
...
@@ -44,9 +44,12 @@ using namespace std;
Option
<
string
>
filter
(
string
(
"-f,--filter"
),
string
(
""
),
string
(
"filter out part of the regression model, e.g. -f
\"
1,2,3
\"
"
),
true
,
requires_argument
);
Option
<
bool
>
verbose
(
string
(
"-v"
),
FALSE
,
string
(
" switch on diagnostic messages"
),
false
,
no_argument
);
Option
<
bool
>
perfvn
(
string
(
"--vn"
),
FALSE
,
string
(
" perfrom variance-normalisation on data"
),
false
,
requires
_argument
);
false
,
no
_argument
);
Option
<
int
>
help
(
string
(
"-h,--help"
),
0
,
string
(
"display this help text"
),
false
,
no_argument
);
...
...
@@ -67,6 +70,7 @@ using namespace std;
Matrix
meanR
;
RowVector
vnscales
;
volume
<
float
>
mask
;
volume
<
float
>
Mean
;
volumeinfo
volinf
;
/*
}
*/
...
...
@@ -103,7 +107,9 @@ int dofilter(){
cerr
<<
"ERROR: need to specify 4D input to use filtering"
<<
endl
;
return
1
;
}
Matrix
unmixMatrix
=
pinv
(
design
);
if
(
verbose
.
value
())
cout
<<
" Calculating maps "
<<
endl
;
Matrix
unmixMatrix
=
pinv
(
design
);
Matrix
maps
=
unmixMatrix
*
data
;
Matrix
noisedes
;
...
...
@@ -133,7 +139,9 @@ int dofilter(){
}
}
while
(
p
);
Matrix
newData
;
newData
=
data
-
noisedes
*
noisemaps
.
t
();
if
(
verbose
.
value
())
cout
<<
" Calculating filtered data "
<<
endl
;
newData
=
data
-
noisedes
*
noisemaps
.
t
();
newData
=
newData
+
ones
(
newData
.
Nrows
(),
1
)
*
meanR
;
save4D
(
newData
,
fnout
.
value
());
...
...
@@ -154,11 +162,19 @@ int setup(){
return
1
;
};
}
else
{
mask
=
tmpdata
[
0
]
*
0.0
+
1.0
;
if
(
verbose
.
value
())
cout
<<
" Creating mask image "
<<
endl
;
Mean
=
meanvol
(
tmpdata
);
float
Mmin
,
Mmax
;
Mmin
=
Mean
.
min
();
Mmax
=
Mean
.
max
();
mask
=
binarise
(
Mean
,
float
(
Mmin
+
0.01
*
(
Mmax
-
Mmin
)),
Mmax
);
}
data
=
tmpdata
.
matrix
(
mask
);
voxels
=
data
.
Ncols
();
if
(
verbose
.
value
())
cout
<<
" Data matrix size : "
<<
data
.
Nrows
()
<<
" x "
<<
voxels
<<
endl
;
}
else
{
cerr
<<
"ERROR: cannot read input image "
<<
fnin
.
value
()
<<
endl
;
return
1
;
...
...
@@ -205,6 +221,7 @@ int main(int argc,char *argv[]){
options
.
add
(
fnmask
);
options
.
add
(
filter
);
options
.
add
(
perfvn
);
options
.
add
(
verbose
);
options
.
add
(
help
);
options
.
add
(
outdata
);
options
.
add
(
outvnscales
);
...
...
@@ -226,5 +243,5 @@ int main(int argc,char *argv[]){
}
catch
(
std
::
exception
&
e
)
{
cerr
<<
e
.
what
()
<<
endl
;
}
}
}
This diff is collapsed.
Click to expand it.
meldata.cc
+
0
−
1
View file @
0e6ee78b
...
...
@@ -526,7 +526,6 @@ namespace Melodic{
if
(
meanR
.
Storage
()
>
0
)
newData
=
newData
+
ones
(
newData
.
Nrows
(),
1
)
*
meanR
;
cerr
<<
" HERE REMOVE "
<<
endl
;
volume4D
<
float
>
tmp
;
read_volume4D
(
tmp
,
opts
.
inputfname
.
value
().
at
(
0
));
tmp
.
setmatrix
(
newData
,
Mask
);
...
...
This diff is collapsed.
Click to expand it.
melgmix.cc
+
1
−
3
View file @
0e6ee78b
...
...
@@ -239,9 +239,7 @@ namespace Melodic{
SortAscending
(
tmp
);
RowVector
newcdf
(
tmp
);
newcdf
<<
normcdf
(
tmp
,
means
(
1
),
vars
(
1
));
write_ascii_matrix
(
dat
,
"dat"
);
write_ascii_matrix
(
newcdf
,
"newcdf"
);
write_ascii_matrix
(
tmp
,
"tmpmat"
);
float
thrp
=
tmp
(
tmp
.
Ncols
())
+
0.01
;
float
thrn
=
tmp
(
1
)
-
0.01
;
int
ctr
=
tmp
.
Ncols
();
...
...
This diff is collapsed.
Click to expand it.
meloptions.h
+
1
−
1
View file @
0e6ee78b
...
...
@@ -168,7 +168,7 @@ class MelodicOptions {
perf_bet
(
string
(
"--nobet"
),
true
,
string
(
"
\t
switch off BET"
),
false
,
no_argument
),
threshold
(
string
(
"--bgthreshold"
),
0.
000000
01
,
threshold
(
string
(
"--bgthreshold"
),
0.01
,
string
(
"brain / non-brain threshold (only if --nobet selected)
\n
"
),
false
,
requires_argument
),
pca_dim
(
string
(
"-d,--dim"
),
0
,
...
...
This diff is collapsed.
Click to expand it.
melreport.h
+
1
−
1
View file @
0e6ee78b
...
...
@@ -80,7 +80,7 @@ namespace Melodic{
report
<<
"<OBJECT data="
<<
opts
.
guireport
.
value
()
<<
"></OBJECT>"
<<
endl
;
loghtml
<<
"<OBJECT data="
<<
opts
.
guireport
.
value
()
<<
"></OBJECT>"
<<
endl
;
}
report
<<
"<IFRAME height=
10
0px width=100% src=nav.html frameborder=0></IFRAME><p>"
<<
endl
;
report
<<
"<IFRAME height=
8
0px width=100% src=nav.html frameborder=0></IFRAME><p>"
<<
endl
;
loghtml
<<
"<IFRAME height=100px width=100% src=nav.html frameborder=0></IFRAME><p>"
<<
"<pre>../melodic.log</pre>"
<<
endl
;
navigator
<<
"<CENTER><TABLE BORDER=0><TR>"
<<
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