diff --git a/Examples/IO/CMakeLists.txt b/Examples/IO/CMakeLists.txt index 818addbdee83f89e6f0e5286ad953204b24fb803..ffd0465a665677de034d68e27602b0d12da9a306 100644 --- a/Examples/IO/CMakeLists.txt +++ b/Examples/IO/CMakeLists.txt @@ -109,6 +109,7 @@ IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING ) SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/IO) +SET(DATA ${OTB_DATA_ROOT}/Input) SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data) SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary) @@ -147,7 +148,20 @@ ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS} -0.002 ${INPUTDATA}/DEM_srtm ) - + +IF(ITK_USE_REVIEW) +ADD_TEST(LidarToImageExampleTest ${EXE_TESTS} +--compare-image ${TOL} ${BASELINE}/lidar-image-4.hdr + ${TEMP}/lidar-image-4.hdr + LidarToImageExampleTest + ${DATA}/TO_core_last_zoom.las + ${TEMP}/lidar-image-4.hdr + ${TEMP}/lidar-image-4.png + 1.0 + 5 + 4 + ) +ENDIF(ITK_USE_REVIEW) ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx) TARGET_LINK_LIBRARIES(otbIOExamplesTests otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES}) diff --git a/Examples/IO/LidarToImageExample.cxx b/Examples/IO/LidarToImageExample.cxx index 497e4ce2ca01a10b99211464b83cf73a7b88402f..d8af6416fd62eb6ac7d27377630a8d61518516ee 100644 --- a/Examples/IO/LidarToImageExample.cxx +++ b/Examples/IO/LidarToImageExample.cxx @@ -22,13 +22,13 @@ // Software Guide : BeginCommandLineArgs // INPUTS: {TO_core_last_zoom.las} // OUTPUTS: {lidar-image-4.hdr}, {lidar-image-4.png} -// 10.0 5 4 +// 1.0 5 4 // Software Guide : EndCommandLineArgs // Software Guide : BeginCommandLineArgs // INPUTS: {TO_core_last_zoom.las} // OUTPUTS: {lidar-image-8.hdr}, {lidar-image-8.png} -// 10.0 5 8 +// 1.0 5 8 // Software Guide : EndCommandLineArgs diff --git a/Examples/IO/otbIOExamplesTests.cxx b/Examples/IO/otbIOExamplesTests.cxx index d46a3e5bda5961017d6fc0377278d3f42a7d41b1..5a2ded9aad01c872df37c871f06f34a99fbe5d43 100644 --- a/Examples/IO/otbIOExamplesTests.cxx +++ b/Examples/IO/otbIOExamplesTests.cxx @@ -27,6 +27,7 @@ void RegisterTests() { REGISTER_TEST(ExtractROITest); REGISTER_TEST(DEMToImageGeneratorTest); +REGISTER_TEST(LidarToImageExampleTest); } #undef main @@ -37,3 +38,6 @@ REGISTER_TEST(DEMToImageGeneratorTest); #define main DEMToImageGeneratorTest #include "DEMToImageGenerator.cxx" +#undef main +#define main LidarToImageExampleTest +#include "LidarToImageExample.cxx"