18 #ifndef itkWatershedBoundary_h
19 #define itkWatershedBoundary_h
26 #include "itksys/hash_map.hxx"
53 template<
typename TScalar,
unsigned int TDimension >
61 itkStaticConstMacro(
Dimension,
unsigned int, TDimension);
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 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_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"
flat_hash_t::value_type FlatHashValueType
FacePointer GetFace(const IndexType &idx)
void SetFlatHash(flat_hash_t &l, unsigned dimension, unsigned highlow)
Image< IdentifierType, TDimension > ImageType
ImageType::IndexType ImageIndexType
std::list< IdentifierType > offset_list
void operator=(const Self &)
virtual ~Boundary() override
SmartPointer< const Self > ConstPointer
flat_hash_t * GetFlatHash(unsigned dimension, unsigned highlow)
std::vector< std::pair< flat_hash_t, flat_hash_t > > m_FlatHashes
std::pair< unsigned, unsigned > IndexType
bool GetValid(unsigned dimension, unsigned highlow) const
void SetValid(bool &l, const IndexType &idx)
SizeValueType IdentifierType
itksys::hash_map< IdentifierType, flat_region_t, itksys::hash< IdentifierType > > flat_hash_t
void SetValid(bool b, unsigned dimension, unsigned highlow)
const unsigned int Dimension
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
bool GetValid(const IndexType &idx) const
void SetFace(FacePointer f, unsigned dimension, unsigned highlow)
Image< face_pixel_t, TDimension > face_t
face_t::Pointer FacePointer
flat_hash_t * GetFlatHash(const IndexType &idx)
Base class for all data objects in ITK.
SmartPointer< Self > Pointer
Templated n-dimensional image class.
void SetFace(FacePointer f, const IndexType &idx)