ITK  5.2.0
Insight Toolkit
List of all members

#include <itkEquivalencyTable.h>

+ Inheritance diagram for itk::EquivalencyTable:
+ Collaboration diagram for itk::EquivalencyTable:
using Self = EquivalencyTable
 
using Superclass = DataObject
 
using Pointer = SmartPointer< Self >
 
using ConstPointer = SmartPointer< const Self >
 
using HashTableType = std::unordered_map< unsigned long, unsigned long, std::hash< unsigned long > >
 
using Iterator = HashTableType::iterator
 
using ConstIterator = HashTableType::const_iterator
 
using ValueType = HashTableType::value_type
 
HashTableType m_HashMap
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
void Flatten ()
 
bool Add (unsigned long a, unsigned long b)
 
bool AddAndFlatten (unsigned long a, unsigned long b)
 
unsigned long Lookup (const unsigned long a) const
 
unsigned long RecursiveLookup (const unsigned long a) const
 
bool IsEntry (const unsigned long a) const
 
void Erase (const unsigned long a)
 
void Clear ()
 
bool Empty () const
 
HashTableType::size_type Size () const
 
Iterator Begin ()
 
Iterator End ()
 
 EquivalencyTable ()=default
 
 ~EquivalencyTable () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Public Types inherited from itk::DataObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = std::string
 
using DataObjectPointerArraySizeType = std::vector< Pointer >::size_type
 
using Pointer = SmartPointer< Self >
 
using Self = DataObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 
- Public Member Functions inherited from itk::DataObject
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointer< ProcessObjectGetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual void Initialize ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
void SetReleaseDataFlag (bool flag)
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual void PrepareForNewData ()
 
virtual void DataHasBeenGenerated ()
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual bool VerifyRequestedRegion ()
 
virtual void CopyInformation (const DataObject *)
 
virtual void SetRequestedRegion (const DataObject *)
 
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
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType 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
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
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 Pointer New ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
 ~DataObject () override
 
virtual void PropagateResetPipeline ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- 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 inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

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

◆ ConstIterator

using itk::EquivalencyTable::ConstIterator = HashTableType::const_iterator

Standard smart pointer declarations

Definition at line 62 of file itkEquivalencyTable.h.

◆ ConstPointer

Standard smart pointer declarations

Definition at line 53 of file itkEquivalencyTable.h.

◆ HashTableType

using itk::EquivalencyTable::HashTableType = std::unordered_map<unsigned long, unsigned long, std::hash<unsigned long> >

Define the container type for the table.

Definition at line 59 of file itkEquivalencyTable.h.

◆ Iterator

using itk::EquivalencyTable::Iterator = HashTableType::iterator

Standard smart pointer declarations

Definition at line 61 of file itkEquivalencyTable.h.

◆ Pointer

Standard smart pointer declarations

Definition at line 52 of file itkEquivalencyTable.h.

◆ Self

Standard smart pointer declarations

Definition at line 50 of file itkEquivalencyTable.h.

◆ Superclass

Standard smart pointer declarations

Definition at line 51 of file itkEquivalencyTable.h.

◆ ValueType

using itk::EquivalencyTable::ValueType = HashTableType::value_type

Standard smart pointer declarations

Definition at line 63 of file itkEquivalencyTable.h.

Constructor & Destructor Documentation

◆ EquivalencyTable()

itk::EquivalencyTable::EquivalencyTable ( )
protecteddefault

Convenience method for debugging.

◆ ~EquivalencyTable()

itk::EquivalencyTable::~EquivalencyTable ( )
overrideprotecteddefault

Standard smart pointer declarations

Member Function Documentation

◆ Add()

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).

◆ AddAndFlatten()

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).

◆ Begin()

Iterator itk::EquivalencyTable::Begin ( )
inline

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

Definition at line 162 of file itkEquivalencyTable.h.

◆ Clear()

void itk::EquivalencyTable::Clear ( )
inline

Erases all the entries in the table.

Definition at line 140 of file itkEquivalencyTable.h.

◆ CreateAnother()

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

Standard smart pointer declarations

Reimplemented from itk::LightObject.

◆ Empty()

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

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

Definition at line 147 of file itkEquivalencyTable.h.

◆ End()

Iterator itk::EquivalencyTable::End ( )
inline

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

Definition at line 170 of file itkEquivalencyTable.h.

◆ Erase()

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

Erases the entry with key a.

Definition at line 133 of file itkEquivalencyTable.h.

◆ Flatten()

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}.

◆ GetNameOfClass()

virtual const char* itk::EquivalencyTable::GetNameOfClass ( ) const
virtual

Standard smart pointer declarations

Reimplemented from itk::DataObject.

◆ IsEntry()

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 118 of file itkEquivalencyTable.h.

◆ Lookup()

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 94 of file itkEquivalencyTable.h.

◆ New()

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

Standard smart pointer declarations

◆ PrintSelf()

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

Standard smart pointer declarations

Reimplemented from itk::DataObject.

◆ RecursiveLookup()

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.

◆ Size()

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

Returns the number of entries in the table.

Definition at line 154 of file itkEquivalencyTable.h.

Member Data Documentation

◆ m_HashMap

HashTableType itk::EquivalencyTable::m_HashMap
protected

Standard smart pointer declarations

Definition at line 184 of file itkEquivalencyTable.h.


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