From f675971200e4927fa296d69431426788739a198f Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@orfeo-toolbox.org> Date: Tue, 19 Jun 2012 17:28:45 +0200 Subject: [PATCH] TEST: Updating tests --- .../otbOGRDataSourceToLabelImageFilter.txx | 2 +- .../Applications/Rasterization/CMakeLists.txt | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Code/BasicFilters/otbOGRDataSourceToLabelImageFilter.txx b/Code/BasicFilters/otbOGRDataSourceToLabelImageFilter.txx index c6482389bb..6af73ae374 100644 --- a/Code/BasicFilters/otbOGRDataSourceToLabelImageFilter.txx +++ b/Code/BasicFilters/otbOGRDataSourceToLabelImageFilter.txx @@ -202,7 +202,7 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData() for(unsigned int band = 0; band < nbBands;++band) { GDALRasterBandH hBand = GDALGetRasterBand(dataset, band + 1); - GDALSetRasterNoDataValue(hBand, m_BackgroundValue); + GDALFillRaster(hBand, m_BackgroundValue, 0); } // add the geoTransform to the dataset diff --git a/Testing/Applications/Rasterization/CMakeLists.txt b/Testing/Applications/Rasterization/CMakeLists.txt index 185504d721..20beb7234f 100644 --- a/Testing/Applications/Rasterization/CMakeLists.txt +++ b/Testing/Applications/Rasterization/CMakeLists.txt @@ -6,7 +6,9 @@ OTB_TEST_APPLICATION(NAME apTvRsRasterizationLines APP Rasterization OPTIONS -in ${LARGEDATA}/VECTOR/MidiPyrenees/roads.shp -im ${BASELINE}/apTvRsRasterizationLines.tif - -out ${TEMP}/apTvRsRasterizationLines.tif uint8 + -out ${TEMP}/apTvRsRasterizationLines.tif uint8 + -background 255 + -mode.binary.foreground 0 VALID --compare-image ${NOTOL} ${BASELINE}/apTvRsRasterizationLines.tif ${TEMP}/apTvRsRasterizationLines.tif) @@ -26,21 +28,25 @@ OTB_TEST_APPLICATION(NAME apTvRsRasterizationPoints APP Rasterization OPTIONS -in ${LARGEDATA}/VECTOR/MidiPyrenees/points.shp -im ${BASELINE}/apTvRsRasterizationPoints.tif - -out ${TEMP}/apTvRsRasterizationPoints.tif uint8 + -out ${TEMP}/apTvRsRasterizationPoints.tif uint8 + -background 255 + -mode.binary.foreground 0 VALID --compare-image ${NOTOL} ${BASELINE}/apTvRsRasterizationPoints.tif - ${TEMP}/apTvRsRasterizationPoints.tif) + ${TEMP}/apTvRsRasterizationPoints.tif) ENDIF( OTB_DATA_USE_LARGEINPUT ) OTB_TEST_APPLICATION(NAME apTvRsRasterizationPolygons APP Rasterization - OPTIONS -in ${INPUTDATA}/Rasterization/polgons.shp - -szx 1100 - -szy 1100 - -out ${TEMP}/apTvRsRasterizationPolygons.tif uint8 + OPTIONS -in ${INPUTDATA}/Rasterization/polgons.shp + -spx 1. + -spy 1. + -out ${TEMP}/apTvRsRasterizationPolygons.tif uint8 + -background 255 + -mode.binary.foreground 0 VALID --compare-image ${NOTOL} ${BASELINE}/apTvRsRasterizationPolygons.tif - ${TEMP}/apTvRsRasterizationPolygons.tif) + ${TEMP}/apTvRsRasterizationPolygons.tif) ENDIF( OTB_USE_MAPNIK ) -- GitLab