18 #ifndef itkOneWayEquivalencyTable_h 19 #define itkOneWayEquivalencyTable_h 23 #include "itksys/hash_map.hxx" 24 #include "ITKWatershedsExport.h" 59 typedef itksys::hash_map<
unsigned long,
unsigned long,
78 bool Add(
unsigned long a,
unsigned long b);
83 unsigned long Lookup(
const unsigned long a)
const 85 ConstIterator result = m_HashMap.find(a);
87 if ( result == m_HashMap.end() ) {
return a; }
88 else {
return ( *result ).second; }
95 unsigned long RecursiveLookup(
const unsigned long a)
const;
101 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
102 else {
return true; }
108 { m_HashMap.erase(a); }
112 { m_HashMap.clear(); }
116 {
return m_HashMap.empty(); }
120 Iterator
Begin() {
return m_HashMap.begin(); }
124 Iterator
End() {
return m_HashMap.end(); }
133 void operator=(
const Self &) ITK_DELETE_FUNCTION;
135 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
HashTableType::iterator Iterator
unsigned long Lookup(const unsigned long a) const
SmartPointer< Self > Pointer
HashTableType::const_iterator ConstIterator
OneWayEquivalencyTable Self
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
bool IsEntry(const unsigned long a) const
Hash table to manage integral label equivalencies that are order dependent.
itksys::hash_map< unsigned long, unsigned long, itksys::hash< unsigned long > > HashTableType
virtual ~OneWayEquivalencyTable()
void Erase(const unsigned long a)
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
HashTableType::value_type ValueType
Base class for all data objects in ITK.