From 3cf7661a7eefab7fe4bdd5647cfd8df8179d4075 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@c-s.fr>
Date: Thu, 11 Sep 2008 08:07:05 +0000
Subject: [PATCH] BUG: Changing precision and input image to avoid precision
 loss.

---
 Testing/Code/Common/CMakeLists.txt                        | 8 ++++----
 .../Common/otbUnaryFunctorNeighborhoodImageFilter.cxx     | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Testing/Code/Common/CMakeLists.txt b/Testing/Code/Common/CMakeLists.txt
index 74104c57a5..af3dcae59d 100644
--- a/Testing/Code/Common/CMakeLists.txt
+++ b/Testing/Code/Common/CMakeLists.txt
@@ -469,11 +469,11 @@ otbUnaryFunctorNeighborhoodImageFilterNew
 
 ADD_TEST(coTvUnaryFunctorNeighborhoodImageFilter ${COMMON_TESTS6}
 --compare-image ${TOL}
-		${BASELINE}/coTvUnaryFunctorNeighborhoodImageFilter.tif
-		${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.tif
+		${BASELINE}/coTvUnaryFunctorNeighborhoodImageFilter.png
+		${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.png
     otbUnaryFunctorNeighborhoodImageFilter
-        ${INPUTDATA}/poupees_sub.png
-	${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.tif
+        ${INPUTDATA}/amst.png
+	${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.png
 	3
 )
 
diff --git a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
index 0004555d56..66dc7fea65 100644
--- a/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
+++ b/Testing/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.cxx
@@ -46,7 +46,7 @@ int otbUnaryFunctorNeighborhoodImageFilter(int argc, char * argv[])
   const char * inputFileName  = argv[1];
   const char * outputFileName = argv[2];
   
-  typedef double InputPixelType;
+  typedef unsigned char InputPixelType;
   const int Dimension = 2;
   typedef otb::Image<InputPixelType,Dimension> ImageType;
   typedef ImageType::PixelType PixelType;
-- 
GitLab