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

itk::watershed::EquivalencyTable Class Reference
[Watershed-based Segmentation FiltersWatershed-based Segmentation Filters]

#include <itkWatershedEquivalencyTable.h>

Inheritance diagram for itk::watershed::EquivalencyTable:

Inheritance graph
[legend]
Collaboration diagram for itk::watershed::EquivalencyTable:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

typedef EquivalencyTable Self
typedef DataObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
virtual const char * GetClassName () const
Pointer New ()

[NOHEADER]

typedef EquivalencyTable Self
typedef DataObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
virtual const char * GetClassName () const
Pointer New ()

Public Types

typedef itk::hash_map< unsigned
long, unsigned long, itk::hash<
unsigned long > > 
HashTableType
typedef HashTableType::iterator Iterator
typedef HashTableType::const_iterator ConstIterator
typedef HashTableType::value_type ValueType
typedef itk::hash_map< unsigned
long, unsigned long, itk::hash<
unsigned long > > 
HashTableType
typedef HashTableType::iterator Iterator
typedef HashTableType::const_iterator ConstIterator
typedef HashTableType::value_type ValueType

Public Methods

void Flatten ()
bool Add (unsigned long a, unsigned long b)
unsigned long RecursiveLookup (const unsigned a) const
void Erase (const unsigned long a)
void Clear ()
bool Empty () const
HashTableType::size_type Size () const
Iterator Begin ()
Iterator End ()
void Flatten ()
bool Add (unsigned long a, unsigned long b)
unsigned long RecursiveLookup (const unsigned a) const
void Erase (const unsigned long a)
void Clear ()
bool Empty () const
HashTableType::size_type Size () const
Iterator Begin ()
Iterator End ()
unsigned long Lookup (const unsigned long a) const
bool IsEntry (const unsigned long a) const
unsigned long Lookup (const unsigned long a) const
bool IsEntry (const unsigned long a) const

Protected Methods

void UpdateOutputInformation ()
bool VerifyRequestedRegion ()
void SetRequestedRegionToLargestPossibleRegion ()
bool RequestedRegionIsOutsideOfTheBufferedRegion ()
void SetRequestedRegion (itk::DataObject *)
void UpdateOutputInformation ()
bool VerifyRequestedRegion ()
void SetRequestedRegionToLargestPossibleRegion ()
bool RequestedRegionIsOutsideOfTheBufferedRegion ()
void SetRequestedRegion (itk::DataObject *)
 EquivalencyTable ()
virtual ~EquivalencyTable ()
 EquivalencyTable (const Self &)
void operator= (const Self &)
void PrintSelf (std::ostream &os, Indent indent) const
 EquivalencyTable ()
virtual ~EquivalencyTable ()
 EquivalencyTable (const Self &)
void operator= (const Self &)
void PrintSelf (std::ostream &os, Indent indent) const

Protected Attributes

HashTableType m_HashMap

Detailed Description

A hash table for recording equivalencies among unsigned long integer values. EquivalencyTable can store recursive relationships (8=7, 7=6, 6=5, ...) or be ``flattened'' to eliminate recursion. The table uses an efficient algorithm for eliminating redundancy and preventing circular dependencies.

In the context of the watershed segmentation algorithm (itk::WatershedImageFilter), this table is used to store connections identified among image segments and as the input to itk::watershed::Relabeler.

Definition at line 48 of file itkWatershedEquivalencyTable.h.


Member Typedef Documentation

typedef HashTableType::const_iterator itk::watershed::EquivalencyTable::ConstIterator
 

Definition at line 64 of file itkEquivalencyTable.h.

typedef HashTableType::const_iterator itk::watershed::EquivalencyTable::ConstIterator
 

Definition at line 64 of file itkWatershedEquivalencyTable.h.

Referenced by Lookup().

typedef SmartPointer<const Self> itk::watershed::EquivalencyTable::ConstPointer
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 55 of file itkEquivalencyTable.h.

typedef SmartPointer<const Self> itk::watershed::EquivalencyTable::ConstPointer
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 55 of file itkWatershedEquivalencyTable.h.

typedef itk::hash_map<unsigned long, unsigned long, itk::hash<unsigned long> > itk::watershed::EquivalencyTable::HashTableType
 

Define the container type for the table.

Definition at line 62 of file itkEquivalencyTable.h.

typedef itk::hash_map<unsigned long, unsigned long, itk::hash<unsigned long> > itk::watershed::EquivalencyTable::HashTableType
 

Define the container type for the table.

Definition at line 62 of file itkWatershedEquivalencyTable.h.

typedef HashTableType::iterator itk::watershed::EquivalencyTable::Iterator
 

Definition at line 63 of file itkEquivalencyTable.h.

typedef HashTableType::iterator itk::watershed::EquivalencyTable::Iterator
 

Definition at line 63 of file itkWatershedEquivalencyTable.h.

typedef SmartPointer<Self> itk::watershed::EquivalencyTable::Pointer
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 54 of file itkEquivalencyTable.h.

typedef SmartPointer<Self> itk::watershed::EquivalencyTable::Pointer
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 54 of file itkWatershedEquivalencyTable.h.

typedef EquivalencyTable itk::watershed::EquivalencyTable::Self
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 52 of file itkEquivalencyTable.h.

typedef EquivalencyTable itk::watershed::EquivalencyTable::Self
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 52 of file itkWatershedEquivalencyTable.h.

typedef DataObject itk::watershed::EquivalencyTable::Superclass
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 53 of file itkEquivalencyTable.h.

typedef DataObject itk::watershed::EquivalencyTable::Superclass
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 53 of file itkWatershedEquivalencyTable.h.

typedef HashTableType::value_type itk::watershed::EquivalencyTable::ValueType
 

Definition at line 65 of file itkEquivalencyTable.h.

typedef HashTableType::value_type itk::watershed::EquivalencyTable::ValueType
 

Definition at line 65 of file itkWatershedEquivalencyTable.h.


Constructor & Destructor Documentation

itk::watershed::EquivalencyTable::EquivalencyTable   [inline, protected]
 

Convenience method for debugging.

Definition at line 132 of file itkWatershedEquivalencyTable.h.

virtual itk::watershed::EquivalencyTable::~EquivalencyTable   [inline, protected, virtual]
 

Convenience method for debugging.

Definition at line 133 of file itkWatershedEquivalencyTable.h.

References m_HashMap.

itk::watershed::EquivalencyTable::EquivalencyTable const Self   [protected]
 

Convenience method for debugging.

itk::watershed::EquivalencyTable::EquivalencyTable   [inline, protected]
 

Convenience method for debugging.

Definition at line 132 of file itkEquivalencyTable.h.

virtual itk::watershed::EquivalencyTable::~EquivalencyTable   [inline, protected, virtual]
 

Convenience method for debugging.

Definition at line 133 of file itkEquivalencyTable.h.

References m_HashMap.

itk::watershed::EquivalencyTable::EquivalencyTable const Self   [protected]
 

Convenience method for debugging.


Member Function Documentation

bool itk::watershed::EquivalencyTable::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).

bool itk::watershed::EquivalencyTable::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::watershed::EquivalencyTable::Begin   [inline]
 

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

Definition at line 123 of file itkEquivalencyTable.h.

Iterator itk::watershed::EquivalencyTable::Begin   [inline]
 

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

Definition at line 123 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::Clear   [inline]
 

Erases all the entries in the table.

Definition at line 110 of file itkEquivalencyTable.h.

void itk::watershed::EquivalencyTable::Clear   [inline]
 

Erases all the entries in the table.

Definition at line 110 of file itkWatershedEquivalencyTable.h.

bool itk::watershed::EquivalencyTable::Empty   const [inline]
 

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

Definition at line 114 of file itkEquivalencyTable.h.

bool itk::watershed::EquivalencyTable::Empty   const [inline]
 

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

Definition at line 114 of file itkWatershedEquivalencyTable.h.

Iterator itk::watershed::EquivalencyTable::End   [inline]
 

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

Definition at line 127 of file itkEquivalencyTable.h.

Iterator itk::watershed::EquivalencyTable::End   [inline]
 

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

Definition at line 127 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::Erase const unsigned long    a [inline]
 

Erases the entry with key a.

Definition at line 106 of file itkEquivalencyTable.h.

void itk::watershed::EquivalencyTable::Erase const unsigned long    a [inline]
 

Erases the entry with key a.

Definition at line 106 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::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}.

void itk::watershed::EquivalencyTable::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::watershed::EquivalencyTable::GetClassName   const [virtual]
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

virtual const char* itk::watershed::EquivalencyTable::GetClassName   const [virtual]
 

Standard smart pointer declarations

Reimplemented from itk::DataObject.

bool itk::watershed::EquivalencyTable::IsEntry const unsigned long    a const [inline]
 

Returns TRUE if the label is found in the table and FALSE is the label is not found in the table.

Definition at line 98 of file itkEquivalencyTable.h.

References m_HashMap.

bool itk::watershed::EquivalencyTable::IsEntry const unsigned long    a const [inline]
 

Returns TRUE if the label is found in the table and FALSE is the label is not found in the table.

Definition at line 98 of file itkWatershedEquivalencyTable.h.

References m_HashMap.

unsigned long itk::watershed::EquivalencyTable::Lookup const unsigned long    a const [inline]
 

Lookup an equivalency in the table. If no entry is found in the table, the method returns its the value of the argument. Does not recursively descent through equivalencies.

Definition at line 83 of file itkEquivalencyTable.h.

References ConstIterator, itk::hash_map< unsigned long, unsigned long, itk::hash< unsigned long > >::end(), itk::hash_map< unsigned long, unsigned long, itk::hash< unsigned long > >::find(), and m_HashMap.

unsigned long itk::watershed::EquivalencyTable::Lookup const unsigned long    a const [inline]
 

Lookup an equivalency in the table. If no entry is found in the table, the method returns its the value of the argument. Does not recursively descent through equivalencies.

Definition at line 83 of file itkWatershedEquivalencyTable.h.

References ConstIterator, itk::hash_map< unsigned long, unsigned long, itk::hash< unsigned long > >::end(), itk::hash_map< unsigned long, unsigned long, itk::hash< unsigned long > >::find(), and m_HashMap.

Pointer itk::watershed::EquivalencyTable::New   [static]
 

Standard smart pointer declarations

Reimplemented from itk::Object.

Pointer itk::watershed::EquivalencyTable::New   [static]
 

Standard smart pointer declarations

Reimplemented from itk::Object.

void itk::watershed::EquivalencyTable::operator= const Self   [protected]
 

Convenience method for debugging.

Reimplemented from itk::DataObject.

void itk::watershed::EquivalencyTable::operator= const Self   [protected]
 

Convenience method for debugging.

Reimplemented from itk::DataObject.

void itk::watershed::EquivalencyTable::PrintSelf std::ostream &    os,
Indent    indent
const [protected, virtual]
 

Convenience method for debugging.

Reimplemented from itk::DataObject.

void itk::watershed::EquivalencyTable::PrintSelf std::ostream &    os,
Indent    indent
const [protected, virtual]
 

Convenience method for debugging.

Reimplemented from itk::DataObject.

unsigned long itk::watershed::EquivalencyTable::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.

unsigned long itk::watershed::EquivalencyTable::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.

bool itk::watershed::EquivalencyTable::RequestedRegionIsOutsideOfTheBufferedRegion   [inline, protected, virtual]
 

Determine whether the RequestedRegion is outside of the BufferedRegion. This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute

Implements itk::DataObject.

Definition at line 144 of file itkEquivalencyTable.h.

bool itk::watershed::EquivalencyTable::RequestedRegionIsOutsideOfTheBufferedRegion   [inline, protected, virtual]
 

Determine whether the RequestedRegion is outside of the BufferedRegion. This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute

Implements itk::DataObject.

Definition at line 144 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::SetRequestedRegion itk::DataObject   [inline, protected, virtual]
 

Set the requested region from this data object to match the requested region of the data object passed in as a parameter. This method is implemented in the concrete subclasses of DataObject.

Implements itk::DataObject.

Definition at line 146 of file itkEquivalencyTable.h.

void itk::watershed::EquivalencyTable::SetRequestedRegion itk::DataObject   [inline, protected, virtual]
 

Set the requested region from this data object to match the requested region of the data object passed in as a parameter. This method is implemented in the concrete subclasses of DataObject.

Implements itk::DataObject.

Definition at line 146 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::SetRequestedRegionToLargestPossibleRegion   [inline, protected, virtual]
 

Set the RequestedRegion to the LargestPossibleRegion. This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update().

Implements itk::DataObject.

Definition at line 143 of file itkEquivalencyTable.h.

void itk::watershed::EquivalencyTable::SetRequestedRegionToLargestPossibleRegion   [inline, protected, virtual]
 

Set the RequestedRegion to the LargestPossibleRegion. This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update().

Implements itk::DataObject.

Definition at line 143 of file itkWatershedEquivalencyTable.h.

HashTableType::size_type itk::watershed::EquivalencyTable::Size void    const [inline]
 

Returns the number of entries in the table.

Definition at line 118 of file itkEquivalencyTable.h.

HashTableType::size_type itk::watershed::EquivalencyTable::Size   const [inline]
 

Returns the number of entries in the table.

Definition at line 118 of file itkWatershedEquivalencyTable.h.

void itk::watershed::EquivalencyTable::UpdateOutputInformation   [protected, virtual]
 

Update the information for this DataObject so that it can be used as an output of a ProcessObject. This method is used in the pipeline mechanism to propagate information and initialize the meta data associated with a DataObject. Any implementation of this method in a derived class is assumed to call its source's ProcessObject::UpdateOutputInformation() which determines modified times, LargestPossibleRegions, and any extra meta data like spacing, origin, etc.

Implements itk::DataObject.

void itk::watershed::EquivalencyTable::UpdateOutputInformation   [protected, virtual]
 

Update the information for this DataObject so that it can be used as an output of a ProcessObject. This method is used in the pipeline mechanism to propagate information and initialize the meta data associated with a DataObject. Any implementation of this method in a derived class is assumed to call its source's ProcessObject::UpdateOutputInformation() which determines modified times, LargestPossibleRegions, and any extra meta data like spacing, origin, etc.

Implements itk::DataObject.

bool itk::watershed::EquivalencyTable::VerifyRequestedRegion   [inline, protected, virtual]
 

Verify that the RequestedRegion is within the LargestPossibleRegion.

If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.

Implements itk::DataObject.

Definition at line 142 of file itkEquivalencyTable.h.

bool itk::watershed::EquivalencyTable::VerifyRequestedRegion   [inline, protected, virtual]
 

Verify that the RequestedRegion is within the LargestPossibleRegion.

If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.

Implements itk::DataObject.

Definition at line 142 of file itkWatershedEquivalencyTable.h.


Member Data Documentation

HashTableType itk::watershed::EquivalencyTable::m_HashMap [protected]
 

Definition at line 139 of file itkEquivalencyTable.h.

Referenced by IsEntry(), Lookup(), and ~EquivalencyTable().


The documentation for this class was generated from the following files:
Generated at Fri May 21 01:54:28 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000