Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
pylene
Commits
d46e2e70
Commit
d46e2e70
authored
Feb 06, 2015
by
Edwin Carlinet
Browse files
Add mintree_indexes computation algorithm.
* mln/morpho/maxtree/maxtree.hpp: min-tree entry.
parent
b8d43e2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
mln/morpho/maxtree/maxtree.hpp
View file @
d46e2e70
...
...
@@ -12,13 +12,27 @@ namespace mln
namespace
morpho
{
///
/// \brief Compute a maxtree as a component tree where nodes
contain indexes instead of points.
///
/// \brief Compute a maxtree as a component tree where nodes
///
contain indexes instead of points.
///
/// \param ima The image
/// \param nbh The neighborhood
/// \param cmp A strict weak order on values
template
<
typename
I
,
typename
N
,
typename
StrictWeakOrdering
=
std
::
less
<
mln_value
(
I
)>
>
component_tree
<
typename
I
::
size_type
,
mln_ch_value
(
I
,
unsigned
)
>
maxtree_indexes
(
const
Image
<
I
>&
ima
,
const
Neighborhood
<
N
>&
nbh
,
StrictWeakOrdering
cmp
=
StrictWeakOrdering
());
StrictWeakOrdering
cmp
=
StrictWeakOrdering
());
///
/// \brief Compute a mintree as a component tree where nodes
/// contain indexes instead of points.
///
/// \param ima The image
/// \param nbh The neighborhood
/// \param cmp A strict weak order on values
template
<
typename
I
,
typename
N
>
component_tree
<
typename
I
::
size_type
,
mln_ch_value
(
I
,
unsigned
)
>
mintree_indexes
(
const
Image
<
I
>&
ima
,
const
Neighborhood
<
N
>&
nbh
);
/*****************************/
...
...
@@ -35,6 +49,17 @@ namespace mln
return
res
;
}
template
<
typename
I
,
typename
N
>
component_tree
<
typename
I
::
size_type
,
mln_ch_value
(
I
,
unsigned
)
>
mintree_indexes
(
const
Image
<
I
>&
ima
,
const
Neighborhood
<
N
>&
nbh
)
{
mln_entering
(
"mln::morpho::mintree_indexes"
);
auto
res
=
impl
::
maxtree_queue_indexes
(
exact
(
ima
),
exact
(
nbh
),
std
::
greater
<
mln_value
(
I
)
>
());
mln_exiting
();
return
res
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment