From 410849523e02bbe85829cd19419bac6dda827ff0 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@c-s.fr>
Date: Thu, 19 Apr 2007 08:44:35 +0000
Subject: [PATCH] =?UTF-8?q?Correction=20suite=20=C3=A0=20refonte=20de=20cl?=
 =?UTF-8?q?asse=20de=20base.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../FeatureExtraction/AlignmentsExample.cxx   |  6 +++---
 .../TouziEdgeDetectorExample.cxx              |  2 +-
 Testing/Code/FeatureExtraction/CMakeLists.txt | 20 +++++++++++++++++++
 .../otbFeatureExtractionTests.cxx             |  2 ++
 Testing/Fa/AlignementsQB.cxx                  |  6 +++---
 5 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/Examples/FeatureExtraction/AlignmentsExample.cxx b/Examples/FeatureExtraction/AlignmentsExample.cxx
index ce4d1519f6..f18ac63af6 100644
--- a/Examples/FeatureExtraction/AlignmentsExample.cxx
+++ b/Examples/FeatureExtraction/AlignmentsExample.cxx
@@ -172,7 +172,7 @@ int main( int argc, char *argv[] )
   
   ListType* pathList = alignFilter->GetOutput();
 
-  ListType::iterator listIt = pathList->begin();
+  ListType::Iterator listIt = pathList->Begin();
 
   // Software Guide : EndCodeSnippet
 
@@ -194,11 +194,11 @@ int main( int argc, char *argv[] )
   //  Software Guide : EndLatex
   
   // Software Guide : BeginCodeSnippet
-  while( listIt != pathList->end())
+  while( listIt != pathList->End())
     {
 
     drawPathFilter->SetImageInput( backgroundImage );
-    drawPathFilter->SetPathInput( *(listIt) );
+    drawPathFilter->SetPathInput( listIt.Get() );
 
     drawPathFilter->SetValue( itk::NumericTraits<OutputPixelType>::max() );
     drawPathFilter->Update();
diff --git a/Examples/FeatureExtraction/TouziEdgeDetectorExample.cxx b/Examples/FeatureExtraction/TouziEdgeDetectorExample.cxx
index 2b538ebf8e..37b9d70095 100644
--- a/Examples/FeatureExtraction/TouziEdgeDetectorExample.cxx
+++ b/Examples/FeatureExtraction/TouziEdgeDetectorExample.cxx
@@ -247,7 +247,7 @@ int main( int argc, char * argv[] )
 
   writer->SetFileName( argv[3] );
   // Software Guide : BeginCodeSnippet
-  rescaler->SetInput( filter->GetOutputDirections() );
+  rescaler->SetInput( filter->GetOutputDirection() );
   writer->SetInput( rescaler->GetOutput() );
   writer->Update();
   // Software Guide : EndCodeSnippet
diff --git a/Testing/Code/FeatureExtraction/CMakeLists.txt b/Testing/Code/FeatureExtraction/CMakeLists.txt
index 047e543d9b..2e2623b9a4 100755
--- a/Testing/Code/FeatureExtraction/CMakeLists.txt
+++ b/Testing/Code/FeatureExtraction/CMakeLists.txt
@@ -486,6 +486,24 @@ ADD_TEST(feTvImageToEdgePathFilterBis ${FEATUREEXTRACTION_TESTS}
         ${TEMP}/feImageToEdgePathFilter_maskrom.png
         0
         )
+# -------            otb::NeighborhoodScalarProductFilter   -------------
+
+
+ADD_TEST(feTuNeighborhoodScalarProductFilterNew ${FEATUREEXTRACTION_TESTS} 
+         otbNeighborhoodScalarProductFilterNew) 
+
+ADD_TEST(feTvNeighborhoodScalarProductFilter ${FEATUREEXTRACTION_TESTS}  
+#  --compare-n-images ${EPSILON} 2
+#		      ${BASELINE}/feTvNeigborhoodScalarProductModulusOutput.hdr
+#		      ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
+#		      ${BASELINE}/feTvNeigborhoodScalarProductDirectionOutput.hdr
+#		      ${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
+        otbNeighborhoodScalarProductFilter
+        ${INPUTDATA}/Line.png
+        ${TEMP}/feTvNeigborhoodScalarProductModulusOutput.hdr
+	${TEMP}/feTvNeigborhoodScalarProductDirectionOutput.hdr
+        1.0
+        )
 
 # A enrichir
 SET(BasicFeatureExtraction_SRCS
@@ -542,6 +560,8 @@ otbFourierMellinImageFilter.cxx
 otbImageToEdgePathFilterNew.cxx
 otbImageToEdgePathFilter.cxx
 otbModulusAndDirectionImageFiltersNew.cxx
+otbNeighborhoodScalarProductFilterNew.cxx
+otbNeighborhoodScalarProductFilter.cxx
 )
 
 
diff --git a/Testing/Code/FeatureExtraction/otbFeatureExtractionTests.cxx b/Testing/Code/FeatureExtraction/otbFeatureExtractionTests.cxx
index ab03deb9bf..53204d5282 100755
--- a/Testing/Code/FeatureExtraction/otbFeatureExtractionTests.cxx
+++ b/Testing/Code/FeatureExtraction/otbFeatureExtractionTests.cxx
@@ -80,4 +80,6 @@ REGISTER_TEST(otbFourierMellinImageFilter);
 REGISTER_TEST(otbImageToEdgePathFilterNew);
 REGISTER_TEST(otbImageToEdgePathFilter);
 REGISTER_TEST(otbModulusAndDirectionImageFiltersNew);
+REGISTER_TEST(otbNeighborhoodScalarProductFilterNew);
+REGISTER_TEST(otbNeighborhoodScalarProductFilter);
 }
diff --git a/Testing/Fa/AlignementsQB.cxx b/Testing/Fa/AlignementsQB.cxx
index 23506a2694..00a962f505 100755
--- a/Testing/Fa/AlignementsQB.cxx
+++ b/Testing/Fa/AlignementsQB.cxx
@@ -103,7 +103,7 @@ int main( int argc, char ** argv )
   
   ListType* listePaths = alignFilter->GetOutput();
 
-  ListType::iterator listIt = listePaths->begin();
+  ListType::Iterator listIt = listePaths->Begin();
 
   BackgroundImageType::Pointer backgroundImage = roiFilter->GetOutput();
 
@@ -111,11 +111,11 @@ int main( int argc, char ** argv )
 
   unsigned int color = 0;
   
-  while( listIt != listePaths->end())
+  while( listIt != listePaths->End())
     {
 
     drawPathFilter->SetImageInput( backgroundImage );
-    drawPathFilter->SetPathInput( *(listIt) );
+    drawPathFilter->SetPathInput(listIt.Get());
     //drawPathFilter->SetPathValue( color );
 
     drawPathFilter->Update();
-- 
GitLab