oln::lrde::ufmt::naive_generic_salembier< I > Struct Template Reference

A more generic version of Salembier's algorithm. More...

#include <naive_generic_salembier.hh>

Collaboration diagram for oln::lrde::ufmt::naive_generic_salembier< I >:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { not_analyzed = MAXINT - 2, in_the_queue = MAXINT - 1 }
typedef mlc::exact< I >::ret::point_type point
typedef mlc::exact< I >::ret::value_type value
typedef oln::lrde::ufmt::internal::neighborhood<
I >::ret 
Nbh
typedef mlc::exact< Nbh
>::ret::iter_type 
niter
typedef std::set< value, std::greater<
value > > 
levels_t
typedef levels_t::const_iterator level_iterator
typedef std::pair< unsigned,
value
pair_t

Public Member Functions

 naive_generic_salembier (const abstract::image< I > &f, const typename oln::lrde::ufmt::internal::neighborhood< I >::ret &nbh)
void go ()
void init ()
level_iterator flood (value h)
unsigned n_level_roots () const
template<typename Key, typename Data, typename Compare, typename Alloc>
Data get (const std::map< Key, Data, Compare, Alloc > &map, const Key &key, const Data &default_val) const

Public Attributes

const I & f
const Nbhnbh
mute< I, int >::ret status
size_t nvalues
std::map< value, unsigned > number_nodes
std::set< valuenode_at_level
naive_generic_hqueue_t< value,
point
hqueue
value h_min
levels_t levels
std::map< pair_t, pair_tfather

Detailed Description

template<class I>
struct oln::lrde::ufmt::naive_generic_salembier< I >

A more generic version of Salembier's algorithm.

Like basic_salembier, but working on a larger set of image types (basic_salembier is faster, but works only on images of unsigned integers).

Definition at line 117 of file naive_generic_salembier.hh.


Member Function Documentation

template<class I>
template<typename Key, typename Data, typename Compare, typename Alloc>
Data oln::lrde::ufmt::naive_generic_salembier< I >::get ( const std::map< Key, Data, Compare, Alloc > &  map,
const Key &  key,
const Data &  default_val 
) const [inline]

An alternative to std::map::operator[] handling non existent keys (using default_val).

Definition at line 248 of file naive_generic_salembier.hh.

Referenced by oln::lrde::ufmt::naive_generic_salembier< I >::flood().

00250         {
00251           typename std::map<Key, Data, Compare, Alloc>::const_iterator n =
00252             map.find(key);
00253           if (n != map.end())
00254             return n->second;
00255           else
00256             return default_val;
00257         }


The documentation for this struct was generated from the following file:
Generated on Tue Feb 20 20:27:56 2007 for Olena by  doxygen 1.5.1