Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::OneWayEquivalencyTable Class Reference
[Watershed-based Segmentation Filters]

#include <itkOneWayEquivalencyTable.h>

Inheritance diagram for itk::OneWayEquivalencyTable:

Inheritance graph
[legend]
Collaboration diagram for itk::OneWayEquivalencyTable:

Collaboration graph
[legend]
List of all members.

Detailed Description

Hash table to manage integral label equivalencies that are order dependent.

OneWayEquivalencyTable is a variation on itk::EquivalencyTable that preserves the order of equivalencies. For example, the entries { 5 = 4 } and {4 = 5} are not equivalent in this table, yet are the treated as the same entry in EquivalencyTable. Because of the one-way logic of the table, reflexive equivalencies will result in cycling from recursive lookups or flattening of the table. The responsibility is on the user for preventing recursive cycling.

See itk::EquivalencyTable for more information
See also:
EquivalencyTable

Definition at line 47 of file itkOneWayEquivalencyTable.h.

Public Types

typedef HashTableType::const_iterator ConstIterator
typedef SmartPointer< const
Self
ConstPointer
typedef itk::hash_map< unsigned
long, unsigned long, itk::hash<
unsigned long > > 
HashTableType
typedef HashTableType::iterator Iterator
typedef SmartPointer< SelfPointer
typedef DataObject Superclass
typedef HashTableType::value_type ValueType

Public Member Functions

bool Add (unsigned long a, unsigned long b)
Iterator Begin ()
void Clear ()
bool Empty () const
Iterator End ()
void Erase (const unsigned long a)
void Flatten ()
virtual const char * GetNameOfClass () const
Returns TRUE if the label
is found in the table and
FALSE is the *label is not
found in the table *bool 
IsEntry (const unsigned long a) const
Lookup an equivalency in the
table If no entry is found
in the the method returns
its the value of the argument
Does *not recursively descent
through equivalencies *unsigned
long 
Lookup (const unsigned long a) const
unsigned long RecursiveLookup (const unsigned a) const

Static Public Member Functions

static Pointer New ()

Public Attributes

Standard typedefs and smart
pointer declarations *typedef
OneWayEquivalencyTable 
Self
Lookup an equivalency in the
table If no entry is found
in the * 
table

Protected Member Functions

 OneWayEquivalencyTable (const Self &)
 OneWayEquivalencyTable ()
void operator= (const Self &)
void PrintSelf (std::ostream &os, Indent indent) const
virtual ~OneWayEquivalencyTable ()

Protected Attributes

HashTableType m_HashMap


Member Typedef Documentation

typedef HashTableType::const_iterator itk::OneWayEquivalencyTable::ConstIterator
 

Definition at line 63 of file itkOneWayEquivalencyTable.h.

typedef SmartPointer<const Self> itk::OneWayEquivalencyTable::ConstPointer
 

Definition at line 54 of file itkOneWayEquivalencyTable.h.

typedef itk::hash_map<unsigned long, unsigned long, itk::hash<unsigned long> > itk::OneWayEquivalencyTable::HashTableType
 

Define the container type for this table

Definition at line 56 of file itkOneWayEquivalencyTable.h.

typedef HashTableType::iterator itk::OneWayEquivalencyTable::Iterator
 

Definition at line 62 of file itkOneWayEquivalencyTable.h.

typedef SmartPointer<Self> itk::OneWayEquivalencyTable::Pointer
 

Definition at line 53 of file itkOneWayEquivalencyTable.h.

typedef DataObject itk::OneWayEquivalencyTable::Superclass
 

Definition at line 52 of file itkOneWayEquivalencyTable.h.

typedef HashTableType::value_type itk::OneWayEquivalencyTable::ValueType
 

Definition at line 64 of file itkOneWayEquivalencyTable.h.


Constructor & Destructor Documentation

itk::OneWayEquivalencyTable::OneWayEquivalencyTable  )  [inline, protected]
 

Convenience method for debugging.

Definition at line 130 of file itkOneWayEquivalencyTable.h.

virtual itk::OneWayEquivalencyTable::~OneWayEquivalencyTable  )  [inline, protected, virtual]
 

Definition at line 131 of file itkOneWayEquivalencyTable.h.

itk::OneWayEquivalencyTable::OneWayEquivalencyTable const Self  )  [protected]
 


Member Function Documentation

bool itk::OneWayEquivalencyTable::Add unsigned long  a,
unsigned long  b
 

Insert an equivalency into the table. A return value of TRUE indicates that the equivalency did not previously exist in the table and was successfully added. A FALSE return value indicates that the equivalency was not added to the table because a conflict with an existing entry occurred (most likely, the equivalency was already recorded directly or indirectly).

Iterator itk::OneWayEquivalencyTable::Begin void   )  [inline]
 

Returns an iterator pointing to the first element of the (unordered) table.

Definition at line 120 of file itkOneWayEquivalencyTable.h.

void itk::OneWayEquivalencyTable::Clear  )  [inline]
 

Erases all the entries in the table.

Definition at line 111 of file itkOneWayEquivalencyTable.h.

bool itk::OneWayEquivalencyTable::Empty  )  const [inline]
 

Returns TRUE if the table is empty, FALSE if it is not empty.

Definition at line 115 of file itkOneWayEquivalencyTable.h.

Iterator itk::OneWayEquivalencyTable::End void   )  [inline]
 

Returns and iterator pointing to one position past the last element of the (unordered) table.

Definition at line 124 of file itkOneWayEquivalencyTable.h.

void itk::OneWayEquivalencyTable::Erase const unsigned long  a  )  [inline]
 

Erases the entry with key a.

Definition at line 107 of file itkOneWayEquivalencyTable.h.

void itk::OneWayEquivalencyTable::Flatten  ) 
 

``Flattens'' the equivalency table by eliminating all redundant and recursive equivalencies. I.e. the set { 2=1; 3=2; 4=3 } is converted to {4=1; 3=1; 2=1}.

virtual const char* itk::OneWayEquivalencyTable::GetNameOfClass  )  const [virtual]
 

Returns TRUE if the label is found in the table and FALSE is the* label is not found in the table* bool itk::OneWayEquivalencyTable::IsEntry const unsigned long  a  )  const [inline]
 

Definition at line 99 of file itkOneWayEquivalencyTable.h.

Lookup an equivalency in the table If no entry is found in the the method returns its the value of the argument Does* not recursively descent through equivalencies* unsigned long itk::OneWayEquivalencyTable::Lookup const unsigned long  a  )  const [inline]
 

Definition at line 83 of file itkOneWayEquivalencyTable.h.

static Pointer itk::OneWayEquivalencyTable::New  )  [static]
 

void itk::OneWayEquivalencyTable::operator= const Self  )  [protected]
 

void itk::OneWayEquivalencyTable::PrintSelf std::ostream &  os,
Indent  indent
const [protected]
 

unsigned long itk::OneWayEquivalencyTable::RecursiveLookup const unsigned  a  )  const
 

Lookup an equivalency in the table by recursing through all successive equivalencies. For example, if the follow entries exist in the table {8=7, 7=6, 6=5}, then RecursiveLookup(8) returns 5.


Member Data Documentation

HashTableType itk::OneWayEquivalencyTable::m_HashMap [protected]
 

Definition at line 136 of file itkOneWayEquivalencyTable.h.

Standard typedefs and smart pointer declarations* typedef OneWayEquivalencyTable itk::OneWayEquivalencyTable::Self
 

Definition at line 51 of file itkOneWayEquivalencyTable.h.

Lookup an equivalency in the table If no entry is found in the* itk::OneWayEquivalencyTable::table
 

Definition at line 81 of file itkOneWayEquivalencyTable.h.


The documentation for this class was generated from the following file:
Generated at Sun Jul 9 21:01:45 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000