X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FBase%2FMori.hxx;h=7a1df9a854107f0f30e880edc926a5dc9345294d;hb=b6babebfd77364b12d81fb18d767f484ad1a0969;hp=17415e772bae2eba47f4fb777f2b4a6be1e1d7d4;hpb=6c0b77c2a8e3b821ccbe9c72c705fcd561bb90c2;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Mori.hxx b/lib/fpa/Base/Mori.hxx index 17415e7..7a1df9a 100644 --- a/lib/fpa/Base/Mori.hxx +++ b/lib/fpa/Base/Mori.hxx @@ -97,6 +97,11 @@ Mori( ) this->SetInitValue( TOutputValue( 0 ) ); this->m_Predicate = TPredicate::New( ); this->m_Predicate->StrictOff( ); + + if( std::numeric_limits< TInputValue >::is_integer ) + this->m_MinimumThreshold = std::numeric_limits< TInputValue >::min( ); + else + this->m_MinimumThreshold = -std::numeric_limits< TInputValue >::max( ); } // ------------------------------------------------------------------------- @@ -218,7 +223,7 @@ _FinishOneLoop( ) this->m_Count = 0; // Peak detected? -> stop! - if( this->m_SignalPeaks.back( ) == 1 ) + if( this->m_SignalPeaks.back( ) == 1 && this->m_MinimumThreshold < *( this->m_CurrentThreshold ) ) this->_QueueClear( ); } else