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

Functions

template<typename G , typename L >
void find_graph_link (Graph< G > &g_, const component_set< L > &comps, unsigned current_comp, int dmax, const typename L::site &c)
template<typename F >
mln::util::couple< bool,
typename scribo_support_(F)::site
find_link (Link_Functor< F > &functor, unsigned current_object, anchor::Type anchor)
template<typename L >
unsigned find_root (object_groups< L > &parent, unsigned x)
bool have_link_valid (const mln::util::array< unsigned > &left_link, const mln::util::array< unsigned > &right_link, unsigned i)
template<typename L >
bool is_link_valid (const object_links< L > &left_link, const object_links< L > &right_link, unsigned i)
template<typename I , typename J >
mln::trait::concrete< I >::ret rd (const Image< I > &ima, const Image< J > &constraint)
template<typename I , typename G >
void update_graph_link (const Image< I > &lbl_, Graph< G > &g_, const typename I::site &p, const typename I::site &c, unsigned i, int dmax)

Detailed Description

Namespace of internal routines grouping text components.

Function Documentation

template<typename G , typename L >
void scribo::primitive::internal::find_graph_link ( Graph< G > &  g_,
const component_set< L > &  comps,
unsigned  current_comp,
int  dmax,
const typename L::site &  c 
)

Find a neighbor of a component in a specific range if it exists.

Parameters
g_The link graph.
compsA component set.
current_compThe current line being processed.
dmaxThe maximum lookup distance.
cStart point of the neighbor lookup.
template<typename F >
mln::util::couple<bool, typename scribo_support_(F) ::site> scribo::primitive::internal::find_link ( Link_Functor< F > &  functor,
unsigned  current_object,
anchor::Type  anchor 
)

Find the neighbor of a line of text if exists.

Parameters
[in,out]functorFunctor used to compute the links. Stores the results.
[in]current_objectCurrent object id.
[in]anchorThe lookup anchor.
Returns
A couple. The first argument tells whether a valid link has been found, the second one is link anchor if exists.
template<typename L >
unsigned scribo::primitive::internal::find_root ( object_groups< L > &  parent,
unsigned  x 
)

Find root in a parent array arrays.

bool scribo::primitive::internal::have_link_valid ( const mln::util::array< unsigned > &  left_link,
const mln::util::array< unsigned > &  right_link,
unsigned  i 
)

Tells whether a component have at least one valid link link.

Parameters
[in]left_linkLeft link of components.
[in]right_linkRight link of components.
[in]iThe component id.
Returns
True if the i-th component has at least one valid link.
template<typename L >
bool scribo::primitive::internal::is_link_valid ( const object_links< L > &  left_link,
const object_links< L > &  right_link,
unsigned  i 
)

Validate a link from two different links.

Parameters
[in]left_linkLeft link of components.
[in]right_linkRight link of components.
[in]iThe component id.
Returns
True if the link is between the i-th component
template<typename I , typename J >
mln::trait::concrete< I >::ret scribo::primitive::internal::rd ( const Image< I > &  ima,
const Image< J > &  constraint 
)

Tolerant constrained reconstruction algorithm.

template<typename I , typename G >
void scribo::primitive::internal::update_graph_link ( const Image< I > &  lbl_,
Graph< G > &  g_,
const typename I::site &  p,
const typename I::site &  c,
unsigned  i,
int  dmax 
)

Update graph edges if a valid neighbor is found.

Parameters
[in]lbl_A label image.
[in]g_A graph.
[in]pA site of lbl_.
[in]cA site of lbl_.
[in]iA vertex id.
[in]dmaxThe maximum distance allowed to look for a neighbor.