Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
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
fdt
Commits
8ed3011f
Commit
8ed3011f
authored
19 years ago
by
Tim Behrens
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
a5af5dc6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fibre.h
+11
-5
11 additions, 5 deletions
fibre.h
xfibres.cc
+6
-1
6 additions, 1 deletion
xfibres.cc
xfibresoptions.h
+4
-0
4 additions, 0 deletions
xfibresoptions.h
with
21 additions
and
6 deletions
fibre.h
+
11
−
5
View file @
8ed3011f
...
...
@@ -222,11 +222,15 @@ namespace FIBRE{
return
true
;
else
{
//m_f_prior=-(log(m_lam) + (m_lam-1)*log(1-m_f));
if
(
m_lam_jump
)
m_f_prior
=
log
(
1
-
m_f
)
+
2
*
log
(
fabs
(
log
(
1
-
m_f
)));
//marginalised with uniform prior on lambda
else
if
(
opts
.
no_ard
.
value
()){
m_f_prior
=
0
;
}
else
{
if
(
m_lam_jump
)
m_f_prior
=
log
(
1
-
m_f
)
+
2
*
log
(
fabs
(
log
(
1
-
m_f
)));
//marginalised with uniform prior on lambda
else
m_f_prior
=
0
;
}
m_f_prior
=
opts
.
fudge
.
value
()
*
m_f_prior
;
return
false
;
}
...
...
@@ -459,7 +463,9 @@ namespace FIBRE{
inline
float
get_d
()
const
{
return
m_d
;}
inline
void
set_d
(
const
float
d
){
m_d
=
d
;
}
inline
float
get_energy
()
const
{
return
m_likelihood_en
+
m_prior_en
;}
inline
float
get_likelihood_energy
()
const
{
return
m_likelihood_en
;}
inline
float
get_S0
()
const
{
return
m_S0
;}
inline
void
set_S0
(
const
float
S0
){
m_S0
=
S0
;
}
...
...
This diff is collapsed.
Click to expand it.
xfibres.cc
+
6
−
1
View file @
8ed3011f
...
...
@@ -127,6 +127,7 @@ class Samples{
xfibresOptions
&
opts
;
Matrix
m_dsamples
;
Matrix
m_S0samples
;
Matrix
m_lik_energy
;
vector
<
Matrix
>
m_thsamples
;
vector
<
Matrix
>
m_phsamples
;
vector
<
Matrix
>
m_fsamples
;
...
...
@@ -149,6 +150,7 @@ public:
m_dsamples
=
0
;
m_S0samples
.
ReSize
(
nsamples
,
nvoxels
);
m_S0samples
=
0
;
m_lik_energy
.
ReSize
(
nsamples
,
nvoxels
);
for
(
int
f
=
0
;
f
<
opts
.
nfibres
.
value
();
f
++
){
m_thsamples
.
push_back
(
m_S0samples
);
...
...
@@ -164,6 +166,7 @@ public:
void
record
(
Multifibre
&
mfib
,
int
vox
,
int
samp
){
m_dsamples
(
samp
,
vox
)
=
mfib
.
get_d
();
m_S0samples
(
samp
,
vox
)
=
mfib
.
get_S0
();
m_lik_energy
(
samp
,
vox
)
=
mfib
.
get_likelihood_energy
();
for
(
int
f
=
0
;
f
<
opts
.
nfibres
.
value
();
f
++
){
m_thsamples
[
f
](
samp
,
vox
)
=
mfib
.
fibres
()[
f
].
get_th
();
m_phsamples
[
f
](
samp
,
vox
)
=
mfib
.
fibres
()[
f
].
get_ph
();
...
...
@@ -181,12 +184,14 @@ public:
vector
<
Matrix
>
phsamples_out
=
m_phsamples
;
vector
<
Matrix
>
fsamples_out
=
m_fsamples
;
vector
<
Matrix
>
lamsamples_out
=
m_lamsamples
;
Log
&
logger
=
LogSingleton
::
getInstance
();
tmp
.
setmatrix
(
m_dsamples
,
mask
);
save_volume4D
(
tmp
,
logger
.
appendDir
(
"dsamples"
));
tmp
.
setmatrix
(
m_S0samples
,
mask
);
save_volume4D
(
tmp
,
logger
.
appendDir
(
"S0samples"
));
tmp
.
setmatrix
(
m_lik_energy
,
mask
);
save_volume4D
(
tmp
,
logger
.
appendDir
(
"lik_energy"
));
//Sort the output based on mean_fsamples
//
...
...
This diff is collapsed.
Click to expand it.
xfibresoptions.h
+
4
−
0
View file @
8ed3011f
...
...
@@ -42,6 +42,7 @@ class xfibresOptions {
Option
<
int
>
sampleevery
;
Option
<
int
>
updateproposalevery
;
Option
<
int
>
seed
;
Option
<
bool
>
no_ard
;
void
parse_command_line
(
int
argc
,
char
**
argv
,
Log
&
logger
);
private
:
...
...
@@ -105,6 +106,8 @@ class xfibresOptions {
false
,
requires_argument
),
seed
(
string
(
"--seed"
),
8665904
,
string
(
"seed for pseudo random number generator"
),
false
,
requires_argument
),
no_ard
(
string
(
"--noard"
),
false
,
string
(
"Turn ARD off on all fibres"
),
false
,
no_argument
),
options
(
"xfibres"
,
"xfibres -k <filename>
\n
xfibres --verbose
\n
"
)
{
...
...
@@ -125,6 +128,7 @@ class xfibresOptions {
options
.
add
(
sampleevery
);
options
.
add
(
updateproposalevery
);
options
.
add
(
seed
);
options
.
add
(
no_ard
);
}
catch
(
X_OptionError
&
e
)
{
...
...
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