From 5b362f3935e284678960a3902f545e8de0f0648a Mon Sep 17 00:00:00 2001
From: Jonathan Guinet <jonathan.guinet@c-s.fr>
Date: Wed, 18 May 2011 09:55:13 +0200
Subject: [PATCH] REFAC GetVAr method modification in MaskMuParserFilter

---
 Code/BasicFilters/otbMaskMuParserFilter.txx | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/Code/BasicFilters/otbMaskMuParserFilter.txx b/Code/BasicFilters/otbMaskMuParserFilter.txx
index 4cdb4a616c..74092ba4f7 100644
--- a/Code/BasicFilters/otbMaskMuParserFilter.txx
+++ b/Code/BasicFilters/otbMaskMuParserFilter.txx
@@ -75,18 +75,12 @@ const std::map<std::string, double*>& MaskMuParserFilter<TInputImage, TOutputIma
   FunctorPointer tempFunctor = FunctorType::New();
   tempFunctor->SetExpression(m_Expression);
 
-  InputImageConstPointer inputPtr = this->GetInput();
-
-  // Define the iterators
-  itk::ImageConstIterator<TInputImage> inputIt(inputPtr, inputPtr->GetRequestedRegion());
-  inputIt.GoToBegin();
-
   FunctorType& functor = *tempFunctor;
 
   try
     {
-    functor(inputIt.Get());
-    //functor(inputPtr->GetPixel(pixelIndex));
+     functor(this->GetInput()->GetPixel(this->GetInput()->GetBufferedRegion().GetIndex()));
+
     }
   catch (itk::ExceptionObject& err)
     {
-- 
GitLab