diff --git a/Testing/Code/Projections/CMakeLists.txt b/Testing/Code/Projections/CMakeLists.txt index cd9f63456e6b371acc8d7c6a774dde4b1cba3ed8..8383145fc76235159d6a69d52ea9bbf8dfd970b9 100644 --- a/Testing/Code/Projections/CMakeLists.txt +++ b/Testing/Code/Projections/CMakeLists.txt @@ -620,6 +620,7 @@ ADD_TEST(prTvotbGenericRSResampleImageFilter ${PROJECTIONS_TESTS4} ${LARGEINPUT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF 1000 15 + 0 ${TEMP}/prTvotbGenericRSResampleImageFilterOutput.tif ) ENDIF(OTB_DATA_USE_LARGEINPUT) diff --git a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx index 47956e0cb24c9e5638be9157b48d645df2cc3748..3008cbba84d5960edcd4ce750b12c0d9485048f0 100644 --- a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx +++ b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx @@ -29,9 +29,10 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[]) { const char * infname = argv[1]; - const char * outfname = argv[4]; + const char * outfname = argv[5]; unsigned int isize = atoi(argv[2]); double iGridSpacing = atof(argv[3]); + int useRpc = atoi(argv[4]); // Images definition const unsigned int Dimension = 2; @@ -89,13 +90,16 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[]) resampler->SetOutputProjectionRef(utmRef); resampler->SetInputProjectionRef(reader->GetOutput()->GetProjectionRef()); resampler->SetInputKeywordList(reader->GetOutput()->GetImageKeywordlist()); - + if (useRpc) + { + resampler->SetGridSpacing(1000); + resampler->EstimateInputRpcModelOn(); + } // Write the resampled image typedef otb::StreamingImageFileWriter<ImageType> WriterType; WriterType::Pointer writer= WriterType::New(); writer->SetTilingStreamDivisions(4); - writer->WriteGeomFileOn(); writer->SetFileName(outfname); writer->SetInput(resampler->GetOutput()); writer->Update();