ITK  4.2.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
itk::EquivalencyTable Class Reference

#include <itkEquivalencyTable.h>

+ Inheritance diagram for itk::EquivalencyTable:
+ Collaboration diagram for itk::EquivalencyTable:

List of all members.

Public Types

typedef
HashTableType::const_iterator 
ConstIterator
typedef itksys::hash_map
< unsigned long, unsigned long,
itksys::hash< unsigned long > > 
HashTableType
typedef HashTableType::iterator Iterator
typedef HashTableType::value_type ValueType
- Public Types inherited from itk::DataObject
typedef std::string DataObjectIdentifierType
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
- Public Types inherited from itk::Object
- Public Types inherited from itk::LightObject

Public Member Functions

bool Add (unsigned long a, unsigned long b)
bool AddAndFlatten (unsigned long a, unsigned long b)
Iterator Begin ()
void Clear ()
bool Empty () const
Iterator End ()
void Erase (const unsigned long a)
void Flatten ()
unsigned long Lookup (const unsigned long a) const
unsigned long RecursiveLookup (const unsigned long a) const
HashTableType::size_type Size () const
bool IsEntry (const unsigned long a) const
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
virtual void DataHasBeenGenerated ()
void DisconnectPipeline ()
bool GetDataReleased () const
virtual const bool & GetReleaseDataFlag ()
SmartPointerForwardReference
< ProcessObject
GetSource () const
DataObjectPointerArraySizeType GetSourceOutputIndex () const
const DataObjectIdentifierTypeGetSourceOutputName () const
virtual unsigned long GetUpdateMTime () const
virtual void Initialize ()
virtual void PrepareForNewData ()
virtual void PropagateRequestedRegion ()
void ReleaseData ()
virtual void ReleaseDataFlagOff ()
virtual void ReleaseDataFlagOn ()
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
virtual void ResetPipeline ()
void SetReleaseDataFlag (bool flag)
virtual void SetRequestedRegion (const DataObject *)
virtual void SetRequestedRegionToLargestPossibleRegion ()
bool ShouldIReleaseData () const
virtual void Update ()
virtual void UpdateOutputData ()
virtual void UpdateOutputInformation ()
virtual bool VerifyRequestedRegion ()
void SetPipelineMTime (unsigned long time)
virtual const unsigned long & GetPipelineMTime ()
virtual void SetRealTimeStamp (RealTimeStamp _arg)
virtual const RealTimeStampGetRealTimeStamp ()
virtual void Graft (const DataObject *)
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
unsigned long AddObserver (const EventObject &event, Command *) const
virtual void DebugOff () const
virtual void DebugOn () const
CommandGetCommand (unsigned long tag)
bool GetDebug () const
MetaDataDictionaryGetMetaDataDictionary (void)
const MetaDataDictionaryGetMetaDataDictionary (void) const
virtual unsigned long GetMTime () const
virtual const TimeStampGetTimeStamp () const
bool HasObserver (const EventObject &event) const
void InvokeEvent (const EventObject &)
void InvokeEvent (const EventObject &) const
virtual void Modified () const
virtual void Register () const
void RemoveAllObservers ()
void RemoveObserver (unsigned long tag)
void SetDebug (bool debugFlag) const
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
virtual void SetReferenceCount (int)
virtual void UnRegister () const
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
static void GlobalReleaseDataFlagOff ()
static void GlobalReleaseDataFlagOn ()
static void SetGlobalReleaseDataFlag (bool val)
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
static void GlobalWarningDisplayOff ()
static void GlobalWarningDisplayOn ()
static void SetGlobalWarningDisplay (bool flag)
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const
 EquivalencyTable ()
virtual ~EquivalencyTable ()
 EquivalencyTable (const Self &)
void operator= (const Self &)
- Protected Member Functions inherited from itk::DataObject
virtual void PropagateResetPipeline ()
 DataObject ()
 ~DataObject ()
- Protected Member Functions inherited from itk::Object
 Object ()
bool PrintObservers (std::ostream &os, Indent indent) const
virtual void SetTimeStamp (const TimeStamp &time)
virtual ~Object ()
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 LightObject ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const
virtual ~LightObject ()

Protected Attributes

HashTableType m_HashMap
typedef EquivalencyTable Self
typedef DataObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
static Pointer New ()
virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const

Additional Inherited Members


Detailed Description

Hash table to manage integral label equivalencies.

EquivalencyTable is 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 44 of file itkEquivalencyTable.h.


Member Typedef Documentation

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

Definition at line 61 of file itkEquivalencyTable.h.

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 51 of file itkEquivalencyTable.h.

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

Define the container type for the table.

Definition at line 53 of file itkEquivalencyTable.h.

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

Definition at line 60 of file itkEquivalencyTable.h.

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 50 of file itkEquivalencyTable.h.

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 48 of file itkEquivalencyTable.h.

Standard smart pointer declarations

Reimplemented from itk::DataObject.

Definition at line 49 of file itkEquivalencyTable.h.

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

Definition at line 62 of file itkEquivalencyTable.h.


Constructor & Destructor Documentation

itk::EquivalencyTable::EquivalencyTable ( )
inlineprotected

Convenience method for debugging.

Definition at line 139 of file itkEquivalencyTable.h.

virtual itk::EquivalencyTable::~EquivalencyTable ( )
inlineprotectedvirtual

Convenience method for debugging.

Definition at line 140 of file itkEquivalencyTable.h.

itk::EquivalencyTable::EquivalencyTable ( const Self )
protected

Convenience method for debugging.


Member Function Documentation

bool itk::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::EquivalencyTable::AddAndFlatten ( unsigned long  a,
unsigned long  b 
)

Insert an equivalency into the table and flatten that equivalency. 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::EquivalencyTable::Begin ( )
inline

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

Definition at line 130 of file itkEquivalencyTable.h.

void itk::EquivalencyTable::Clear ( )
inline

Erases all the entries in the table.

Definition at line 117 of file itkEquivalencyTable.h.

virtual::itk::LightObject::Pointer itk::EquivalencyTable::CreateAnother ( void  ) const
virtual

Standard smart pointer declarations

Reimplemented from itk::Object.

bool itk::EquivalencyTable::Empty ( ) const
inline

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

Definition at line 121 of file itkEquivalencyTable.h.

Iterator itk::EquivalencyTable::End ( )
inline

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

Definition at line 134 of file itkEquivalencyTable.h.

void itk::EquivalencyTable::Erase ( const unsigned long  a)
inline

Erases the entry with key a.

Definition at line 113 of file itkEquivalencyTable.h.

void itk::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::EquivalencyTable::GetNameOfClass ( ) const
virtual

Standard smart pointer declarations

Reimplemented from itk::DataObject.

bool itk::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 105 of file itkEquivalencyTable.h.

unsigned long itk::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 89 of file itkEquivalencyTable.h.

static Pointer itk::EquivalencyTable::New ( )
static

Standard smart pointer declarations

Reimplemented from itk::Object.

void itk::EquivalencyTable::operator= ( const Self )
protected

Convenience method for debugging.

Reimplemented from itk::DataObject.

void itk::EquivalencyTable::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Method for grafting the content of one data object into another one. This method is intended to be overloaded by derived classes. Each one of them should use dynamic_casting in order to verify that the grafted object is actually of the same type as the class on which the Graft() method was invoked.

Reimplemented from itk::DataObject.

unsigned long itk::EquivalencyTable::RecursiveLookup ( const unsigned long  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.

HashTableType::size_type itk::EquivalencyTable::Size ( void  ) const
inline

Returns the number of entries in the table.

Definition at line 125 of file itkEquivalencyTable.h.


Member Data Documentation

HashTableType itk::EquivalencyTable::m_HashMap
protected

Definition at line 147 of file itkEquivalencyTable.h.


The documentation for this class was generated from the following file: