Functions | Variables

mln::convert Namespace Reference

Namespace of conversion routines. More...

Functions

template<typename V >
void from_to (const float &from, Value< V > &to)
 Conversion of a float from towards a value to.
template<typename V >
void from_to (const int &from, Value< V > &to)
 Conversion of a int from towards a value to.
template<typename V >
void from_to (const double &from, Value< V > &to)
 Conversion of a double from towards a value to.
template<typename V >
void from_to (const unsigned &from, Value< V > &to)
 Conversion of an unsigned from towards a value to.
template<typename S >
 mln_image_from_grid (typename S::site::grid, bool) to_image(const Site_Set< S > &pset
 Convert a point set pset into a binary image.
template<typename W >
 mln_image_from_grid (typename W::site::grid, bool) to_image(const Window< W > &win)
 Convert a window win into a binary image.
template<typename W >
 mln_image_from_grid (typename W::site::grid, mln_weight(W)) to_image(const Weighted_Window< W > &w_win)
 Convert a weighted window w_win into an image.
template<typename N >
 mln_image_from_grid (typename N::site::grid, bool) to_image(const Neighborhood< N > &nbh)
 Convert a neighborhood nbh into a binary image.
template<typename N >
 mln_window (N) to_window(const Neighborhood< N > &nbh)
 Convert a neighborhood nbh into a window.
template<typename T , typename O >
to (const O &from)
 Conversion of the object from towards an object with type T.
template<typename P >
P::dpoint to_dpoint (const Point_Site< P > &p)
 Convert a point site p into a delta-point.
template<typename I >
pw::value_< I > to_fun (const Image< I > &ima)
 Convert an image into a function.
template<typename T >
image1d< unsigned > to_image (const histo::array< T > &h)
 Convert an histo h into an image1d<unsigned>.
template<typename I >
p_array< typename I::psite > to_p_array (const Image< I > &img)
 Convert an image img into a p_array.
template<typename S >
p_array< typename S::psite > to_p_array (const Site_Set< S > &pset)
 Convert a point set pset into a p_array (point set vector).
template<typename W >
p_array< typename W::psite > to_p_array (const Window< W > &win, const typename W::psite &p)
 Convert a window win centered at point p into a p_array (point set vector).
template<typename N >
p_set< typename N::psite > to_p_set (const Neighborhood< N > &nbh)
 Convert a neighborhood nbh into a site set.
template<typename I >
p_set< typename I::psite > to_p_set (const Image< I > &ima)
 Convert a binary image ima into a site set.
template<typename P , typename C >
p_set< P > to_p_set (const std::set< P, C > &s)
 Convert an std::set s of sites into a site set.
template<typename S >
p_set< typename S::psite > to_p_set (const Site_Set< S > &ps)
 Convert any site set ps into a 'mlnp_set' site set.
template<typename W >
p_set< typename W::psite > to_p_set (const Window< W > &win)
 Convert a Window win into a site set.
template<typename I >
QImage to_qimage (const Image< I > &ima)
 Convert a Milena image to a Qimage.
template<typename N >
window< typename N::dpoint > to_upper_window (const Neighborhood< N > &nbh)
 Convert a neighborhood nbh into an upper window.
template<typename W >
window< typename W::dpsite > to_upper_window (const Window< W > &win)
 Convert a window nbh into an upper window.
template<typename D , typename C >
window< D > to_window (const std::set< D, C > &s)
 Convert an std::set s of delta-sites into a window.
template<typename I >
window< typename I::site::dpsite > to_window (const Image< I > &ima)
 Convert a binary image ima into a window.
template<typename S >
window< typename S::site::dpsite > to_window (const Site_Set< S > &pset)
 Convert a site set pset into a window.

Variables

fun::C< R(*)(A)> to_fun (R(*f)(A))
 Convert a C unary function into an mln::fun::C.

Detailed Description

Namespace of conversion routines.


Function Documentation

template<typename V >
void mln::convert::from_to ( const float &  from,
Value< V > &  to 
)

Conversion of a float from towards a value to.

template<typename V >
void mln::convert::from_to ( const int &  from,
Value< V > &  to 
)

Conversion of a int from towards a value to.

template<typename V >
void mln::convert::from_to ( const double &  from,
Value< V > &  to 
)

Conversion of a double from towards a value to.

template<typename V >
void mln::convert::from_to ( const unsigned &  from,
Value< V > &  to 
)

Conversion of an unsigned from towards a value to.

template<typename S >
mln::convert::mln_image_from_grid ( typename S::site::grid  ,
bool   
) const [inline]

Convert a point set pset into a binary image.

Width of the converted image will be pset.bbox + 2 * border.

template<typename W >
mln::convert::mln_image_from_grid ( typename W::site::grid  ,
bool   
) const

Convert a window win into a binary image.

template<typename W >
mln::convert::mln_image_from_grid ( typename W::site::grid  ,
mln_weight(W)   
) const

Convert a weighted window w_win into an image.

template<typename N >
mln::convert::mln_image_from_grid ( typename N::site::grid  ,
bool   
) const

Convert a neighborhood nbh into a binary image.

template<typename N >
mln::convert::mln_window (  )  const [inline]

Convert a neighborhood nbh into a window.

Definition at line 74 of file to_window.hh.

template<typename T , typename O >
T mln::convert::to ( const O &  from  )  [inline]

Conversion of the object from towards an object with type T.

Definition at line 63 of file to.hh.

References mln::mln_exact().

Referenced by mln::make_debug_graph_image().

template<typename P >
P::dpoint mln::convert::to_dpoint ( const Point_Site< P > &  p  )  [inline]

Convert a point site p into a delta-point.

Definition at line 52 of file to_dpoint.hh.

template<typename I >
pw::value_<I> mln::convert::to_fun ( const Image< I > &  ima  ) 

Convert an image into a function.

Definition at line 64 of file to_fun.hh.

template<typename T >
image1d<unsigned> mln::convert::to_image ( const histo::array< T > &  h  ) 

Convert an histo h into an image1d<unsigned>.

template<typename I >
p_array< typename I::psite > mln::convert::to_p_array ( const Image< I > &  img  )  [inline]

Convert an image img into a p_array.

Definition at line 98 of file to_p_array.hh.

References mln::p_array< P >::append().

template<typename S >
p_array< typename S::psite > mln::convert::to_p_array ( const Site_Set< S > &  pset  )  [inline]

Convert a point set pset into a p_array (point set vector).

Definition at line 68 of file to_p_array.hh.

References mln::p_array< P >::append().

template<typename W >
p_array< typename W::psite > mln::convert::to_p_array ( const Window< W > &  win,
const typename W::psite &  p 
) [inline]

Convert a window win centered at point p into a p_array (point set vector).

Definition at line 82 of file to_p_array.hh.

References mln::p_array< P >::append(), and mln::p_array< P >::reserve().

template<typename N >
p_set< typename N::psite > mln::convert::to_p_set ( const Neighborhood< N > &  nbh  )  [inline]

Convert a neighborhood nbh into a site set.

Definition at line 83 of file to_p_set.hh.

References mln::p_set< P >::insert().

template<typename I >
p_set< typename I::psite > mln::convert::to_p_set ( const Image< I > &  ima  )  [inline]

Convert a binary image ima into a site set.

Definition at line 97 of file to_p_set.hh.

References mln::p_set< P >::insert().

template<typename P , typename C >
p_set< P > mln::convert::to_p_set ( const std::set< P, C > &  s  )  [inline]

Convert an std::set s of sites into a site set.

C is the comparison functor.

Definition at line 130 of file to_p_set.hh.

References mln::p_set< P >::insert().

template<typename S >
p_set< typename S::psite > mln::convert::to_p_set ( const Site_Set< S > &  ps  )  [inline]

Convert any site set ps into a 'mlnp_set' site set.

Definition at line 144 of file to_p_set.hh.

References mln::p_set< P >::insert().

template<typename W >
p_set< typename W::psite > mln::convert::to_p_set ( const Window< W > &  win  )  [inline]

Convert a Window win into a site set.

Definition at line 117 of file to_p_set.hh.

References mln::p_set< P >::insert().

template<typename I >
QImage mln::convert::to_qimage ( const Image< I > &  ima  )  [inline]

Convert a Milena image to a Qimage.

Definition at line 279 of file to_qimage.hh.

template<typename N >
window< typename N::dpoint > mln::convert::to_upper_window ( const Neighborhood< N > &  nbh  )  [inline]

Convert a neighborhood nbh into an upper window.

Definition at line 82 of file to_upper_window.hh.

References mln::window< D >::insert().

template<typename W >
window< typename W::dpsite > mln::convert::to_upper_window ( const Window< W > &  win  )  [inline]

Convert a window nbh into an upper window.

Definition at line 67 of file to_upper_window.hh.

References mln::window< D >::insert().

template<typename D , typename C >
window< D > mln::convert::to_window ( const std::set< D, C > &  s  )  [inline]

Convert an std::set s of delta-sites into a window.

Definition at line 128 of file to_window.hh.

References mln::window< D >::insert().

template<typename I >
window< typename I::site::dpsite > mln::convert::to_window ( const Image< I > &  ima  )  [inline]

Convert a binary image ima into a window.

Definition at line 94 of file to_window.hh.

References mln::window< D >::insert().

Referenced by to_window().

template<typename S >
window< typename S::site::dpsite > mln::convert::to_window ( const Site_Set< S > &  pset  )  [inline]

Convert a site set pset into a window.

Definition at line 117 of file to_window.hh.

References to_window().


Variable Documentation

pw::value_< I > mln::convert::to_fun [inline]

Convert a C unary function into an mln::fun::C.

Definition at line 45 of file to_fun.hh.