#ifndef __fpa__Image__MoriRegionGrow__h__
#define __fpa__Image__MoriRegionGrow__h__
-#include <fpa/Base/MoriRegionGrow.h>
-#include <fpa/Image/Algorithm.h>
+#include <fpa/Image/RegionGrow.h>
+#include <fpa/Image/Functors/RegionGrow/BinaryThreshold.h>
namespace fpa
{
*/
template< class _TInputImage, class _TOutputImage >
class MoriRegionGrow
- : public fpa::Base::MoriRegionGrow< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
+ : public fpa::Image::RegionGrow< _TInputImage, _TOutputImage >
{
public:
- typedef fpa::Image::Algorithm< _TInputImage, _TOutputImage > TAlgorithm;
- typedef MoriRegionGrow Self;
- typedef fpa::Base::MoriRegionGrow< TAlgorithm > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef MoriRegionGrow Self;
+ typedef fpa::Image::RegionGrow< _TInputImage, _TOutputImage > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
- typedef typename Superclass::TOutput TOutput;
- typedef typename Superclass::TVertex TVertex;
+ typedef typename Superclass::TOutput TOutput;
+ typedef typename Superclass::TVertex TVertex;
+ typedef typename Superclass::TGrowFunction TGrowFunction;
+ typedef
+ fpa::Image::Functors::RegionGrow::BinaryThreshold< _TInputImage >
+ TBinThresholdFunction;
+ typedef typename _TInputImage::PixelType TPixel;
- typedef fpa::Image::Functors::Base< _TInputImage, typename Superclass::TGrowFunction > TGrowFunction;
+ protected:
+ typedef typename Superclass::_TQueueNode _TQueueNode;
+ typedef typename Superclass::_TQueue _TQueue;
public:
itkNewMacro( Self );
- itkTypeMacro( fpa::Image::MoriRegionGrow, fpa::Base::MoriRegionGrow );
+ itkTypeMacro( fpa::Image::MoriRegionGrow, fpa::Image::RegionGrow );
+
+ itkGetConstMacro( Lower, TPixel );
+ itkGetConstMacro( Upper, TPixel );
+ itkGetConstMacro( Step, TPixel );
+ itkGetConstMacro( Sensitivity, double );
+
+ itkSetMacro( Lower, TPixel );
+ itkSetMacro( Upper, TPixel );
+ itkSetMacro( Step, TPixel );
+ itkSetMacro( Sensitivity, double );
protected:
MoriRegionGrow( );
virtual ~MoriRegionGrow( );
- virtual void _BeforeGenerateData( ) fpa_OVERRIDE;
+ virtual bool _ContinueGenerateData( ) override;
+ virtual void _BeforeGenerateData( ) override;
+ virtual void _AfterGenerateData( ) override;
+ virtual void _BeforeLoop( ) override;
+ virtual void _AfterLoop( ) override;
+ virtual bool _UpdateValue( _TQueueNode& v, const _TQueueNode& p ) override;
+ virtual void _UpdateResult( const _TQueueNode& n ) override;
private:
// Purposely not defined
MoriRegionGrow( const Self& other );
Self& operator=( const Self& other );
+
+ protected:
+ TPixel m_Lower;
+ TPixel m_Upper;
+ TPixel m_Step;
+ double m_Sensitivity;
+
+ _TQueue m_NextQueue;
+ unsigned long m_ActualCount;
+ unsigned long m_PrevCount;
+
+ // Standard deviation
+ double m_N;
+ double m_S1;
+ double m_S2;
+ double m_STD;
};
} // ecapseman