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
Robert Sachunsky
olena
Commits
8993f0d7
Commit
8993f0d7
authored
Aug 08, 2011
by
Guillaume Lazzara
Browse files
Fix tests.
* tests/labeling/blobs_and_compute.cc, * tests/morpho/skeleton_constrained.cc: Here.
parent
dd929eb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
milena/ChangeLog
View file @
8993f0d7
2011-08-08 Guillaume Lazzara <z@lrde.epita.fr>
Fix tests.
* tests/labeling/blobs_and_compute.cc,
* tests/morpho/skeleton_constrained.cc: Here.
2011-08-08 Guillaume Lazzara <z@lrde.epita.fr>
Fix genericity in skeleton computation.
milena/tests/labeling/blobs_and_compute.cc
View file @
8993f0d7
// Copyright (C) 2009, 2010 EPITA Research and Development
Laboratory
// (LRDE)
// Copyright (C) 2009, 2010
, 2011
EPITA Research and Development
//
Laboratory
(LRDE)
//
// This file is part of Olena.
//
...
...
@@ -56,6 +56,6 @@ int main()
mln_assertion
(
result
.
second
().
first
().
size
()
==
34
);
mln_assertion
(
result
.
second
().
second
().
size
()
==
34
);
mln_assertion
(
result
.
second
().
first
()[
1
]
==
point2d
(
10
,
30
));
mln_assertion
(
result
.
second
().
second
()[
33
]
==
point2d
(
31
0
,
6
6
));
mln_assertion
(
result
.
second
().
second
()[
33
]
==
point2d
(
31
1
,
6
7
));
mln_assertion
(
n
==
33
);
}
milena/tests/morpho/skeleton_constrained.cc
View file @
8993f0d7
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Copyright (C) 2008, 2009, 2010
, 2011
EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
...
...
@@ -49,22 +49,6 @@
#include "tests/data.hh"
template
<
typename
N
>
void
show_connectivity_numbers
(
const
mln
::
image2d
<
bool
>&
ima
,
const
N
&
nbh
)
{
mln
::
extension
::
adjust_duplicate
(
ima
,
nbh
);
mln
::
image2d
<
unsigned
>
when_true
(
ima
.
domain
()),
when_false
(
ima
.
domain
());
mln_piter
(
mln
::
box2d
)
p
(
ima
.
domain
());
for_all
(
p
)
{
when_true
(
p
)
=
connectivity_number_2d
(
ima
,
nbh
.
foreground
(),
p
,
true
);
when_false
(
p
)
=
connectivity_number_2d
(
ima
,
nbh
.
background
(),
p
,
false
);
}
}
bool
skl_ref_
[
22
][
18
]
=
{
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
@@ -106,8 +90,6 @@ int main()
nbh_t
;
nbh_t
nbh
=
make
::
dual_neighb
(
pic
,
c4
(),
c8
());
show_connectivity_numbers
(
pic
,
nbh
);
image2d
<
bool
>
K
(
pic
.
domain
());
data
::
fill
(
K
,
false
);
...
...
@@ -118,9 +100,10 @@ int main()
mln_max
(
int_u8
));
dmap
=
arith
::
revert
(
dmap
);
image2d
<
bool
>
skl
=
morpho
::
skeleton_constrained
(
pic
,
nbh
,
is_simple_2d_t
(),
K
,
dmap
);
image2d
<
bool
>
skl
=
morpho
::
impl
::
generic
::
skeleton_constrained
(
pic
,
nbh
,
mln
::
topo
::
is_simple_2d_t
<
nbh_t
>
(
nbh
),
K
,
dmap
);
image2d
<
bool
>
skl_ref
=
make
::
image
(
skl_ref_
);
mln_assertion
(
skl
==
skl_ref
);
}
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