// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __CTBronchi__MoriLabelling__hxx__ #define __CTBronchi__MoriLabelling__hxx__ // ------------------------------------------------------------------------- template< class _TInputImage, class _TLabelImage > typename CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: TInputValue CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: GetUpperThreshold( ) const { return( this->m_LabelFunctor->GetUpperThreshold( ) ); } // ------------------------------------------------------------------------- template< class _TInputImage, class _TLabelImage > void CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: SetUpperThreshold( TInputValue t ) { this->m_LabelFunctor->SetUpperThreshold( t ); } // ------------------------------------------------------------------------- template< class _TInputImage, class _TLabelImage > CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: MoriLabelling( ) : Superclass( ) { this->m_LabelFunctor = TLabelFunctor::New( ); this->SetPredicate( this->m_LabelFunctor ); } // ------------------------------------------------------------------------- template< class _TInputImage, class _TLabelImage > CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: ~MoriLabelling( ) { } // ------------------------------------------------------------------------- template< class _TInputImage, class _TLabelImage > void CTBronchi::MoriLabelling< _TInputImage, _TLabelImage >:: _UpdateOutputValue( TNode& n ) { this->Superclass::_UpdateOutputValue( n ); if( n.FrontId != 0 ) { const TLabelImage* input_labels = this->GetInputLabels( ); if( input_labels->GetPixel( n.Vertex ) == this->GetInsideValue( ) ) n.Value = TOutputValue( 1 ); // this->GetInsideLabel( ); else n.Value = TOutputValue( 0 ); /* TODO if( input_labels->GetPixel( n.Vertex ) == this->GetInsideValue( ) ) */ } // fi } #endif // __CTBronchi__MoriLabelling__hxx__ // eof - $RCSfile$