// ========================================================================= // @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->TBase::_UpdateOutputValue( n ); if( n.FrontId != 0 ) { const TLabelImage* input_labels = this->GetInputLabels( ); if( input_labels->GetPixel( n.Vertex ) != this->GetInputInsideValue( ) ) n.Value = TOutputValue( 0 ); else n.Value = this->GetInsideValue( ); } // fi this->GetOutput( )->SetPixel( n.Vertex, n.Value ); } #endif // __CTBronchi__MoriLabelling__hxx__ // eof - $RCSfile$