Commit 4226b9e9 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

BUG : Example/IO test correction

parent ac1b8eef
......@@ -117,17 +117,19 @@ SET(DATA ${OTB_DATA_ROOT}/Input)
SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data)
SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary)
SET(EXE_TESTS ${CXX_TEST_PATH}/otbIOExamplesTests ${CXX_TEST_PATH}/otbIOExamplesTests2)
SET(EXE_TESTS1 ${CXX_TEST_PATH}/otbIOExamplesTests1)
SET(TOL 0.0)
# ------- ExtractROITest----------
ADD_TEST(ExtractROITest ${EXE_TESTS}
ADD_TEST(ExtractROITest ${EXE_TESTS1}
--compare-n-images ${TOL} 2
${BASELINE}/ROI_IMAGERY_RGB.png
${TEMP}/ROI_IMAGERY_RGB.png
${BASELINE}/ROI_IMAGERY_MIR.png
${TEMP}/ROI_IMAGERY_MIR.png
ExtractROITest
......@@ -137,7 +139,7 @@ ADD_TEST(ExtractROITest ${EXE_TESTS}
0 0 100 100
)
ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS}
ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS1}
--compare-image ${TOL} ${BASELINE}/DEMToImageGenerator.tif
${TEMP}/DEMToImageGenerator.tif
DEMToImageGeneratorTest
......@@ -153,7 +155,7 @@ ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS}
)
IF(ITK_USE_REVIEW)
ADD_TEST(LidarToImageExampleTest ${EXE_TESTS}
ADD_TEST(LidarToImageExampleTest ${EXE_TESTS1}
--compare-image ${TOL} ${BASELINE}/lidar-image-4.hdr
${TEMP}/lidar-image-4.hdr
LidarToImageExampleTest
......@@ -166,12 +168,8 @@ ADD_TEST(LidarToImageExampleTest ${EXE_TESTS}
)
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})
ADD_EXECUTABLE(otbIOExamplesTests1 otbIOExamplesTests1.cxx)
TARGET_LINK_LIBRARIES(otbIOExamplesTests1 otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
IF(ITK_USE_REVIEW)
ADD_EXECUTABLE(otbIOExamplesTests2 otbIOExamplesTests2.cxx)
TARGET_LINK_LIBRARIES(otbIOExamplesTests2 otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
ENDIF(ITK_USE_REVIEW)
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -23,10 +23,14 @@
#include <iostream>
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(ExtractROITest);
REGISTER_TEST(DEMToImageGeneratorTest);
#if defined(ITK_USE_REVIEW)
REGISTER_TEST(LidarToImageExampleTest);
#endif(ITK_USE_REVIEW)
}
#undef main
......@@ -36,3 +40,9 @@ REGISTER_TEST(DEMToImageGeneratorTest);
#undef main
#define main DEMToImageGeneratorTest
#include "DEMToImageGenerator.cxx"
#if defined(ITK_USE_REVIEW)
#undef main
#define main LidarToImageExampleTest
#include "LidarToImageExample.cxx"
#endif(ITK_USE_REVIEW)
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
// this file defines the otbMultiScaleTest for the test driver
// and all it expects is that you have a function called RegisterTests
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include <iostream>
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(LidarToImageExampleTest);
}
#undef main
#define main LidarToImageExampleTest
#include "LidarToImageExample.cxx"
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