diff --git a/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.h b/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.h
index 4fc9c9d115af553237d7b2521af50c5d6629a9e2..52daf0b5e0d622a4cceec534b1d49cee24fcb7b9 100644
--- a/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.h
+++ b/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.h
@@ -275,6 +275,18 @@ public:
     return m_Functor;
   }
 
+  /** Get the functor for parameters setting */
+  BlockMatchingFunctorType &  GetFunctor()
+  {
+    return m_Functor;
+  }
+
+  /** Get the functor (const version) */
+  const BlockMatchingFunctorType &  GetFunctor() const
+  {
+    return m_Functor;
+  }
+
   /** Set initial horizontal disparity field (optional, override m_InitHorizontalDisparity) */
   void SetHorizontalDisparityInput( const TOutputDisparityImage * hfield);
 
@@ -326,6 +338,9 @@ private:
   /** The exploration radius for disparities (used if non null) */
   SizeType                      m_ExplorationRadius;
 
+  /** Block-matching functor */
+  BlockMatchingFunctorType      m_Functor;  
+
   /** Block-matching functor */
   BlockMatchingFunctorType      m_Functor;  
   
diff --git a/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.txx b/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.txx
index 2a496139fe49df85fd5c96b69fbb811b869d739a..87421374400bf2c85ad384b13d924b62f1ab71f4 100644
--- a/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.txx
+++ b/Code/DisparityMap/otbPixelWiseBlockMatchingImageFilter.txx
@@ -483,7 +483,6 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor>
       useInitDispMaps = true;
       }
     }
-
   // We loop on disparities
   for(int vdisparity = m_MinimumVerticalDisparity; vdisparity <= m_MaximumVerticalDisparity; ++vdisparity)
     {
@@ -599,7 +598,7 @@ TOutputDisparityImage,TMaskImage,TBlockMatchingFunctor>
             hdisparity >= estimatedMinHDisp && hdisparity <= estimatedMaxHDisp)
           {
           // Compute the block matching value
-          double metric = bmFunctor(leftIt,rightIt);
+        double metric = m_Functor(leftIt,rightIt);
   
           // If we are at first loop, fill both outputs
           if(vdisparity == estimatedMinVDisp && hdisparity == estimatedMinHDisp)