Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siena
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
siena
Commits
c52c3643
Commit
c52c3643
authored
4 years ago
by
Tom Nichols
Browse files
Options
Downloads
Patches
Plain Diff
Indenting argument processing
parent
60214cb7
No related branches found
No related tags found
1 merge request
!2
Fix indenting in siena_diff.cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
siena_diff.cc
+76
-79
76 additions, 79 deletions
siena_diff.cc
with
76 additions
and
79 deletions
siena_diff.cc
+
76
−
79
View file @
c52c3643
...
...
@@ -60,92 +60,89 @@ double total, voxel_volume, voxel_area;
// {{{ process arguments
if
(
argc
<
3
)
usage
();
usage
();
string
argv1
(
argv
[
1
]),
argv2
(
argv
[
2
]);
sprintf
(
fsldir
,
"%s"
,
getenv
(
"FSLDIR"
));
for
(
i
=
3
;
i
<
argc
;
i
++
)
{
if
(
!
strcmp
(
argv
[
i
],
"-i"
))
ignore_z
=
1
;
// else if (!strcmp(argv[i], "-e"))
// erode_mask=1;
else
if
(
!
strcmp
(
argv
[
i
],
"-d"
))
debug
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-2"
))
seg2
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-c"
))
// {{{ apply self-calibrating factor
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no factor given following -c
\n
"
);
usage
();
for
(
i
=
3
;
i
<
argc
;
i
++
)
{
if
(
!
strcmp
(
argv
[
i
],
"-i"
))
ignore_z
=
1
;
// else if (!strcmp(argv[i], "-e"))
// erode_mask=1;
else
if
(
!
strcmp
(
argv
[
i
],
"-d"
))
debug
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-2"
))
seg2
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-c"
))
// {{{ apply self-calibrating factor
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no factor given following -c
\n
"
);
usage
();
}
calib
=
atof
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-m"
))
edge_masking
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-t"
))
// {{{ ignore n slices at top
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no number of slices given following -t
\n
"
);
usage
();
}
ignore_top_slices
=
atoi
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-b"
))
// {{{ ignore n slices at bottom
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no number of slices given following -b
\n
"
);
usage
();
}
ignore_bottom_slices
=
atoi
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-s"
))
// {{{ segmentation options
{
i
++
;
segoptions
[
0
]
=
0
;
while
(
i
<
argc
)
{
strcat
(
segoptions
,
argv
[
i
]);
strcat
(
segoptions
,
" "
);
i
++
;
}
}
calib
=
atof
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-m"
))
edge_masking
=
1
;
else
if
(
!
strcmp
(
argv
[
i
],
"-t"
))
// {{{ ignore n slices at top
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no number of slices given following -t
\n
"
);
// }}}
else
usage
();
}
ignore_top_slices
=
atoi
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-b"
))
// {{{ ignore n slices at bottom
{
i
++
;
if
(
argc
<
i
+
1
)
{
printf
(
"Error: no number of slices given following -b
\n
"
);
usage
();
}
ignore_bottom_slices
=
atoi
(
argv
[
i
]);
}
// }}}
else
if
(
!
strcmp
(
argv
[
i
],
"-s"
))
// {{{ segmentation options
{
i
++
;
segoptions
[
0
]
=
0
;
while
(
i
<
argc
)
{
strcat
(
segoptions
,
argv
[
i
]);
strcat
(
segoptions
,
" "
);
i
++
;
}
}
// }}}
else
usage
();
}
}
// }}}
// {{{ transform images and masks
...
...
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