Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
6270c8c9
Commit
6270c8c9
authored
Aug 04, 2010
by
Guillaume Lazzara
Browse files
core/component_set.hh: Add a new internal member valid_comps_image_().
parent
290ccbee
Changes
2
Hide whitespace changes
Inline
Side-by-side
scribo/ChangeLog
View file @
6270c8c9
2010-08-04 Guillaume Lazzara <z@lrde.epita.fr>
* core/component_set.hh: Add a new internal member
valid_comps_image_().
2010-08-04 Guillaume Lazzara <z@lrde.epita.fr>
2010-08-04 Guillaume Lazzara <z@lrde.epita.fr>
* filter/object_groups_with_holes.hh: Fix an invalid mismatch
* filter/object_groups_with_holes.hh: Fix an invalid mismatch
...
...
scribo/core/component_set.hh
View file @
6270c8c9
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
# include <mln/accu/shape/bbox.hh>
# include <mln/accu/shape/bbox.hh>
# include <mln/labeling/compute.hh>
# include <mln/labeling/compute.hh>
# include <mln/labeling/relabel.hh>
# include <mln/convert/from_to.hh>
# include <mln/convert/from_to.hh>
...
@@ -198,6 +199,13 @@ namespace scribo
...
@@ -198,6 +199,13 @@ namespace scribo
//
//
L
&
labeled_image_
();
L
&
labeled_image_
();
/// Return the underlying labeled image where invalid components
/// have been erased.
///
/// WARNING: this image is computed on the fly...!
//
mln_concrete
(
L
)
valid_comps_image_
()
const
;
/// @}
/// @}
private:
private:
...
@@ -493,6 +501,28 @@ namespace scribo
...
@@ -493,6 +501,28 @@ namespace scribo
}
}
template
<
typename
L
>
inline
mln_concrete
(
L
)
component_set
<
L
>::
valid_comps_image_
()
const
{
mln
::
util
::
array
<
bool
>
f
(
unsigned
(
this
->
data_
->
ncomps_
)
+
1
);
f
(
0
)
=
true
;
for_all_comps
(
c
,
(
*
this
))
f
(
c
)
=
(
*
this
)(
c
).
is_valid
();
mln_value
(
L
)
new_ncomps
;
mln_concrete
(
L
)
output
=
mln
::
labeling
::
relabel
(
this
->
data_
->
ima_
,
this
->
data_
->
ncomps_
,
new_ncomps
,
f
);
return
output
;
}
template
<
typename
L
>
template
<
typename
L
>
inline
inline
bool
bool
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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