18 #ifndef itkWatershedBoundary_h
19 #define itkWatershedBoundary_h
26 #include "itksys/hash_map.hxx"
53 template<
typename TScalar,
unsigned int TDimension >
61 static constexpr
unsigned int Dimension = TDimension;
121 itksys::hash< IdentifierType > >;
139 {
return this->GetFace(idx.first, idx.second); }
146 if ( highlow == 0 ) {
return m_Faces[dimension].first; }
147 else {
return m_Faces[dimension].second; }
152 { this->SetFace(f, idx.first, idx.second); }
156 if ( highlow == 0 ) { m_Faces[dimension].first = f; }
157 else { m_Faces[dimension].second = f; }
163 {
return this->GetFlatHash(idx.first, idx.second); }
166 if ( highlow == 0 ) {
return &( m_FlatHashes[dimension].first ); }
167 else {
return &( m_FlatHashes[dimension].second ); }
172 { this->SetFlatHash(l, idx.first, idx.second); }
176 if ( highlow == 0 ) { m_FlatHashes[dimension].first = l; }
177 else { m_FlatHashes[dimension].second = l; }
186 { this->SetValid(l, idx.first, idx.second); }
190 if ( highlow == 0 ) { m_Valid[dimension].first = b; }
191 else { m_Valid[dimension].second = b; }
197 {
return this->GetValid(idx.first, idx.second); }
198 bool GetValid(
unsigned dimension,
unsigned highlow)
const
200 if ( highlow == 0 ) {
return m_Valid[dimension].first; }
201 else {
return m_Valid[dimension].second; }
209 void PrintSelf(std::ostream & os,
Indent indent)
const override;
212 std::vector< std::pair< FacePointer, FacePointer > >
m_Faces;
220 std::vector< std::pair< bool, bool > >
m_Valid;
225 #ifndef ITK_MANUAL_INSTANTIATION
226 #include "itkWatershedBoundary.hxx"
typename flat_hash_t::value_type FlatHashValueType
FacePointer GetFace(const IndexType &idx)
void SetFlatHash(flat_hash_t &l, unsigned dimension, unsigned highlow)
std::list< IdentifierType > offset_list
void operator=(const Self &)
typename face_t::Pointer FacePointer
flat_hash_t * GetFlatHash(unsigned dimension, unsigned highlow)
class ITK_FORWARD_EXPORT DataObject
std::vector< std::pair< flat_hash_t, flat_hash_t > > m_FlatHashes
constexpr unsigned int Dimension
bool GetValid(unsigned dimension, unsigned highlow) const
void SetValid(bool &l, const IndexType &idx)
typename ImageType::IndexType ImageIndexType
std::pair< unsigned, unsigned > IndexType
SizeValueType IdentifierType
ImageBaseType::IndexType IndexType
itksys::hash_map< IdentifierType, flat_region_t, itksys::hash< IdentifierType > > flat_hash_t
void SetValid(bool b, unsigned dimension, unsigned highlow)
FacePointer GetFace(unsigned dimension, unsigned highlow)
void SetFlatHash(flat_hash_t &l, const IndexType &idx)
std::vector< std::pair< bool, bool > > m_Valid
Control indentation during Print() invocation.
std::vector< std::pair< FacePointer, FacePointer > > m_Faces
Base class for most ITK classes.
bool GetValid(const IndexType &idx) const
void SetFace(FacePointer f, unsigned dimension, unsigned highlow)
flat_hash_t * GetFlatHash(const IndexType &idx)
Base class for all data objects in ITK.
Templated n-dimensional image class.
void SetFace(FacePointer f, const IndexType &idx)