From 6f7865553716f280aab5fd70ef5de9415933cfd5 Mon Sep 17 00:00:00 2001
From: Otmane Lahlou <otmane.lahlou@c-s.fr>
Date: Thu, 29 Jan 2009 18:17:57 +0100
Subject: [PATCH] ENH: change siftfast to otb::SIFT in
 PointSetToDensityImageFilter

---
 Testing/Code/BasicFilters/CMakeLists.txt          |  2 +-
 .../otbPointSetToDensityImageFilterTest.cxx       | 15 ++++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Testing/Code/BasicFilters/CMakeLists.txt b/Testing/Code/BasicFilters/CMakeLists.txt
index cb5c32eccc..39aa54877e 100644
--- a/Testing/Code/BasicFilters/CMakeLists.txt
+++ b/Testing/Code/BasicFilters/CMakeLists.txt
@@ -1151,7 +1151,7 @@ ADD_TEST(bfTvPointSetToDensityImageFilterTest ${BASICFILTERS_TESTS11}
 	    otbPointSetToDensityImageFilterTest
 	 ${INPUTDATA}/QB_Suburb.png
 	 ${TEMP}/bfTvPointSetToDensityImageFilterOutputImage.tif
-	 5 10
+	 3 5 10
 )
 
 # -------    otbPCAShapeModelEstimatorTest   ----------------------------
diff --git a/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx b/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
index d838f87cd9..175efbfe6d 100644
--- a/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
+++ b/Testing/Code/BasicFilters/otbPointSetToDensityImageFilterTest.cxx
@@ -23,7 +23,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkVariableLengthVector.h"
 #include "otbImageFileReader.h"
 #include "otbImageFileWriter.h"
-#include "otbSiftFastImageFilter.h"
+#include "otbImageToSIFTKeyPointSetFilter.h"
 
 
 int otbPointSetToDensityImageFilterTest(int argc, char* argv[] )
@@ -32,7 +32,9 @@ int otbPointSetToDensityImageFilterTest(int argc, char* argv[] )
   const char * infname = argv[1];
   const char * outfname = argv[2];
   const unsigned int scales = atoi(argv[3]);
-  const unsigned int radius = atoi(argv[4]);
+  const unsigned int octaves = atoi(argv[4]);
+  const unsigned int radius = atoi(argv[5]);
+
 
   const   unsigned int                                             Dimension = 2;
   typedef float                                                    PixelType; 
@@ -42,8 +44,8 @@ int otbPointSetToDensityImageFilterTest(int argc, char* argv[] )
   typedef otb::ImageFileWriter<ImageType>                          WriterType;
   typedef itk::VariableLengthVector<PixelType>                     RealVectorType;
   typedef itk::PointSet<RealVectorType,Dimension>                  PointSetType;
-  typedef otb::SiftFastImageFilter<ImageType,PointSetType>         DetectorType;
-  
+  typedef otb::ImageToSIFTKeyPointSetFilter<ImageType,PointSetType>    DetectorType;
+
   typedef otb::PointSetToDensityImageFilter <PointSetType,ImageType>    FunctionType;
  
   /**Instancitation of an object*/
@@ -54,8 +56,11 @@ int otbPointSetToDensityImageFilterTest(int argc, char* argv[] )
   reader->SetFileName(infname);
   reader->GenerateOutputInformation();
  
+
   detector->SetInput(reader->GetOutput());
-  detector->SetNumberOfScales(scales);
+  detector ->SetOctavesNumber(octaves);
+  detector->SetScalesNumber(scales);
+
   
   /** PointSetImageToDensity ImageFilter*/
   filter->SetInput(detector->GetOutput());
-- 
GitLab