diff --git a/Applications/Projections/otbOrthoRectification.cxx b/Applications/Projections/otbOrthoRectification.cxx index ac0ff39f4e0c8646207cd0fc61fba175ea66c2d3..fc8ccbfa26c49992b4057ab9e447466c5a699be0 100644 --- a/Applications/Projections/otbOrthoRectification.cxx +++ b/Applications/Projections/otbOrthoRectification.cxx @@ -86,7 +86,7 @@ private: SetName("OrthoRectification"); std::ostringstream oss; oss << "Using available image metadata to determine the sensor model,"<<std::endl; - oss << "computes a cartographic projection of the image" + oss << "computes a cartographic projection of the image"; SetDescription(oss.str()); } @@ -144,7 +144,7 @@ private: AddParameter(ParameterType_Int, "rpc.ncp", "Nb control Points"); std::ostringstream oss; oss << "Activate RPC sensor model estimation"<<std::endl;; - oss << "Parameter is the number of control points per axis" + oss << "Parameter is the number of control points per axis"; SetParameterDescription("rpc",oss.str().c_str()); MandatoryOff("rpc"); MandatoryOff("rpc.ncp"); @@ -175,9 +175,9 @@ private: SetParameterString("map", "epsg"); MandatoryOff("map.epsg.code"); - // descriptor->AddOption("LocMapSpacing", - // "Generate a coarser deformation field with the given spacing.","lmSpacing", - // 1, false, otb::ApplicationDescriptor::Real); + // Deformation Field Spacing + AddParameter(ParameterType_Float, "gridspacing", "Generate a coarser deformation field with the given spacing"); + MandatoryOff("gridspacing"); } void DoUpdateParameters() @@ -450,6 +450,16 @@ private: m_ResampleFilter->SetOutputOrigin(ul); } + // Deformation Field spacing + ResampleFilterType::SpacingType gridSpacing; + if (IsParameterEnabled("gridspacing")) + { + gridSpacing[0] = GetParameterFloat("gridspacing"); + gridSpacing[1] = -GetParameterFloat("gridspacing"); + std::cout <<"grid spacing is "<< gridSpacing << std::endl; + m_ResampleFilter->SetDeformationFieldSpacing(gridSpacing); + } + // Output Image SetParameterOutputImage("out", m_ResampleFilter->GetOutput()); }