$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::make Namespace Reference

Functions

template<typename I , typename N >
p_set< typename I::psite > attachment (const Image< I > &ima, const typename I::psite &f, const Neighborhood< N > &nbh)
mln::box1d box1d (unsigned ninds)
mln::box1d box1d (def::coord min_ind, def::coord max_ind)
mln::box2d box2d (unsigned nrows, unsigned ncols)
mln::box2d box2d (def::coord min_row, def::coord min_col, def::coord max_row, def::coord max_col)
mln::box2d_h box2d_h (unsigned nrows, unsigned ncols)
mln::box2d_h box2d_h (def::coord min_row, def::coord min_col, def::coord max_row, def::coord max_col)
mln::box3d box3d (unsigned nslis, unsigned nrows, unsigned ncols)
mln::box3d box3d (def::coord min_sli, def::coord min_row, def::coord min_col, def::coord max_sli, def::coord max_row, def::coord max_col)
template<unsigned D, typename G >
p_set< complex_psite< D, G > > cell (const complex_psite< D, G > &f)
template<typename T , typename U >
util::couple< T, U > couple (const T &val1, const T &val2)
template<typename I , typename N >
p_set< typename I::psite > detachment (const Image< I > &ima, const typename I::psite &f, const Neighborhood< N > &nbh)
template<typename F , unsigned St, unsigned Sf>
neighb< win::multiple
< window2d, F > > 
double_neighb2d (const F &test, bool const (&when_true)[St], bool const (&when_false)[Sf])
mln::dpoint2d_h dpoint2d_h (def::coord row, def::coord col)
template<typename I , typename N >
neighb< win::multiple_size
< 2, mln_window(N), pw::value_
< I > > > 
dual_neighb (const Image< I > &ima, const Neighborhood< N > &nbh_true, const Neighborhood< N > &nbh_false)
template<typename G , typename P >
p_edges< G, pw::cst_< P > > dummy_p_edges (const Graph< G > &g_, const P &dummy_site)
template<typename G >
p_edges< G > dummy_p_edges (const Graph< G > &g)
template<typename G , typename P >
p_vertices< G, pw::cst_< P > > dummy_p_vertices (const Graph< G > &g_, const P &dummy_site)
template<typename G >
p_vertices< G > dummy_p_vertices (const Graph< G > &g)
template<typename V , typename G >
mln::edge_image< void, V, G > edge_image (const Graph< G > &g, const fun::i2v::array< V > &fv)
template<typename FV , typename G >
mln::edge_image< void,
typename FV::result, G > 
edge_image (const Graph< G > &g, const Function_v2v< FV > &fv)
template<typename FP , typename FV , typename G >
mln::edge_image< typename
FP::result, typename
FV::result, G > 
edge_image (const Graph< G > &g_, const Function_v2v< FP > &fp, const Function_v2v< FV > &fv)
template<typename P , typename V , typename G , typename FP , typename FV >
mln::edge_image< typename
FP::result, typename
FV::result, G > 
edge_image (const mln::vertex_image< P, V, G > &v_ima_, const p_edges< G, FP > pe, const Function_vv2v< FV > &fv_)
template<typename P , typename V , typename G , typename FV >
mln::edge_image< void,
typename FV::result, G > 
edge_image (const mln::vertex_image< P, V, G > &v_ima_, const Function_vv2v< FV > &fv_)
template<typename P , typename V , typename G , typename F >
mln::edge_image< void, bool, G > edge_image (const mln::vertex_image< P, V, G > &v_ima_, const Function_v2b< F > &fv_)
template<typename T , unsigned N>
algebra::h_mat< mlc_sqrt_int(N),
T
h_mat (const T(&tab)[N])
template<typename C >
algebra::h_mat< 3, C > h_mat (const C &v, const algebra::quat &q)
template<typename V , unsigned L>
mln::image1d< V > image (V(&values)[L])
template<typename V , unsigned R, unsigned C>
mln::image2d< V > image (V(&values)[R][C])
template<typename V , unsigned S, unsigned R, unsigned C>
mln::image3d< V > image (V(&values)[S][R][C])
template<typename V , unsigned S>
mln::image2d< V > image2d (V(&values)[S])
template<typename I >
mln::image3d< typename I::value > image3d (const util::array< I > &ima)
template<typename I >
mln::image3d< typename I::value > image3d (const Image< I > &ima)
template<typename I , typename N >
util::graph influence_zone_adjacency_graph (const Image< I > &iz, const Neighborhood< N > &nbh, const typename I::value &nlabels)
template<typename I >
mln::labeled_image< I > labeled_image (const Image< I > &ima, const typename I::value &nlabels)
template<unsigned n, unsigned m, typename T >
algebra::mat< n, m, Tmat (const T(&tab)[n *m])
mln::w_window2d_float mk_chamfer_3x3_float (float d10, float d11)
template<int d10, int d11>
mln::w_window2d_int mk_chamfer_3x3_int ()
mln::w_window2d_float mk_chamfer_5x5_float (float d10, float d11, float d21)
template<int d10, int d11, int d21>
mln::w_window2d_int mk_chamfer_5x5_int ()
mln::w_window2d_float mk_chamfer_exact ()
template<unsigned S>
mln::neighb2d neighb2d (bool const (&vals)[S])
template<typename T >
util::ord_pair< Tord_pair (const T &val1, const T &val2)
template<typename W , typename G >
p_edges< G, fun::i2v::array
< util::site_pair< typename
W::site > > > 
p_edges_with_mass_centers (const Image< W > &wst_, const Graph< G > &g_)
template<typename W , typename G >
p_vertices< G, fun::i2v::array
< typename W::site > > 
p_vertices_with_mass_centers (const Image< W > &wst_, const Graph< G > &g_)
template<typename I >
mln::util::pix< I > pix (const Image< I > &ima, const typename I::psite &p)
template<typename I >
mln::pixel< const I > pixel (const Image< I > &ima, const typename I::psite &p)
template<typename I >
mln::pixel< I > pixel (Image< I > &ima, const typename I::psite &p)
mln::point2d_h point2d_h (def::coord row, def::coord col)
template<typename C >
mln::algebra::quat quat (double angle, const mln::algebra::vec< 3, C > &axis)
template<typename I , typename N >
util::couple< util::graph,
typename mln::trait::concrete
< I >::ret
rag_and_labeled_wsl (const Image< I > &wshd_, const Neighborhood< N > &nbh_, const typename I::value &nbasins)
template<typename I , typename N >
util::graph region_adjacency_graph (const Image< I > &wshd_, const Neighborhood< N > &nbh, const typename I::value &nbasins)
template<typename V , typename F >
fun::i2v::array< V > relabelfun (const Function_v2b< F > &fv2b, const V &nlabels, V &new_nlabels)
template<typename V , typename F >
fun::i2v::array< V > relabelfun (const Function_v2v< F > &fv2v, const V &nlabels, V &new_nlabels)
template<typename T >
algebra::vec< 1, Tvec (const T &v_0)
template<typename T >
algebra::vec< 2, Tvec (const T &v_0, const T &v_1)
template<typename T >
algebra::vec< 3, Tvec (const T &v_0, const T &v_1, const T &v_2)
template<typename T >
algebra::vec< 4, Tvec (const T &v_0, const T &v_1, const T &v_2, const T &v_3)
template<typename G , typename FV >
mln::vertex_image< void,
typename FV::result, G > 
vertex_image (const Graph< G > &g, const Function_v2v< FV > &fv)
template<typename FP , typename FV , typename G >
mln::vertex_image< typename
FP::result, typename
FV::result, G > 
vertex_image (const Graph< G > &g_, const Function_v2v< FP > &fp, const Function_v2v< FV > &fv)
template<typename I , typename N >
p_vertices< util::graph,
fun::i2v::array< typename
I::site > > 
voronoi (Image< I > &ima_, Image< I > &orig_, const Neighborhood< N > &nbh)
template<typename W , typename F >
mln::w_window< typename
W::dpsite, typename F::result > 
w_window (const Window< W > &win, const Function_v2v< F > &wei)
template<typename W , unsigned M>
mln::w_window< mln::dpoint1d, W > w_window1d (W(&weights)[M])
template<unsigned M>
mln::w_window1d_int w_window1d_int (int(&weights)[M])
template<typename W , unsigned S>
mln::w_window< mln::dpoint2d, W > w_window2d (W(&weights)[S])
template<unsigned M>
mln::w_window2d_int w_window2d_int (int(&weights)[M])
template<typename W , unsigned M>
mln::w_window< mln::dpoint3d, W > w_window3d (W(&weights)[M])
template<unsigned M>
mln::w_window3d_int w_window3d_int (int(&weights)[M])
template<typename D , typename W , unsigned L>
mln::w_window< D, W > w_window_directional (const Gdpoint< D > &dp, W(&weights)[L])

Variables

neighb< win::multiple
< window2d, bool(*)(A)> > 
double_neighb2d (bool(*test)(A), bool const (&when_true)[St], bool const (&when_false)[Sf])

Detailed Description

Namespace of routines that help to make Milena's objects.

Function Documentation

template<typename I , typename N >
p_set<typename I ::psite> mln::make::attachment ( const Image< I > &  ima,
const typename I::psite &  f,
const Neighborhood< N > &  nbh 
)

Compute the attachment of the cell corresponding to the face f to the image ima.

Parameters
imaThe input image to which the face is attached.
fThe psite corresponding to the attached face.
nbhAn adjacency relationship between faces (should return the set of (n-1)- and (n+1)-faces adjacent to an n-face).
Returns
A set of faces containing the attachment.
Precondition
ima is an image of Boolean values.

We do not use the fomal definition of the attachment here (see couprie.08.pami). We use the following (equivalent) definition: an N-face F in CELL is in the attachment of CELL to IMA if it is adjacent to at least an (N-1)-face or an (N+1)-face that does not belong to CELL.

mln::box1d mln::make::box1d ( unsigned  ninds)

Create an mln::box1d.

Parameters
[in]nindsNumber of indices.
Precondition
ninds != 0 and ncols != 0.
Returns
A 1D box.
mln::box1d mln::make::box1d ( def::coord  min_ind,
def::coord  max_ind 
)

Create an mln::box1d.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]min_indMinimum index.
[in]max_indMaximum index.
Precondition
max_ind >= min_ind.
Returns
A 1D box.
mln::box2d mln::make::box2d ( unsigned  nrows,
unsigned  ncols 
)

Create an mln::box2d.

Parameters
[in]nrowsNumber of rows.
[in]ncolsNumber of columns.
Precondition
nrows != 0 and ncols != 0.
Returns
A 2D box.
mln::box2d mln::make::box2d ( def::coord  min_row,
def::coord  min_col,
def::coord  max_row,
def::coord  max_col 
)

Create an mln::box2d.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]min_rowIndex of the top most row.
[in]min_colIndex of the left most column.
[in]max_rowIndex of the botton most row.
[in]max_colIndex of the right most column.
Precondition
max_row >= min_row and max_col >= min_col.
Returns
A 2D box.
mln::box2d_h mln::make::box2d_h ( unsigned  nrows,
unsigned  ncols 
)

Create an mln::box2d_h.

Parameters
[in]nrowsNumber of rows.
[in]ncolsNumber of columns.
Precondition
nrows != 0 and ncols != 0.
Returns
A 2D_H box.
mln::box2d_h mln::make::box2d_h ( def::coord  min_row,
def::coord  min_col,
def::coord  max_row,
def::coord  max_col 
)

Create an mln::box2d_h.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]min_rowIndex of the top most row.
[in]min_colIndex of the left most column.
[in]max_rowIndex of the botton most row.
[in]max_colIndex of the right most column.
Precondition
max_row >= min_row and max_col >= min_col.
Returns
A 2D_H box.
mln::box3d mln::make::box3d ( unsigned  nslis,
unsigned  nrows,
unsigned  ncols 
)

Create an mln::box3d.

Parameters
[in]nslisNumber of slices.
[in]nrowsNumber of rows.
[in]ncolsNumber of columns.
Precondition
ninds != 0 and ncols != 0 and nslis != 0.
Returns
A 3D box.
mln::box3d mln::make::box3d ( def::coord  min_sli,
def::coord  min_row,
def::coord  min_col,
def::coord  max_sli,
def::coord  max_row,
def::coord  max_col 
)

Create an mln::box3d.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]min_sliIndex of the lowest slice.
[in]min_rowIndex of the top most row.
[in]min_colIndex of the left most column.
[in]max_sliIndex of the highest slice.
[in]max_rowIndex of the botton most row.
[in]max_colIndex of the right most column.
Precondition
max_sli >= min_sli.
max_row >= min_row.
max_col >= min_col.
Returns
A 3D box.
template<unsigned D, typename G >
p_set< complex_psite<D, G> > mln::make::cell ( const complex_psite< D, G > &  f)

Compute the set of faces of the cell corresponding to the face f.

Returns
An mln::p_set of sites (faces) containing the attachment.
template<typename T , typename U >
util::couple<T,U> mln::make::couple ( const T val1,
const T val2 
)

Construct an mln::util::couple on-the-fly.

template<typename I , typename N >
p_set<typename I ::psite> mln::make::detachment ( const Image< I > &  ima,
const typename I::psite &  f,
const Neighborhood< N > &  nbh 
)

Compute the detachment of the cell corresponding to the face f from the image ima.

Parameters
imaThe input image from which the face is to be detached.
fThe psite corresponding to the face to detach.
nbhAn adjacency relationship between faces (should return the set of (n-1)- and (n+1)-faces adjacent to an n-face).
Returns
A set of faces containing the detachment.
Precondition
ima is an image of Boolean values.

We do not use the fomal definition of the detachment here (see couprie.08.pami). We use the following (equivalent) definition: an N-face F in CELL is not in the detachment of CELL from IMA if it is adjacent to at least an (N-1)-face or an (N+1)-face that does not belong to CELL.

Moreover, the term detachment does not correspond to the complex resulting from the collapsing of CELL onto IMA, but the part that is removed, i.e., the detached part CELL - ATTACHMENT. It would be wise to rename this routine to something else, e.g., `detached'.

template<typename F , unsigned St, unsigned Sf>
neighb< win::multiple<window2d, F> > mln::make::double_neighb2d ( const F &  test,
bool const (&)  when_true[St],
bool const (&)  when_false[Sf] 
)
mln::dpoint2d_h mln::make::dpoint2d_h ( def::coord  row,
def::coord  col 
)

Create an mln::dpoint2d_h.

Parameters
[in]rowRow coordinate.
[in]colColumn coordinate.
Returns
A 2D dpoint.
template<typename I , typename N >
neighb< win::multiple_size< 2, mln_window(N), pw::value_<I> > > mln::make::dual_neighb ( const Image< I > &  ima,
const Neighborhood< N > &  nbh_true,
const Neighborhood< N > &  nbh_false 
)
template<typename G , typename P >
p_edges< G, pw::cst_<P> > mln::make::dummy_p_edges ( const Graph< G > &  g_,
const P &  dummy_site 
)

Create a p_edges which associate a graph element to a constant site.

Parameters
[in]g_A graph.
[in]dummy_siteThe dummy site mapped to graph edges.
Returns
A p_edges.
template<typename G >
p_edges<G> mln::make::dummy_p_edges ( const Graph< G > &  g)

Create a p_edges which associate a graph element to a constant site.

0 (int) is used as dummy site.

Parameters
[in]gA graph.
Returns
A p_edges.
template<typename G , typename P >
p_vertices< G, pw::cst_<P> > mln::make::dummy_p_vertices ( const Graph< G > &  g_,
const P &  dummy_site 
)

Create a p_vertices which associate a graph element to a constant site.

Parameters
[in]g_A graph.
[in]dummy_siteThe dummy site mapped to graph vertices.
Returns
A p_vertices.
template<typename G >
p_vertices<G> mln::make::dummy_p_vertices ( const Graph< G > &  g)

Create a p_vertices which associate a graph element to a constant site.

0 (int) is used as dummy site.

Parameters
[in]gA graph.
Returns
A p_vertices.
template<typename V , typename G >
mln::edge_image<void,V,G> mln::make::edge_image ( const Graph< G > &  g,
const fun::i2v::array< V > &  fv 
)

Construct an edge image.

Parameters
[in]gA graph.
[in]fvA function mapping edge ids to values.
Returns
an edge image.
template<typename FV , typename G >
mln::edge_image<void, typename FV ::result, G> mln::make::edge_image ( const Graph< G > &  g,
const Function_v2v< FV > &  fv 
)

Construct an edge image.

Parameters
[in]gA graph.
[in]fvA function mapping edge ids to values.
Returns
an edge image.
template<typename FP , typename FV , typename G >
mln::edge_image<typename FP ::result,typename FV ::result,G> mln::make::edge_image ( const Graph< G > &  g_,
const Function_v2v< FP > &  fp,
const Function_v2v< FV > &  fv 
)

Construct an edge image.

Parameters
[in]g_A graph.
[in]fpA function mapping edge ids to sites.
[in]fvA function mapping edge ids to values.
Returns
an edge image.
template<typename P , typename V , typename G , typename FP , typename FV >
mln::edge_image<typename FP ::result,typename FV ::result,G> mln::make::edge_image ( const mln::vertex_image< P, V, G > &  v_ima_,
const p_edges< G, FP >  pe,
const Function_vv2v< FV > &  fv_ 
)

Construct an edge image.

Parameters
[in]v_ima_A vertex image.
[in]peA p_edges mapping graph elements to sites.
[in]fv_A function mapping two vertex ids to a value. The result is associated to the corresponding edge.
Returns
an edge image.
template<typename P , typename V , typename G , typename FV >
mln::edge_image<void,typename FV ::result,G> mln::make::edge_image ( const mln::vertex_image< P, V, G > &  v_ima_,
const Function_vv2v< FV > &  fv_ 
)

Construct an edge image.

Parameters
[in]v_ima_A vertex image.
[in]fv_A function mapping two vertices' values to a value. The result is associated to the corresponding edge.
Returns
an edge image without localization information mapped to graph elements.
template<typename P , typename V , typename G , typename F >
mln::edge_image<void,bool,G> mln::make::edge_image ( const mln::vertex_image< P, V, G > &  v_ima_,
const Function_v2b< F > &  fv_ 
)

Construct an edge image.

Parameters
[in]v_ima_A vertex image.
[in]fv_A predicate on a vertex's value. The (Boolean) result is associated to the edges adjacent to the vertex.
Returns
an edge image without localization information mapped to graph elements.
template<typename T , unsigned N>
algebra::h_mat<mlc_sqrt_int(N), T> mln::make::h_mat ( const T(&)  tab[N])

Create an mln::algebra::h_mat<n,T>.

template<typename C >
algebra::h_mat<3, C> mln::make::h_mat ( const C &  v,
const algebra::quat &  q 
)

Create a rotation matrix as mln::algebra::h_mat<n,T>.

Parameters
[in]qA quaternion.
Returns
A rotation matrix based on q.
template<typename V , unsigned L>
mln::image1d<V> mln::make::image ( V(&)  values[L])

Create an image1d from an 1D array of values.

Parameters
[in]values1D array.
Returns
A 1D image.
template<typename V , unsigned R, unsigned C>
mln::image2d<V> mln::make::image ( V(&)  values[R][C])

Create an image2d from an 2D array of values.

Parameters
[in]values2D array.
Returns
A 2D image.
template<typename V , unsigned S, unsigned R, unsigned C>
mln::image3d<V> mln::make::image ( V(&)  values[S][R][C])

Create an image3d from an 3D array of values.

Parameters
[in]values3D array.
Returns
A 3D image.
template<typename V , unsigned S>
mln::image2d<V> mln::make::image2d ( V(&)  values[S])

Create an image2d from an 2D array of values.

Parameters
[in]values2D array.
Returns
A 2D image.
template<typename I >
mln::image3d<typename I ::value> mln::make::image3d ( const util::array< I > &  ima)

Create an image3d from an array of 2D images.

template<typename I >
mln::image3d<typename I ::value> mln::make::image3d ( const Image< I > &  ima)

Create an image3d from a 2D image.

template<typename I , typename N >
util::graph mln::make::influence_zone_adjacency_graph ( const Image< I > &  iz,
const Neighborhood< N > &  nbh,
const typename I::value &  nlabels 
)

Create a graph from an influence zone image.

Parameters
[in]izinfluence zone image.
[in]nbhA neighborhood.
[in]nlabelsnumber of influence zone in iz.
Returns
util::graph Graph based on the adjacency of the influence zones.
template<typename I >
mln::labeled_image<I> mln::make::labeled_image ( const Image< I > &  ima,
const typename I::value &  nlabels 
)
template<unsigned n, unsigned m, typename T >
algebra::mat<n,m,T> mln::make::mat ( const T(&)  tab[n *m])

Create an mln::algebra::mat<n,m,T>.

Parameters
[in]tabArray of values.
Precondition
The array dimension has to be n * m.
mln::w_window2d_float mln::make::mk_chamfer_3x3_float ( float  d10,
float  d11 
)
template<int d10, int d11>
mln::w_window2d_int mln::make::mk_chamfer_3x3_int ( )
mln::w_window2d_float mln::make::mk_chamfer_5x5_float ( float  d10,
float  d11,
float  d21 
)
template<int d10, int d11, int d21>
mln::w_window2d_int mln::make::mk_chamfer_5x5_int ( )
mln::w_window2d_float mln::make::mk_chamfer_exact ( )
template<unsigned S>
mln::neighb2d mln::make::neighb2d ( bool const (&)  vals[S])
template<typename T >
util::ord_pair<T> mln::make::ord_pair ( const T val1,
const T val2 
)

Construct an mln::util::ord_pair on-the-fly.

template<typename W , typename G >
p_edges<G, fun::i2v::array<util::site_pair<typename W ::site> > > mln::make::p_edges_with_mass_centers ( const Image< W > &  wst_,
const Graph< G > &  g_ 
)
inline

Construct a p_edges from a watershed image and a region adjacency graph (RAG).

Map each graph edge to a pair of mass centers of two adjacent regions.

Parameters
wst_A watershed image.
g_A region adjacency graph.
Returns
A p_edges.
See Also
edge_image, p_edges, make::region_adjacency_graph
template<typename W , typename G >
p_vertices<G, fun::i2v::array<typename W ::site> > mln::make::p_vertices_with_mass_centers ( const Image< W > &  wst_,
const Graph< G > &  g_ 
)
inline

Construct a p_vertices from a watershed image and a region adjacency graph (RAG).

Map each graph vertex to the mass center of its corresponding region.

Parameters
wst_A watershed image.
g_A region adjacency graph.
Returns
A p_vertices.
See Also
edge_image, vertex_image, p_vertices, p_edges, make::region_adjacency_graph
template<typename I >
mln::util::pix<I> mln::make::pix ( const Image< I > &  ima,
const typename I::psite &  p 
)

Create an mln::util::pix from an image ima and a psite p.

Parameters
[in]imaThe input image.
[in]pThe point site.
Returns
An mln::util::pix.
template<typename I >
mln::pixel<const I> mln::make::pixel ( const Image< I > &  ima,
const typename I::psite &  p 
)

Create a mln::pixel from a constant image ima and a point p.

template<typename I >
mln::pixel<I> mln::make::pixel ( Image< I > &  ima,
const typename I::psite &  p 
)

Create a mln::pixel from a mutable image ima and a point p.

mln::point2d_h mln::make::point2d_h ( def::coord  row,
def::coord  col 
)

Create an mln::point2d_h.

Parameters
[in]rowRow coordinate.
[in]colColumn coordinate.
Returns
A 2D point.
template<typename C >
mln::algebra::quat mln::make::quat ( double  angle,
const mln::algebra::vec< 3, C > &  axis 
)
template<typename I , typename N >
util::couple<util::graph,typename mln::trait::concrete< I >::ret> mln::make::rag_and_labeled_wsl ( const Image< I > &  wshd_,
const Neighborhood< N > &  nbh_,
const typename I::value &  nbasins 
)

Create a region adjacency graph and a label image of the watershed line from a watershed image.

Parameters
[in]wshd_Watershed image.
[in]nbh_Neighborhood
[in]nbasinsNumber of influence zone in wshd.
Returns
A couple. First element is the graph, second element is an image with a labeled watershed line.
      |-----------------|                     |-----------------|
      | 1 1 1 0 2 2 0 3 |                     | . . . 1 . . 2 . |
      | 1 1 0 2 2 2 0 3 |                     | . . 1 . . . 2 . |
      | 1 0 4 0 2 0 3 3 |           ---->     | . 1 . 3 . 4 . . |
      | 0 4 4 4 0 5 0 3 |                     | 1 . . . 5 . 6 . |
      |-----------------|                     |-----------------|

        Watershed image                       Labeled watershed line
 (watershed line labeled with 0)


                |
                |
                |
                v

          1 -- 2 - 3
           \  /   /
            4 -- 5

    Region Adjacency graph (RAG)
template<typename I , typename N >
util::graph mln::make::region_adjacency_graph ( const Image< I > &  wshd_,
const Neighborhood< N > &  nbh,
const typename I::value &  nbasins 
)

Create a region adjacency graph from a watershed image.

Parameters
[in]wshd_watershed image.
[in]nbhA neighborhood.
[in]nbasinsnumber of influence zone in wshd.
Returns
util::graph Graph based on the adjacency of the influence zones.
template<typename V , typename F >
fun::i2v::array<V> mln::make::relabelfun ( const Function_v2b< F > &  fv2b,
const V &  nlabels,
V &  new_nlabels 
)

Create a i2v function from a v2b function.

This function can be used to relabel a labeled image.

Parameters
[in]fv2bA v2b function.
[in]nlabelsThe number of labels.
[in]new_nlabelsThe number of labels after relabeling.
Returns
a i2v function.
See Also
mln::labeling::relabel
template<typename V , typename F >
fun::i2v::array<V> mln::make::relabelfun ( const Function_v2v< F > &  fv2v,
const V &  nlabels,
V &  new_nlabels 
)

Create a i2v function from a v2v function.

This function can be used to relabel a labeled image.

Parameters
[in]fv2vA v2v function. This function maps an id to an already existing one.
[in]nlabelsThe number of labels.
[in]new_nlabelsThe number of labels after relabeling.
Returns
a i2v function.
See Also
mln::labeling::relabel
template<typename T >
algebra::vec<1, T> mln::make::vec ( const T v_0)

Create an mln::algebra::vec<n,T>.

Parameters
[in]v_0First coordinate.
Returns
A 1D vector.
template<typename T >
algebra::vec<2, T> mln::make::vec ( const T v_0,
const T v_1 
)

Create an mln::algebra::vec<2,T>.

Parameters
[in]v_0First coordinate.
[in]v_1Second coordinate.
Returns
A 2D vector.
template<typename T >
algebra::vec<3, T> mln::make::vec ( const T v_0,
const T v_1,
const T v_2 
)

Create an mln::algebra::vec<3,T>.

Parameters
[in]v_0First coordinate.
[in]v_1Second coordinate.
[in]v_2Third coordinate.
Returns
A 3D vector.
template<typename T >
algebra::vec<4, T> mln::make::vec ( const T v_0,
const T v_1,
const T v_2,
const T v_3 
)

Create an mln::algebra::vec<4,T>.

Parameters
[in]v_0First coordinate.
[in]v_1Second coordinate.
[in]v_2Third coordinate.
[in]v_3Fourth coordinate.
Returns
A 4D vector.
template<typename G , typename FV >
mln::vertex_image<void,typename FV ::result,G> mln::make::vertex_image ( const Graph< G > &  g,
const Function_v2v< FV > &  fv 
)

Construct a vertex image.

Parameters
[in]gA graph.
[in]fvA function mapping vertex ids to values.
Returns
A vertex image.
template<typename FP , typename FV , typename G >
mln::vertex_image<typename FP ::result,typename FV ::result,G> mln::make::vertex_image ( const Graph< G > &  g_,
const Function_v2v< FP > &  fp,
const Function_v2v< FV > &  fv 
)

Construct a vertex image.

Parameters
[in]g_A graph.
[in]fpA function mapping vertex ids to sites.
[in]fvA function mapping vertex ids to values.
Returns
A vertex image.
template<typename I , typename N >
p_vertices<util::graph, fun::i2v::array<typename I ::site> > mln::make::voronoi ( Image< I > &  ima_,
Image< I > &  orig_,
const Neighborhood< N > &  nbh 
)

Apply the Voronoi algorithm on ima_ with the original image orig_ for node computing with neighborhood nbh.

Parameters
[in]ima_The labeling image.
[in]orig_The original image.
[in]nbhThe neighborhood for computing algorithm.
Returns
The computed graph.
template<typename W , typename F >
mln::w_window<typename W ::dpsite, typename F ::result> mln::make::w_window ( const Window< W > &  win,
const Function_v2v< F > &  wei 
)

Create a mln::w_window from a window and a weight function.

Parameters
[in]winA simple window.
[in]weiA weight function.
Returns
A weighted window.
template<typename W , unsigned M>
mln::w_window<mln::dpoint1d, W> mln::make::w_window1d ( W(&)  weights[M])

Create a 1D mln::w_window from an array of weights.

Parameters
[in]weightsArray.
Precondition
The array size, M, has to be a square of an odd integer.
Returns
A 1D weighted window.
template<unsigned M>
mln::w_window1d_int mln::make::w_window1d_int ( int(&)  weights[M])

Create a mln::w_window1d_int.

Parameters
[in]weightsArray of integers.
Precondition
The array size, M, has to be a square of an odd integer.
Returns
A 1D int-weighted window.
template<typename W , unsigned S>
mln::w_window<mln::dpoint2d, W> mln::make::w_window2d ( W(&)  weights[S])

Create a 2D mln::w_window from an array of weights.

Parameters
[in]weightsArray.
Precondition
The array size, S, has to be a square of an odd integer.
Returns
A 2D weighted window.
template<unsigned M>
mln::w_window2d_int mln::make::w_window2d_int ( int(&)  weights[M])

Create a mln::w_window2d_int.

Parameters
[in]weightsArray of integers.
Precondition
The array size, M, has to be a square of an odd integer.
Returns
A 2D int-weighted window.
template<typename W , unsigned M>
mln::w_window<mln::dpoint3d, W> mln::make::w_window3d ( W(&)  weights[M])

Create a 3D mln::w_window from an array of weights.

Parameters
[in]weightsArray.
Precondition
The array size, M, has to be a cube of an odd integer.
Returns
A 3D weighted window.
template<unsigned M>
mln::w_window3d_int mln::make::w_window3d_int ( int(&)  weights[M])

Create a mln::w_window3d_int.

Parameters
[in]weightsArray of integers.
Precondition
The array size, M, has to be a cube of an odd integer.
Returns
A 3D int-weighted window.
template<typename D , typename W , unsigned L>
mln::w_window<D,W> mln::make::w_window_directional ( const Gdpoint< D > &  dp,
W(&)  weights[L] 
)

Create a directional centered weighted window.

Parameters
[in]dpA delta-point to set the orientation.
[in]weightsAn array of weights.
Returns
A weighted window.

The window length L has to be odd.

Variable Documentation

neighb< win::multiple<window2d, bool(*)(A)> > mln::make::double_neighb2d(bool(*test)(A), bool const (&when_true)[St], bool const (&when_false)[Sf])

Definition at line 49 of file double_neighb2d.hh.