18 #ifndef itkWatershedBoundary_h
19 #define itkWatershedBoundary_h
26 #include <unordered_map>
53 template <
typename TScalar,
unsigned int TDimension>
61 static constexpr
unsigned int Dimension = TDimension;
122 using flat_hash_t = std::unordered_map<IdentifierType, flat_region_t>;
142 return this->GetFace(idx.first, idx.second);
153 return m_Faces[dimension].first;
157 return m_Faces[dimension].second;
165 this->SetFace(f, idx.first, idx.second);
173 m_Faces[dimension].first = f;
177 m_Faces[dimension].second = f;
186 return this->GetFlatHash(idx.first, idx.second);
193 return &(m_FlatHashes[dimension].first);
197 return &(m_FlatHashes[dimension].second);
205 this->SetFlatHash(l, idx.first, idx.second);
212 m_FlatHashes[dimension].first = l;
216 m_FlatHashes[dimension].second = l;
228 this->SetValid(l, idx.first, idx.second);
231 SetValid(
bool b,
unsigned dimension,
unsigned highlow)
235 m_Valid[dimension].first = b;
239 m_Valid[dimension].second = b;
248 return this->GetValid(idx.first, idx.second);
251 GetValid(
unsigned dimension,
unsigned highlow)
const
255 return m_Valid[dimension].first;
259 return m_Valid[dimension].second;
271 PrintSelf(std::ostream & os,
Indent indent)
const override;
274 std::vector<std::pair<FacePointer, FacePointer>>
m_Faces;
287 #ifndef ITK_MANUAL_INSTANTIATION
288 # include "itkWatershedBoundary.hxx"