Namespace of graph related routines.
More...
Functions |
template<typename G , typename F > |
F::result | compute (const Graph< G > &g_, F &functor) |
| Base routine to compute attributes on a graph.
|
template<typename I , typename N , typename L > |
mln::trait::ch_value< I, L >::ret | labeling (const Image< I > &graph_image_, const Neighborhood< N > &nbh_, L &nlabels) |
| Label graph components.
|
template<typename I , typename M > |
graph_elt_neighborhood_if
< mln_graph(I), typename
I::domain_t, M > | to_neighb (const Image< I > &graph_image_, const Image< M > &graph_mask_image_) |
| Make a custom graph neighborhood from a mask image.
|
template<typename I , typename M > |
graph_elt_window_if< mln_graph(I),
typename I::domain_t, M > | to_win (const Image< I > &graph_image_, const Image< M > &graph_mask_image_) |
| Make a custom graph window from a mask image.
|
Detailed Description
Namespace of graph related routines.
Function Documentation
template<typename G , typename F >
F::result mln::graph::compute |
( |
const Graph< G > & |
g_, |
|
|
F & |
functor | |
|
) |
| | |
Base routine to compute attributes on a graph.
- Parameters:
-
[in] | g_ | A graph. |
[in] | functor | A functor implementing the right interface. |
- Returns:
- The computed data.
- See also:
- canvas::browsing::depth_first_search
template<typename I , typename N , typename L >
mln::trait::ch_value< I, L >::ret mln::graph::labeling |
( |
const Image< I > & |
graph_image_, |
|
|
const Neighborhood< N > & |
nbh_, |
|
|
L & |
nlabels | |
|
) |
| | |
Label graph components.
Vertex with id 0, usuallly used to represent the background component, will be labeled with an id different from 0. Therefore, the labeling starts from 1.
- Parameters:
-
[in] | graph_image_ | A graph image ( |
- See also:
- vertex_image, edge_image).
- Parameters:
-
[in] | nbh_ | A graph neighborhood. |
[in,out] | nlabels | The number of labels found. |
- Returns:
- a Graph image of labels.
References mln::labeling::blobs(), mln::data::fill(), and mln::initialize().
template<typename I , typename M >
graph_elt_neighborhood_if< mln_graph(I), typename I::domain_t, M > mln::graph::to_neighb |
( |
const Image< I > & |
graph_image_, |
|
|
const Image< M > & |
graph_mask_image_ | |
|
) |
| | |
Make a custom graph neighborhood from a mask image.
- Parameters:
-
[in] | graph_image_ | A graph image ( |
- See also:
- vertex_image and edge_image).
- Parameters:
-
[in] | graph_mask_image_ | A graph image of bool used as a mask. |
- Returns:
- A masked neighborhood on graph.
template<typename I , typename M >
graph_elt_window_if< mln_graph(I), typename I::domain_t, M > mln::graph::to_win |
( |
const Image< I > & |
graph_image_, |
|
|
const Image< M > & |
graph_mask_image_ | |
|
) |
| | |
Make a custom graph window from a mask image.
- Parameters:
-
[in] | graph_image_ | A graph image ( |
- See also:
- vertex_image and edge_image).
- Parameters:
-
[in] | graph_mask_image_ | A graph image of bool used as a mask. |
- Returns:
- A masked window on graph.