// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Base__MoriRegionGrow__h__ #define __fpa__Base__MoriRegionGrow__h__ namespace fpa { namespace Base { /** */ template< class _TFilter, class _TMarksInterface, class _TSeedsInterface > class MoriRegionGrow : public _TFilter, public _TMarksInterface, public _TSeedsInterface { public: typedef MoriRegionGrow Self; typedef _TFilter Superclass; typedef _TMarksInterface TMarksInterface; typedef _TSeedsInterface TSeedsInterface; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TInputValue TInputValue; typedef typename Superclass::TOutputValue TOutputValue; typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TVertices TVertices; struct TCurveData { TInputValue XValue; unsigned long YValue; double Diff1; TCurveData( TInputValue v, unsigned long c ) { this->XValue = v; this->YValue = c; this->Diff1 = double( 0 ); } }; typedef std::vector< TCurveData > TCurve; public: itkTypeMacro( MoriRegionGrow, TFilter ); itkGetConstMacro( LowerThreshold, TInputValue ); itkGetConstMacro( UpperThreshold, TInputValue ); itkGetConstMacro( DeltaThreshold, TInputValue ); itkGetConstMacro( Curve, TCurve ); itkGetConstMacro( OptimumThreshold, TInputValue ); itkSetMacro( LowerThreshold, TInputValue ); itkSetMacro( UpperThreshold, TInputValue ); itkSetMacro( DeltaThreshold, TInputValue ); public: void SetThresholdRange( const TInputValue& lower, const TInputValue& upper, const TInputValue& delta = TInputValue( 1 ) ); protected: MoriRegionGrow( ); virtual ~MoriRegionGrow( ); virtual void GenerateData( ) override; private: MoriRegionGrow( const Self& other ); Self& operator=( const Self& other ); protected: TInputValue m_LowerThreshold; TInputValue m_UpperThreshold; TInputValue m_DeltaThreshold; TCurve m_Curve; TInputValue m_OptimumThreshold; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Base__MoriRegionGrow__h__ // eof - $RCSfile$