1 #ifndef __FPA__IMAGE__REGIONGROWWITHMULTIPLETHRESHOLDS__H__
2 #define __FPA__IMAGE__REGIONGROWWITHMULTIPLETHRESHOLDS__H__
6 #include <fpa/Image/RegionGrowWithMultipleCriteria.h>
7 #include <fpa/Image/Functors/RegionGrowThresholdFunction.h>
14 * @param I Input image type
17 class RegionGrowWithMultipleThresholds
18 : public RegionGrowWithMultipleCriteria< I >
21 typedef RegionGrowWithMultipleThresholds Self;
22 typedef RegionGrowWithMultipleCriteria< I > Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef typename I::PixelType TPixel;
28 typedef std::map< TPixel, unsigned long > THistogram;
29 typedef typename Superclass::TBaseAlgorithm TBaseAlgorithm;
30 typedef typename Superclass::TMembershipFunction TMembershipFunction;
31 typedef typename Superclass::TFunctions TFunctions;
33 typedef std::set< TPixel > TThresholds;
34 typedef fpa::Image::Functors::RegionGrowThresholdFunction< I > TFunction;
37 typedef typename TBaseAlgorithm::_TNode _TNode;
41 itkTypeMacro( RegionGrowWithMultipleThresholds, RegionGrow );
43 itkGetConstMacro( DifferenceThreshold, double );
44 itkSetMacro( DifferenceThreshold, double );
47 void AddThreshold( const TPixel& v );
55 RegionGrowWithMultipleThresholds( );
56 virtual ~RegionGrowWithMultipleThresholds( );
58 virtual void _BeforeMainLoop( );
59 virtual void _AfterMainLoop( );
60 virtual void _AfterLoop( );
61 virtual bool _UpdateResult( _TNode& n );
62 virtual void _Mark( const _TNode& n );
63 virtual bool _CheckStopCondition( );
66 RegionGrowWithMultipleThresholds( const Self& ); // Not impl.
67 void operator=( const Self& ); // Not impl.
70 TThresholds m_Thresholds;
71 double m_DifferenceThreshold;
72 THistogram m_Histogram;
73 unsigned long m_TotalCount;
76 TPixel m_StopThreshold;
83 #include <fpa/Image/RegionGrowWithMultipleThresholds.hxx>
85 #endif // __FPA__IMAGE__REGIONGROWWITHMULTIPLETHRESHOLDS__H__