]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/RegionGrowWithMultipleThresholds.h
Skeletonization debugged
[FrontAlgorithms.git] / lib / fpa / Image / RegionGrowWithMultipleThresholds.h
index b4c3e4e536480c084c1ba040fa3120c3918e99fc..3bcc7db7abe21be0dd71ff75f491b0cf396c47da 100644 (file)
@@ -30,7 +30,7 @@ namespace fpa
       typedef typename Superclass::TMembershipFunction TMembershipFunction;
       typedef typename Superclass::TFunctions          TFunctions;
 
-      typedef std::set< TPixel >                                     TThresholds;
+      typedef std::set< TPixel >                                   TThresholds;
       typedef fpa::Image::Functors::RegionGrowThresholdFunction< I > TFunction;
 
     protected:
@@ -40,8 +40,13 @@ namespace fpa
       itkNewMacro( Self );
       itkTypeMacro( RegionGrowWithMultipleThresholds, RegionGrow );
 
-      itkGetConstMacro( DerivativeThreshold, double );
-      itkSetMacro( DerivativeThreshold, double );
+      itkGetConstMacro( InsideValue, TPixel );
+      itkGetConstMacro( OutsideValue, TPixel );
+      itkGetConstMacro( DifferenceThreshold, double );
+
+      itkSetMacro( InsideValue, TPixel );
+      itkSetMacro( OutsideValue, TPixel );
+      itkSetMacro( DifferenceThreshold, double );
 
     public:
       void AddThreshold( const TPixel& v );
@@ -55,9 +60,12 @@ namespace fpa
       RegionGrowWithMultipleThresholds( );
       virtual ~RegionGrowWithMultipleThresholds( );
 
-      virtual bool _UpdateResult( _TNode& n );
-      virtual void _BeforeLoop( );
+      virtual void _BeforeMainLoop( );
+      virtual void _AfterMainLoop( );
       virtual void _AfterLoop( );
+      virtual bool _UpdateResult( _TNode& n );
+      virtual void _Mark( const _TNode& n );
+      virtual bool _CheckStopCondition( );
 
     private:
       RegionGrowWithMultipleThresholds( const Self& ); // Not impl.
@@ -65,8 +73,14 @@ namespace fpa
 
     protected:
       TThresholds m_Thresholds;
-      double m_DerivativeThreshold;
+      TPixel m_InsideValue;
+      TPixel m_OutsideValue;
+      double m_DifferenceThreshold;
       THistogram m_Histogram;
+      unsigned long m_TotalCount;
+      double m_LastDiff;
+      bool m_StopForced;
+      TPixel m_StopThreshold;
     };
 
   } // ecapseman