Commit a6d3fa0e authored by Cédric Traizet's avatar Cédric Traizet

REFAC: added the ExtractROI test with invalid parameters to the main ExtractROI test

parent 80d57094
......@@ -107,7 +107,7 @@ otb_test_application(NAME apTvUtDynamicConvertMask
${TEMP}/apTvUtDynamicConvertMaskOutput.tif)
#----------- PixelInfo TESTS ----------------
#----------- Extract ROI tests ----------------
otb_test_application(NAME apTvUtExtractROIExtentFitVect
APP ExtractROI
......@@ -121,44 +121,6 @@ otb_test_application(NAME apTvUtExtractROIExtentFitVect
# ---------- Invalid configuration tests ----------------
otb_test_application(NAME apTvUtExtractROISizeTooBig
APP ExtractROI
OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
-out ${TEMP}/apTvUtExtractROISizeTooBig.tif
-sizex 1000000
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeTooBig.tif)
otb_test_application(NAME apTvUtExtractROISizeTooBigExtent
APP ExtractROI
OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
-out ${TEMP}/apTvUtExtractROISizeTooBigExtent.tif
-mode extent
-mode.extent.lrx 1000000
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeTooBigExtent.tif)
otb_test_application(NAME apTvUtExtractROISizeTooBigRadius
APP ExtractROI
OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
-out ${TEMP}/apTvUtExtractROISizeTooBigRadius.tif
-mode radius
-mode.radius.r 1000000
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeTooBigRadius.tif)
otb_test_application(NAME apTvUtExtractROISizeNULL
APP ExtractROI
OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
-out ${TEMP}/apTvUtExtractROISizeNULL.tif
-sizex 0
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeNULL.tif)
otb_test_application(NAME apTvUtExtractROIRightInputFile
APP ExtractROI
OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
......
......@@ -181,7 +181,25 @@ int main(int argc, char * argv[])
std::cout << "Test: input Image set with no other parameters" << std::endl;
if (!check_roi(app, 0,0,imageSize,imageSize))
return EXIT_FAILURE;;
return EXIT_FAILURE;
std::cout <<"Test: standard mode with too big size" << std::endl;
extract_roi_standard(app, 0, 0, 10000000, imageSize);
if (!check_roi( app, 0,0, imageSize, imageSize))
return EXIT_FAILURE;
std::cout << "Test: extent mode with too big extent" << std::endl;
extract_roi_extent(app, "pxl", 0, 0, imageSize+1000000, imageSize);
if (!check_roi( app, 0,0, imageSize, imageSize))
return EXIT_FAILURE;
std::cout << "Test: radius mode with too big radius" << std::endl;
extract_roi_radius( app, "pxl", "pxl", 10000000, imageSize/2, imageSize/2);
if (!check_roi( app, 0,0, imageSize, imageSize))
return EXIT_FAILURE;
std::cout << "Test: standard mode" << std::endl;
extract_roi_standard(app, startx, starty, sizex, sizey);
......@@ -203,6 +221,7 @@ int main(int argc, char * argv[])
if (!check_roi( app, startx, starty, sizex, sizey) )
return EXIT_FAILURE;
std::cout << "Test: extent mode with physical unit" << std::endl;
// Find cartographic coordinated corresponding to the input image coordinates.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment