diff --git a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx index b673c187adc8fa58939bfcbd8c5ab82fbab8864a..476f7b5710619cc8ba21a12721f723636956398b 100644 --- a/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx +++ b/Modules/Applications/AppImageUtils/app/otbExtractROI.cxx @@ -374,18 +374,7 @@ private: bool CropRegionOfInterest() { FloatVectorImageType::RegionType region; - if ( !HasValue("sizex") ) - SetParameterInt( "sizex" , - GetDefaultParameterInt( "sizex" ) ); - if ( !HasValue("sizey") ) - SetParameterInt( "sizey" , - GetDefaultParameterInt( "sizey" ) ); - if ( !HasValue("startx") ) - SetParameterInt( "startx" , - GetDefaultParameterInt( "startx" ) ); - if ( !HasValue("starty") ) - SetParameterInt( "starty" , - GetDefaultParameterInt( "starty" ) ); + region.SetSize(0, GetParameterInt("sizex")); region.SetSize(1, GetParameterInt("sizey")); region.SetIndex(0, GetParameterInt("startx"));