X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ffpa%2FBase%2FMori.h;h=27f6915a671a8893805afc193973e9eb491278fc;hb=a44c34f8d4118730a65ab3a7f9b6fc12614ce67a;hp=430ff03ae5bc222da3ac1547efab3e0074554006;hpb=479d85a44365c8aa01976ffb9c7d67d3e9e52b63;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Mori.h b/lib/fpa/Base/Mori.h index 430ff03..27f6915 100644 --- a/lib/fpa/Base/Mori.h +++ b/lib/fpa/Base/Mori.h @@ -10,6 +10,8 @@ #include #include #include + +#include #include namespace fpa @@ -37,6 +39,10 @@ namespace fpa typedef std::deque< TNode > TQueue; typedef std::set< TInputValue > TThresholds; + + typedef ivq::ITK::PeakDetector TPeakDetector; + typedef TPeakDetector::TPeak TPeak; + typedef fpa::Base::Functors::RegionGrow::BinaryThreshold< TInputValue > TPredicate; public: @@ -48,25 +54,45 @@ namespace fpa itkGetConstMacro( InsideValue, TOutputValue ); itkSetMacro( InsideValue, TOutputValue ); + itkGetConstMacro( MinimumThreshold, TInputValue ); + itkSetMacro( MinimumThreshold, TInputValue ); + public: virtual itk::ModifiedTimeType GetMTime( ) const override; TOutputValue GetOutsideValue( ) const; void SetOutsideValue( const TOutputValue& v ); + unsigned long GetSignalKernelSize( ) const; + double GetSignalThreshold( ) const; + double GetSignalInfluence( ) const; + + void SetSignalKernelSize( unsigned long k ); + void SetSignalThreshold( double t ); + void SetSignalInfluence( double i ); + void ClearThresholds( ); void AddThreshold( const TInputValue& thr ); void SetThresholds( const TInputValue& init, const TInputValue& end, - unsigned long number_of_thresholds + const TInputValue& delta ); + const TThresholds& GetThresholds( ) const; + unsigned long GetNumberOfEvaluatedThresholds( ) const; + TInputValue GetOptimumThreshold( ) const; + void GetSignalValues( + unsigned long i, double& x, double& y, TPeak& p + ) const; protected: Mori( ); virtual ~Mori( ); - virtual TOutputValue _ComputeOutputValue( const TNode& n ) override; + virtual void _BeforeGenerateData( ) override; + virtual void _FinishOneLoop( ) override; + virtual void _ComputeOutputValue( TNode& n ) override; + virtual void _UpdateOutputValue( TNode& n ) override; virtual void _QueueClear( ) override; virtual TNode _QueuePop( ) override; virtual void _QueuePush( const TNode& node ) override; @@ -80,22 +106,26 @@ namespace fpa protected: typename TPredicate::Pointer m_Predicate; - TThresholds m_Thresholds; - TQueue m_Queues[ 2 ]; - unsigned int m_CurrentQueue; TOutputValue m_InsideValue; + TInputValue m_MinimumThreshold; + TThresholds m_Thresholds; + typename TThresholds::const_iterator m_CurrThr; + + TQueue m_Queues[ 2 ]; + unsigned int m_CurrQueue; + double m_CurrCount; + + TPeakDetector m_PeakDetector; }; } // ecapseman } // ecapseman -/* TODO - #ifndef ITK_MANUAL_INSTANTIATION - # include - #endif // ITK_MANUAL_INSTANTIATION -*/ +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Base__Mori__h__