18#ifndef itkWatershedSegmentTable_h
19#define itkWatershedSegmentTable_h
47template <
typename TScalar>
79 if (this->height < o.
height)
100 using HashMapType = std::unordered_map<IdentifierType, segment_t>;
104 using DataType =
typename HashMapType::mapped_type;
122 auto result = m_HashMap.find(a);
124 if (result == m_HashMap.end())
129 return &(result->second);
139 if (result == m_HashMap.end())
144 return &(result->second);
152 if (m_HashMap.find(a) == m_HashMap.end())
179 return m_HashMap.empty();
188 typename HashMapType::size_type
191 return m_HashMap.size();
202 return m_HashMap.begin();
210 return m_HashMap.end();
218 return m_HashMap.begin();
226 return m_HashMap.end();
251 return m_MaximumDepth;
260 m_HashMap = o.m_HashMap;
261 m_MaximumDepth = o.m_MaximumDepth;
282#ifndef ITK_MANUAL_INSTANTIATION
283# include "itkWatershedSegmentTable.hxx"
Base class for all data objects in ITK.
Base class for most ITK classes.
const segment_t * Lookup(const IdentifierType a) const
std::list< edge_pair_t > edge_list_t
void operator=(const Self &)
void PruneEdgeLists(ScalarType maximum_saliency)
unsigned int GetSegmentMemorySize() const
typename HashMapType::iterator Iterator
~SegmentTable() override=default
segment_t * Lookup(const IdentifierType a)
void Erase(const IdentifierType a)
std::unordered_map< IdentifierType, segment_t > HashMapType
bool Add(IdentifierType a, const segment_t &t)
typename HashMapType::mapped_type DataType
ScalarType GetMaximumDepth() const
typename HashMapType::value_type ValueType
ConstIterator Begin() const
typename HashMapType::const_iterator ConstIterator
ConstIterator End() const
bool IsEntry(const IdentifierType a) const
void SetMaximumDepth(ScalarType s)
HashMapType::size_type Size() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT DataObject
SizeValueType IdentifierType
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
edge_pair_t(IdentifierType l, ScalarType s)