18 #ifndef itkWatershedSegmentTable_h
19 #define itkWatershedSegmentTable_h
46 template<
typename TScalar >
58 itkTypeMacro(WatershedSegmentTable,
DataObject);
72 if ( this->height < o.
height )
97 typedef typename HashMapType::iterator
Iterator;
109 void PruneEdgeLists(
ScalarType maximum_saliency);
115 Iterator result = m_HashMap.find(a);
117 if ( result == m_HashMap.end() ) {
return ITK_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"
HashMapType::data_type DataType
segment_t * Lookup(const IdentifierType a)
HashMapType::size_type Size() const
bool IsEntry(const IdentifierType a) const
void operator=(const Self &)
SmartPointer< Self > Pointer
ScalarType GetMaximumDepth() const
virtual ~SegmentTable() override
SmartPointer< const Self > ConstPointer
edge_pair_t(IdentifierType l, ScalarType s)
SizeValueType IdentifierType
HashMapType::const_iterator ConstIterator
ScalarType m_MaximumDepth
bool operator<(const edge_pair_t &o) const
void SetMaximumDepth(ScalarType s)
HashMapType::iterator Iterator
const segment_t * Lookup(const IdentifierType a) const
unsigned int GetSegmentMemorySize() const
ConstIterator Begin() const
itksys::hash_map< IdentifierType, segment_t, itksys::hash< IdentifierType > > HashMapType
HashMapType::value_type ValueType
void Erase(const IdentifierType a)
std::list< edge_pair_t > edge_list_t
Base class for all data objects in ITK.
ConstIterator End() const