From 4b4c3ba680e96530bf87c0603c5c9bd3dfd66b36 Mon Sep 17 00:00:00 2001
From: Victor Poughon <victor.poughon@cnes.fr>
Date: Mon, 11 Mar 2019 10:15:08 +0100
Subject: [PATCH] BUG: fix parameter type error in ExtractROI

---
 .../AppImageUtils/app/otbExtractROI.cxx          | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
index f102a0e571..b148be6bf8 100644
--- a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
+++ b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx
@@ -278,13 +278,17 @@ private:
         SetDefaultParameterInt( "sizey" , largestRegion.GetSize(1) );
         SetDefaultParameterInt( "startx" , largestRegion.GetIndex(0) );
         SetDefaultParameterInt( "starty" , largestRegion.GetIndex(1) );
+
         // Setting actual value
-        if ( !HasUserValue("sizex") )
-          SetParameterFloat( "sizex" , 
-            GetDefaultParameterFloat( "sizex" ) );
-        if ( !HasUserValue("sizey") )
-          SetParameterFloat( "sizey" , 
-            GetDefaultParameterFloat( "sizey" ) );
+        if (!HasUserValue("sizex"))
+        {
+          SetParameterInt("sizex", GetDefaultParameterInt("sizex"));
+        }
+        if (!HasUserValue("sizey"))
+        {
+          SetParameterInt("sizey", GetDefaultParameterInt("sizey"));
+        }
+
         // Compute radius parameters default value
         ComputeRadiusFromIndex( inImage , largestRegion );
         // Compute extent parameters default value
-- 
GitLab