18 #ifndef __itkWatershedBoundary_h
19 #define __itkWatershedBoundary_h
26 #include "itksys/hash_map.hxx"
53 template<
class TScalarType,
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 ); }
176 if ( highlow == 0 ) { m_FlatHashes[dimension].first = l; }
177 else { m_FlatHashes[dimension].second = l; }
186 { this->
SetValid(l, idx.first, idx.second); }
187 void SetValid(
bool b,
unsigned dimension,
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;
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"