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

Salembier's algorithm -- Version for images of unsigned integers. More...

#include <basic_salembier.hh>

Collaboration diagram for oln::lrde::ufmt::basic_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::pair< unsigned,
unsigned > 
pair_t

Public Member Functions

 basic_salembier (const abstract::image< I > &f, const typename oln::lrde::ufmt::internal::neighborhood< I >::ret &nbh)
void go ()
void init ()
int flood (int h)
unsigned n_level_roots () const

Public Attributes

const I & f
const Nbhnbh
mute< I, int >::ret status
size_t nvalues
unsigned * number_nodes
bool * node_at_level
hqueue_t< pointhqueue
int h_min
std::map< pair_t, pair_tfather

Detailed Description

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

Salembier's algorithm -- Version for images of unsigned integers.

The (corrected) algorithm, as written in the original article, is as follows:


            flood (h)
   
              while not hqueue-empty (h)
                p <- hqueue-first (h)
                STATUS(p) <- number-nodes (h)
                for every neighbor q of p
                  if STATUS(q) == "Not analyzed"
                    hqueue-add(ORI(q), q)
                    STATUS(q) <- "In the queue"
                    node-at-level(ORI(q)) <- true
                    if (ORI(q) > ORI(p))
                      m = ORI(q)
                      repeat
                        m <- flood(m)
                      until m <= h
              number-nodes(h) <- number-nodes(h) + 1
   
              m <- h - 1
              while m >= 0 and node-at-level(m) == false
                m <- m - 1
              i <- number-nodes(h) - 1
              if m >= 0
                j <- number-nodes(m)
                father of C(i, h) <- node C(j, m)
              else
                C(i, h) has no father		// C(i, h) is root node.
              node-at-level(h) <- false
              return m

          

salembier.98.itip.

Definition at line 164 of file basic_salembier.hh.


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