]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Functors/RegionGrowAllBelongsFunction.h
Multiple thresholds region grow segmentation almost added.
[FrontAlgorithms.git] / lib / fpa / Image / Functors / RegionGrowAllBelongsFunction.h
index ca520505069b13503ad345013f87cee058f6d780..e352f59817c934bd6528eb21ac8344b0a6ff09b3 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __FPA__IMAGE__FUNCTORS__REGIONGROWALLBELONGSFUNCTION__H__
 #define __FPA__IMAGE__FUNCTORS__REGIONGROWALLBELONGSFUNCTION__H__
 
-#include <itkImageFunction.h>
+#include <fpa/Image/Functors/ImageFunction.h>
 
 namespace fpa
 {
@@ -13,45 +13,26 @@ namespace fpa
        */
       template< class I >
       class RegionGrowAllBelongsFunction
-        : public itk::ImageFunction< I, bool >
+        : public fpa::Image::Functors::ImageFunction< I, bool >
       {
       public:
         /// Type-related and pointers
-        typedef RegionGrowAllBelongsFunction    Self;
-        typedef itk::ImageFunction< I, bool >   Superclass;
-        typedef itk::SmartPointer< Self >       Pointer;
-        typedef itk::SmartPointer< const Self > ConstPointer;
+        typedef RegionGrowAllBelongsFunction                   Self;
+        typedef fpa::Image::Functors::ImageFunction< I, bool > Superclass;
+        typedef itk::SmartPointer< Self >                      Pointer;
+        typedef itk::SmartPointer< const Self >                ConstPointer;
 
         // Superclass' types
-        typedef typename Superclass::InputImageType      InputImageType;
-        typedef typename Superclass::InputPixelType      InputPixelType;
-        typedef typename Superclass::OutputType          OutputType;
-        typedef typename Superclass::CoordRepType        CoordRepType;
-        typedef typename Superclass::IndexType           IndexType;
-        typedef typename Superclass::IndexValueType      IndexValueType;
-        typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
-        typedef typename Superclass::PointType           PointType;
+        typedef typename Superclass::TInputImage  TInputImage;
+        typedef typename Superclass::TOutputValue TOutputValue;
+        typedef typename Superclass::TIndex       TIndex;
 
       public:
         itkNewMacro( Self );
         itkTypeMacro( RegionGrowAllBelongsFunction, itkImageFunction );
 
       public:
-        virtual OutputType Evaluate( const PointType& point ) const
-          {
-            IndexType index;
-            this->ConvertPointToNearestIndex( point, index );
-            return( this->EvaluateAtIndex( index ) );
-          }
-        virtual OutputType EvaluateAtContinuousIndex(
-          const ContinuousIndexType& cindex
-          ) const
-          {
-            IndexType index;
-            this->ConvertContinuousIndexToNearestIndex( cindex, index );
-            return( this->EvaluateAtIndex( index ) );
-          }
-        virtual OutputType EvaluateAtIndex( const IndexType& index ) const
+        virtual TOutputValue Evaluate( const TIndex& idx ) const
           { return( true ); }
 
       protected: