Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
avwutils
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
avwutils
Commits
085ddd30
Commit
085ddd30
authored
10 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
Current Version Jan 15
parent
3992c613
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fslsmoothfill.cc
+13
-15
13 additions, 15 deletions
fslsmoothfill.cc
fslsplit.cc
+0
-3
0 additions, 3 deletions
fslsplit.cc
with
13 additions
and
18 deletions
fslsmoothfill.cc
+
13
−
15
View file @
085ddd30
...
@@ -465,8 +465,15 @@ int do_work()
...
@@ -465,8 +465,15 @@ int do_work()
{
{
// read in images
// read in images
volume
<
float
>
invol
;
volume
<
float
>
invol
;
read_volume
(
invol
,
inputname
.
value
());
try
{
read_volume
(
invol
,
inputname
.
value
());
}
catch
(...)
{
cerr
<<
"smoothfill: Problem reading input image "
<<
inputname
.
value
()
<<
endl
;
exit
(
EXIT_FAILURE
);
}
// read reference volume and set size of invol
// read reference volume and set size of invol
read_volume
(
global_mask
,
maskname
.
value
());
read_volume
(
global_mask
,
maskname
.
value
());
...
@@ -478,7 +485,7 @@ int do_work()
...
@@ -478,7 +485,7 @@ int do_work()
volume
<
float
>
mask
;
volume
<
float
>
mask
;
mask
=
global_mask
;
mask
=
global_mask
;
dilall_extra
(
invol
,
mask
);
dilall_extra
(
invol
,
mask
);
save_volume
(
invol
,
fsl
basename
(
outname
.
value
())
+
"_init"
);
save_volume
(
invol
,
make_
basename
(
outname
.
value
())
+
"_init"
);
float
cost
=
calc_cost
(
invol
);
float
cost
=
calc_cost
(
invol
);
cout
<<
"Cost is "
<<
cost
<<
endl
;
cout
<<
"Cost is "
<<
cost
<<
endl
;
// generate subsampled versions of the dilated volume for spatial blurring (distance dependent)
// generate subsampled versions of the dilated volume for spatial blurring (distance dependent)
...
@@ -489,8 +496,8 @@ int do_work()
...
@@ -489,8 +496,8 @@ int do_work()
vol8
=
subsample_by_2
(
vol4
,
true
);
vol8
=
subsample_by_2
(
vol4
,
true
);
vol16
=
subsample_by_2
(
vol8
,
true
);
vol16
=
subsample_by_2
(
vol8
,
true
);
vol32
=
subsample_by_2
(
vol16
,
true
);
vol32
=
subsample_by_2
(
vol16
,
true
);
save_volume
(
vol2
,
fsl
basename
(
outname
.
value
())
+
"_vol2"
);
save_volume
(
vol2
,
make_
basename
(
outname
.
value
())
+
"_vol2"
);
save_volume
(
vol32
,
fsl
basename
(
outname
.
value
())
+
"_vol32"
);
save_volume
(
vol32
,
make_
basename
(
outname
.
value
())
+
"_vol32"
);
for
(
int
z
=
0
;
z
<=
invol
.
maxz
();
z
++
)
{
for
(
int
z
=
0
;
z
<=
invol
.
maxz
();
z
++
)
{
for
(
int
y
=
0
;
y
<=
invol
.
maxy
();
y
++
)
{
for
(
int
y
=
0
;
y
<=
invol
.
maxy
();
y
++
)
{
for
(
int
x
=
0
;
x
<=
invol
.
maxx
();
x
++
)
{
for
(
int
x
=
0
;
x
<=
invol
.
maxx
();
x
++
)
{
...
@@ -518,7 +525,7 @@ int do_work()
...
@@ -518,7 +525,7 @@ int do_work()
if
(
verbose
.
value
())
{
cout
<<
"After gradient descent"
<<
endl
;
}
if
(
verbose
.
value
())
{
cout
<<
"After gradient descent"
<<
endl
;
}
save_volume
(
invol
,
outname
.
value
());
save_volume
(
invol
,
outname
.
value
());
save_volume
(
mask
,
fsl
basename
(
outname
.
value
())
+
"_idxmask"
);
save_volume
(
mask
,
make_
basename
(
outname
.
value
())
+
"_idxmask"
);
return
(
EXIT_SUCCESS
);
return
(
EXIT_SUCCESS
);
}
}
...
@@ -563,15 +570,6 @@ int main(int argc, char *argv[])
...
@@ -563,15 +570,6 @@ int main(int argc, char *argv[])
cerr
<<
e
.
what
()
<<
endl
;
cerr
<<
e
.
what
()
<<
endl
;
}
}
volume
<
float
>
invol
;
try
{
read_volume_hdr_only
(
invol
,
inputname
.
value
());
}
catch
(...)
{
cerr
<<
"smoothfill: Problem reading input image "
<<
inputname
.
value
()
<<
endl
;
exit
(
EXIT_FAILURE
);
}
return
do_work
();
return
do_work
();
}
}
This diff is collapsed.
Click to expand it.
fslsplit.cc
+
0
−
3
View file @
085ddd30
...
@@ -50,9 +50,6 @@ int fmrib_main(int argc, char *argv[])
...
@@ -50,9 +50,6 @@ int fmrib_main(int argc, char *argv[])
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
Tracer
tr
(
"main"
);
string
progname
=
argv
[
0
];
string
progname
=
argv
[
0
];
if
(
argc
<=
1
||
argc
>=
5
)
if
(
argc
<=
1
||
argc
>=
5
)
{
{
...
...
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