#define __FPA__IMAGE__REGIONGROWWITHMULTIPLETHRESHOLDS__H__
#include <map>
-#include <fpa/Image/RegionGrow.h>
+#include <set>
+#include <fpa/Image/RegionGrowWithMultipleCriteria.h>
+#include <fpa/Image/Functors/RegionGrowThresholdFunction.h>
namespace fpa
{
*/
template< class I >
class RegionGrowWithMultipleThresholds
- : public RegionGrow< I >
+ : public RegionGrowWithMultipleCriteria< I >
{
public:
- typedef RegionGrowWithMultipleThresholds Self;
- typedef RegionGrow< I > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef RegionGrowWithMultipleThresholds Self;
+ typedef RegionGrowWithMultipleCriteria< I > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
typedef typename I::PixelType TPixel;
- typedef std::map< TPixel, unsigned long > THistogram;
- typedef typename Superclass::TBaseAlgorithm TBaseAlgorithm;
+ typedef std::map< TPixel, unsigned long > THistogram;
+ typedef typename Superclass::TBaseAlgorithm TBaseAlgorithm;
+ typedef typename Superclass::TMembershipFunction TMembershipFunction;
+ typedef typename Superclass::TFunctions TFunctions;
+
+ typedef std::set< TPixel > TThresholds;
+ typedef fpa::Image::Functors::RegionGrowThresholdFunction< I > TFunction;
protected:
typedef typename TBaseAlgorithm::_TNode _TNode;
public:
void AddThreshold( const TPixel& v );
void AddThresholds(
- const TPixel& t0, const TPixel& t1,
- const unsigned int& samples
+ const TPixel& t0,
+ const TPixel& t1,
+ const unsigned int& s
);
protected:
virtual ~RegionGrowWithMultipleThresholds( );
virtual bool _UpdateResult( _TNode& n );
+ virtual void _BeforeLoop( );
virtual void _AfterLoop( );
private:
void operator=( const Self& ); // Not impl.
protected:
+ TThresholds m_Thresholds;
double m_DerivativeThreshold;
THistogram m_Histogram;
};