18 #ifndef itkWatershedSegmentTable_h
19 #define itkWatershedSegmentTable_h
46 template<
typename TScalar >
58 itkTypeMacro(WatershedSegmentTable,
DataObject);
72 if ( this->height < o.
height )
96 itksys::hash< IdentifierType > >;
97 using Iterator =
typename HashMapType::iterator;
109 void PruneEdgeLists(
ScalarType maximum_saliency);
115 Iterator result = m_HashMap.find(a);
117 if ( result == m_HashMap.end() ) {
return nullptr; }
118 else {
return &( ( *result ).second ); }
127 if ( result == m_HashMap.end() ) {
return 0; }
128 else {
return &( ( *result ).second ); }
135 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
136 else {
return true; }
142 { m_HashMap.erase(a); }
146 { m_HashMap.clear(); }
151 {
return m_HashMap.empty(); }
155 void SortEdgeLists();
158 typename HashMapType::size_type
Size()
const
159 {
return m_HashMap.size(); }
198 {
return m_MaximumDepth; }
205 m_HashMap = o.m_HashMap;
206 m_MaximumDepth = o.m_MaximumDepth;
225 #ifndef ITK_MANUAL_INSTANTIATION
226 #include "itkWatershedSegmentTable.hxx"
segment_t * Lookup(const IdentifierType a)
std::list< edge_pair_t > edge_list_t
HashMapType::size_type Size() const
bool IsEntry(const IdentifierType a) const
void operator=(const Self &)
class ITK_FORWARD_EXPORT DataObject
ScalarType GetMaximumDepth() const
edge_pair_t(IdentifierType l, ScalarType s)
typename HashMapType::iterator Iterator
typename HashMapType::data_type DataType
ScalarType m_MaximumDepth
SizeValueType IdentifierType
bool operator<(const edge_pair_t &o) const
void SetMaximumDepth(ScalarType s)
itksys::hash_map< IdentifierType, segment_t, itksys::hash< IdentifierType > > HashMapType
const segment_t * Lookup(const IdentifierType a) const
unsigned int GetSegmentMemorySize() const
ConstIterator Begin() const
typename HashMapType::value_type ValueType
Base class for most ITK classes.
typename HashMapType::const_iterator ConstIterator
void Erase(const IdentifierType a)
Base class for all data objects in ITK.
ConstIterator End() const