Commit a08d587e authored by Guillaume Pasero's avatar Guillaume Pasero

MRG: Synchronize with branch develop

Conflicts:
	.gitlab-ci.yml
	CI/main_ci.cmake
	CI/ubuntu-18.04-llvm-shark.cmake
parents ebc3934b 67881ae4
Pipeline #925 passed with stages
in 34 minutes and 18 seconds
......@@ -44,7 +44,7 @@ native-build:
stage: build
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native:18.04
script:
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc
debian-build:
extends: .general
......@@ -52,14 +52,14 @@ debian-build:
stage: build
image: $BUILD_IMAGE_REGISTRY/otb-debian-native:unstable
script:
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=debian-unstable-gcc
.common-build:
extends: .general
stage: build
image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-shark:18.04
script:
- ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark
- xvfb-run -a -n 1 -s "-screen 0 1024x768x24 -dpi 96" ctest -V -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark
artifacts:
paths:
- build/CookBook-*-html.tar.gz
......
......@@ -51,12 +51,12 @@ OTB_USE_QWT:BOOL=ON
OTB_USE_SHARK:BOOL=ON
OTB_USE_SIFTFAST:BOOL=ON
OTB_USE_SPTW:BOOL=ON
OTB_USE_SSE_FLAGS:BOOL=ON")
OTB_USE_SSE_FLAGS:BOOL=ON
OTB_MPIEXEC_OPT:STRING=--allow-run-as-root")
set (otb_wrap_option
"OTB_WRAP_JAVA:BOOL=ON
OTB_WRAP_PYTHON:BOOL=ON
OTB_WRAP_PYTHON3:BOOL=ON")
OTB_WRAP_PYTHON:BOOL=ON")
set (otb_data_option
"OTB_DATA_USE_LARGEINPUT:BOOL=OFF
......
......@@ -95,6 +95,7 @@ ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
)
if ( NOT _configure_rv EQUAL 0 )
# stop processing here
ctest_submit()
message( FATAL_ERROR "An error occurs during ctest_configure.")
endif()
......@@ -105,7 +106,6 @@ ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
)
if ( NOT _build_rv EQUAL 0 )
ctest_submit()
message( SEND_ERROR "An error occurs during ctest_build.")
endif()
......@@ -118,15 +118,13 @@ if(ENABLE_DOXYGEN)
)
endif()
# Uncomment when ready for test
# ctest_test(PARALLEL_LEVEL 8
# RETURN_VALUE _test_rv
# CAPTURE_CMAKE_ERROR _test_error
# )
ctest_test(PARALLEL_LEVEL 8
RETURN_VALUE _test_rv
CAPTURE_CMAKE_ERROR _test_error
)
# if ( NOT _test_rv EQUAL 0 )
# ctest_submit()
# message( SEND_ERROR "An error occurs during ctest_test.")
# endif()
if ( NOT _test_rv EQUAL 0 )
message( SEND_ERROR "An error occurs during ctest_test.")
endif()
ctest_submit()
......@@ -28,7 +28,8 @@ CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache")
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_USE_SHARK:BOOL=OFF")
if(NOT ${ci_do_cookbook} EQUAL -1)
set(site_option
......
......@@ -224,7 +224,7 @@ endfunction()
function(otb_add_test_mpi)
set( _OPTIONS_ARGS )
set( _ONE_VALUE_ARGS NAME NBPROCS COMMAND)
set( _MULTI_VALUE_ARGS )
set( _MULTI_VALUE_ARGS EXTRA_OPT)
cmake_parse_arguments( TEST_MPI "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
# Test nb procs
......@@ -235,6 +235,6 @@ function(otb_add_test_mpi)
foreach(arg IN LISTS TEST_MPI_UNPARSED_ARGUMENTS)
list(APPEND ARGS ${arg})
endforeach()
set (test_parameters -np ${TEST_MPI_NBPROCS} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_MPI_COMMAND} ${ARGS})
set (test_parameters -n ${TEST_MPI_NBPROCS} ${OTB_MPIEXEC_OPT} ${TEST_MPI_EXTRA_OPT} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_MPI_COMMAND} ${ARGS})
otb_add_test(NAME ${TEST_MPI_NAME} COMMAND ${MPIEXEC} ${test_parameters})
endfunction()
......@@ -101,7 +101,7 @@ endmacro()
function(otb_add_test_mpi)
set( _OPTIONS_ARGS )
set( _ONE_VALUE_ARGS NAME NBPROCS COMMAND)
set( _MULTI_VALUE_ARGS )
set( _MULTI_VALUE_ARGS EXTRA_OPT)
cmake_parse_arguments( TEST_MPI "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN} )
# Test nb procs
......@@ -112,7 +112,7 @@ function(otb_add_test_mpi)
foreach(arg IN LISTS TEST_MPI_UNPARSED_ARGUMENTS)
list(APPEND ARGS ${arg})
endforeach()
set (test_parameters -np ${TEST_MPI_NBPROCS} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_MPI_COMMAND} ${ARGS})
set (test_parameters -n ${TEST_MPI_NBPROCS} ${OTB_MPIEXEC_OPT} ${TEST_MPI_EXTRA_OPT} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_MPI_COMMAND} ${ARGS})
otb_add_test(NAME ${TEST_MPI_NAME} COMMAND ${MPIEXEC} ${test_parameters})
endfunction()
......
%YAML:1.0
---
opencv_ml_dtree:
format: 3
is_classifier: 1
var_all: 5
var_count: 4
ord_var_count: 4
cat_var_count: 1
training_params:
use_surrogates: 0
max_categories: 10
regression_accuracy: 9.9999997764825821e-03
max_depth: 10
min_sample_count: 10
cross_validation_folds: 0
global_var_idx: 1
var_idx: [ 0, 1, 2, 3 ]
var_type: [ 0, 0, 0, 0, 1 ]
cat_ofs: [ 0, 0, 0, 0, 0, 0, 0, 0 ]
class_labels: [ 1, 2, 3, 4 ]
missing_subst: [ 0., 0., 0., 0., 0. ]
nodes:
-
depth: 0
value: 1.
norm_class_idx: 0
splits:
- { var:0, quality:86., le:-8.9000031352043152e-02 }
-
depth: 1
value: 1.
norm_class_idx: 0
splits:
- { var:3, quality:86., le:-1.3876452445983887e+00 }
-
depth: 2
value: 1.
norm_class_idx: 0
-
depth: 2
value: 3.
norm_class_idx: 2
-
depth: 1
value: 2.
norm_class_idx: 1
splits:
- { var:1, quality:86., le:3.4949243068695068e-01 }
-
depth: 2
value: 2.
norm_class_idx: 1
-
depth: 2
value: 4.
norm_class_idx: 3
......@@ -19,7 +19,7 @@
*/
#include "itkMacro.h"
#include "otbMacro.h"
#include "otbImage.h"
#include "otbImageFileReader.h"
......@@ -166,7 +166,7 @@ int main(int argc, char* argv[])
{
typedef OutputPointSetType::PointType OutputPointType;
OutputPointType pCoordinate = (itList.Value());
std::cout << pCoordinate << std::endl;
otbLogMacro(Debug, << pCoordinate);
++itList;
}
......
......@@ -44,6 +44,8 @@
#include "otbVcaImageFilter.h"
#include "otbUnConstrainedLeastSquareImageFilter.h"
#include "itkMersenneTwisterRandomVariateGenerator.h"
int main(int argc, char* argv[])
{
if (argc != 7)
......@@ -71,6 +73,10 @@ int main(int argc, char* argv[])
typedef otb::VectorRescaleIntensityImageFilter<ImageType, ImageType> RescalerType;
typedef otb::VectorImageToMatrixImageFilter<ImageType> VectorImageToMatrixImageFilterType;
// We set the seed of the random number generator.
itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance()->SetSeed(121212);
// We instantiate now the image reader and we set the image file name.
ReaderType::Pointer reader = ReaderType::New();
......
......@@ -66,7 +66,7 @@ otb_add_test(NAME prTeVectorDataProjectionExampleTest COMMAND ${OTB_TEST_DRIVER}
)
otb_add_test(NAME prTeGeometriesProjectionTest COMMAND ${OTB_TEST_DRIVER}
--compare-ogr ${NOTOL}
--compare-ogr ${EPSILON_7}
${BASELINE}/geometriesProjectionExample.shp
${TEMP}/geometriesProjectionExample.shp
Execute $<TARGET_FILE:GeometriesProjectionExample>
......
......@@ -34,7 +34,7 @@
#include "otbSailModel.h"
#include "otbProspectModel.h"
#include "otbMacro.h"
#include "otbImageFileReader.h"
#include "otbImageFileWriter.h"
......@@ -151,13 +151,12 @@ int main(int argc, char* argv[])
for (unsigned int i = 0; i < sail->GetViewingReflectance()->Size(); ++i)
{
std::cout << "wavelength : ";
std::cout << sail->GetViewingReflectance()->GetResponse()[i].first;
std::cout << ". Viewing reflectance ";
std::cout << sail->GetViewingReflectance()->GetResponse()[i].second;
std::cout << ". Hemispherical reflectance ";
std::cout << sail->GetHemisphericalReflectance()->GetResponse()[i].second;
std::cout << std::endl;
otbLogMacro(Debug, << "wavelength : "
<< sail->GetViewingReflectance()->GetResponse()[i].first
<< ". Viewing reflectance "
<< sail->GetViewingReflectance()->GetResponse()[i].second
<< ". Hemispherical reflectance "
<< sail->GetHemisphericalReflectance()->GetResponse()[i].second);
}
std::ofstream outputFile(OutputName, std::ios::out);
......
......@@ -19,6 +19,7 @@
*/
#include "otbImageKeywordlist.h"
#include "otbConfigurationManager.h"
#include <cassert>
......@@ -38,6 +39,7 @@
#include "ossim/ossimTileMapModel.h"
#include "ossim/projection/ossimProjectionFactoryRegistry.h"
#include "ossim/projection/ossimRpcModel.h"
#include "ossim/base/ossimNotify.h"
#pragma GCC diagnostic pop
#else
#include "ossim/base/ossimKeywordlist.h"
......@@ -47,6 +49,7 @@
#include "ossim/ossimTileMapModel.h"
#include "ossim/projection/ossimProjectionFactoryRegistry.h"
#include "ossim/projection/ossimRpcModel.h"
#include "ossim/base/ossimNotify.h"
#endif
#include "otbSensorModelAdapter.h"
......@@ -228,6 +231,15 @@ ReadGeometryFromImage(const std::string& filename, bool checkRpcTag)
ossimKeywordlist geom_kwl; // = new ossimKeywordlist();
ImageKeywordlist otb_kwl;
// Save Ossim notify flags
ossimPushNotifyFlags();
// Except for DEBUG logger level, only fatal errors of OSSIM should be seen
if(otb::ConfigurationManager::GetLoggerLevel() < itk::LoggerBase::DEBUG)
{
ossimSetNotifyFlag(ossimNotifyFlags_FATAL);
}
/****************************************************/
/* First try : test the OSSIM plugins factory */
/****************************************************/
......@@ -313,6 +325,9 @@ ReadGeometryFromImage(const std::string& filename, bool checkRpcTag)
// which uses ossimSensorModelFactory and ossimPluginProjectionFactory internally,
// thus by-passing the need for a valid ossimImageHandler.
// Restore Ossim notify flags
ossimPopNotifyFlags();
return otb_kwl;
}
......
......@@ -37,6 +37,8 @@
#include "ossim/projection/ossimRpcProjection.h"
#include "ossim/ossimPluginProjectionFactory.h"
#include "ossim/base/ossimTieGptSet.h"
#include "ossim/projection/ossimRpcSolver.h"
#include "ossim/imaging/ossimImageGeometry.h"
#pragma GCC diagnostic pop
#else
......@@ -46,6 +48,8 @@
#include "ossim/projection/ossimRpcProjection.h"
#include "ossim/ossimPluginProjectionFactory.h"
#include "ossim/base/ossimTieGptSet.h"
#include "ossim/projection/ossimRpcSolver.h"
#include "ossim/imaging/ossimImageGeometry.h"
#endif
......@@ -221,8 +225,36 @@ double SensorModelAdapter::Optimize()
}
else if (simpleRpcModel != nullptr)
{
// Call optimize fit
precision = simpleRpcModel->optimizeFit(*m_TiePoints);
ossimRefPtr<ossimRpcSolver> rpcSolver = new ossimRpcSolver(false, false);
std::vector<ossimDpt> imagePoints;
std::vector<ossimGpt> groundPoints;
m_TiePoints->getSlaveMasterPoints(imagePoints, groundPoints);
rpcSolver->solveCoefficients(imagePoints, groundPoints);
#if OTB_OSSIM_VERSION < 20200
ossimRefPtr<ossimRpcProjection> rpcProjection = dynamic_cast<ossimRpcProjection*>(rpcSolver->createRpcProjection()->getProjection());
#else
ossimRefPtr<ossimRpcModel> rpcProjection = rpcSolver->getRpcModel();
#endif
if (!rpcProjection)
{
itkExceptionMacro(<< "Optimize(): Failed to solve RPC!");
}
ossimKeywordlist geom;
rpcProjection->saveState(geom);
#if OTB_OSSIM_VERSION < 20200
simpleRpcModel->loadState(geom);
#else
// we have to convert simpleRpcModel into an ossimRpcModel
delete m_SensorModel;
m_SensorModel = new ossimRpcModel;
m_SensorModel->loadState(geom);
#endif
precision = std::pow(rpcSolver->getRmsError(), 2);
}
}
......@@ -238,6 +270,18 @@ bool SensorModelAdapter::ReadGeomFile(const std::string & infile)
m_SensorModel = ossimSensorModelFactory::instance()->createProjection(geom);
// search for ossimRpcProjection (not in ossimSensorModelFactory since OSSIM 2)
const char * typeValue = geom.find(0, "type");
if (m_SensorModel == nullptr && strcmp(typeValue, "ossimRpcProjection") == 0)
{
m_SensorModel = new ossimRpcProjection;
if (!m_SensorModel->loadState(geom))
{
delete m_SensorModel;
m_SensorModel = nullptr;
}
}
if (m_SensorModel == nullptr)
{
m_SensorModel = ossimplugins::ossimPluginProjectionFactory::instance()->createProjection(geom);
......
......@@ -44,7 +44,7 @@ otb_test_application(NAME apTvUtDynamicConvertBasic
otb_test_application(NAME apTuUtDynamicConvertExtendedFilename_writer
APP DynamicConvert
OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif
-out ${TEMP}/apTvUtGeomExtendedFilename.tif?&gdal:co:TILED=YES&writegeom=false
-out ${TEMP}/apTvUtNoGeomExtendedFilename.tif?&gdal:co:TILED=YES&writegeom=false
)
otb_test_application(NAME apTvUtDynamicConvertExtendedFilename_readerGEOM
......
......@@ -140,7 +140,7 @@ private:
iss >> x >> y >> lon >> lat;
z = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(lon,lat);
otbAppLogINFO("Adding tie point x="<<x<<", y="<<y<<", z="<<z<<", lon="<<lon<<", lat="<<lat);
otbAppLogDEBUG("Adding tie point x="<<x<<", y="<<y<<", z="<<z<<", lon="<<lon<<", lat="<<lat);
Point2DType p1;
Point3DType p2;
......
......@@ -118,9 +118,12 @@ private:
otb::SensorModelAdapter::Pointer sm_ref = otb::SensorModelAdapter::New();
// Read the geom file
sm->ReadGeomFile(GetParameterString("ingeom"));
bool isRead = sm->ReadGeomFile(GetParameterString("ingeom"));
sm_ref->ReadGeomFile(GetParameterString("ingeom"));
if (!isRead)
otbAppLogFATAL("Can't read the input geom file!");
// Setup the DEM Handler
otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
......@@ -156,7 +159,7 @@ private:
z = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(lon,lat);
otbAppLogINFO("Adding tie point x="<<x<<", y="<<y<<", z="<<z<<", lon="<<lon<<", lat="<<lat);
otbAppLogDEBUG("Adding tie point x="<<x<<", y="<<y<<", z="<<z<<", lon="<<lon<<", lat="<<lat);
sm->AddTiePoint(x,y,z,lon,lat);
......@@ -210,6 +213,7 @@ private:
ofs<<"#ref_lon ref_lat elevation predicted_lon predicted_lat predicted_elev x_error_ref(meters) y_error_ref(meters) global_error_ref(meters) x_error(meters) y_error(meters) global_error(meters)"<<std::endl;
}
size_t validPoints=0;
for(TiePointsType::const_iterator it = tiepoints.begin();
it!=tiepoints.end(); ++it)
{
......@@ -217,6 +221,22 @@ private:
sm->ForwardTransformPoint(it->first[0],it->first[1],it->first[2],tmpPoint[0],tmpPoint[1],tmpPoint[2]);
sm_ref->ForwardTransformPoint(it->first[0],it->first[1],it->first[2],tmpPoint_ref[0],tmpPoint_ref[1],tmpPoint_ref[2]);
if (!(std::isfinite(tmpPoint[0]) &&
std::isfinite(tmpPoint[1]) &&
std::isfinite(tmpPoint[2])))
{
otbAppLogWARNING("Can't project tie point at ["<<it->first[0]<<","<<it->first[1]<<","<<it->first[2]<<"] with optimized model!");
continue;
}
if (!(std::isfinite(tmpPoint_ref[0]) &&
std::isfinite(tmpPoint_ref[1]) &&
std::isfinite(tmpPoint_ref[2])))
{
otbAppLogWARNING("Can't project tie point at ["<<it->first[0]<<","<<it->first[1]<<","<<it->first[2]<<"] with original model!");
continue;
}
tmpPoint = rsTransform->TransformPoint(tmpPoint);
tmpPoint_ref = rsTransform->TransformPoint(tmpPoint_ref);
......@@ -257,29 +277,34 @@ private:
meanx_ref += xerror_ref;
meany_ref += yerror_ref;
validPoints++;
}
if (!validPoints)
{
otbAppLogFATAL("No valid points to compute RMSE !");
}
rmse/=tiepoints.size();
rmse/=validPoints;
rmsex/=tiepoints.size();
rmsex/=validPoints;
rmsey/=tiepoints.size();
rmsey/=validPoints;
meanx/=tiepoints.size();
meany/=tiepoints.size();
meanx/=validPoints;
meany/=validPoints;
rmse_ref/=tiepoints.size();
rmse_ref/=validPoints;
rmsex_ref/=tiepoints.size();
rmsex_ref/=validPoints;
rmsey_ref/=tiepoints.size();
rmsey_ref/=validPoints;
meanx_ref/=tiepoints.size();
meany_ref/=tiepoints.size();
meanx_ref/=validPoints;
meany_ref/=validPoints;
double stdevx = std::sqrt(rmsex - meanx * meanx);
......
......@@ -151,6 +151,14 @@ otb_test_application(NAME apTvPrConvertCartoToGeoPoint
#----------- GenerateRPCSensorModel TESTS ----------------
# Remove baseline for OSSIM >= 2.2, as ossimRPCProjection.optimizeFit() is broken
set(VALID_CONDITION)
if(OTB_OSSIM_VERSION LESS 20200)
set(VALID_CONDITION
VALID --compare-ascii ${EPSILON_3}
${BASELINE_FILES}/apTvPrGenerateRPCSensorModelGeomOutput.geom
${TEMP}/apTvPrGenerateRPCSensorModelGeomOutput.geom)
endif()
otb_test_application(NAME apTvPrGenerateRPCSensorModel
APP GenerateRPCSensorModel
OPTIONS -inpoints ${INPUTDATA}/QB_TOULOUSE_MUL_Extract_500_500_in_tie_points.txt
......@@ -160,9 +168,7 @@ otb_test_application(NAME apTvPrGenerateRPCSensorModel
-map utm -map.utm.zone 31 -map.utm.northhem 1
-elev.dem ${INPUTDATA}/DEM/srtm_directory
-elev.geoid ${INPUTDATA}/DEM/egm96.grd
VALID --compare-ascii ${EPSILON_3}
${BASELINE_FILES}/apTvPrGenerateRPCSensorModelGeomOutput.geom
${TEMP}/apTvPrGenerateRPCSensorModelGeomOutput.geom)
${VALID_CONDITION})
#----------- GridBasedImageResampling TESTS ----------------
......@@ -281,17 +287,24 @@ otb_test_application(NAME apTvPrRefineSensorModel
-elev.geoid ${INPUTDATA}/DEM/egm96.grd
VALID --compare-ascii 0.1
${BASELINE_FILES}/apTvPrRefineSensorModelGeomOutput.geom
${TEMP}/apTvPrRefineSensorModelGeomOutput.geom)
${TEMP}/apTvPrRefineSensorModelGeomOutput.geom
--ignore-lines-with 1 support_data.)
# Remove baseline for OSSIM >= 2, as ossimRPCProjection.optimizeFit() is broken
set(VALID_CONDITION)
if(OTB_OSSIM_VERSION LESS 20200)
set(VALID_CONDITION
VALID --compare-ascii 0.1
${BASELINE_FILES}/apTvPrRefineSensorModelGeomOutput2.geom
${TEMP}/apTvPrRefineSensorModelGeomOutput2.geom)
endif()
otb_test_application(NAME apTvPrRefineSensorModel2
APP RefineSensorModel
OPTIONS -ingeom ${INPUTDATA}/s1a-iw-grd-vh-20150210t060009-20150210t060034-004557-0059a3-002.geom
-inpoints ${INPUTDATA}/pts_idV5.txt
-outgeom ${TEMP}/apTvPrRefineSensorModelGeomOutput2.geom
VALID --compare-ascii 0.1
${BASELINE_FILES}/apTvPrRefineSensorModelGeomOutput2.geom
${TEMP}/apTvPrRefineSensorModelGeomOutput2.geom)
${VALID_CONDITION})
......
......@@ -95,7 +95,7 @@ otb_test_application(NAME apTvSARPolarMatrixConvertRecLinCovToRecCirCov
OPTIONS
-inc ${BASELINE}/saTvSinclairImageFilter_SinclairToReciprocalCovariance.tif
-conv mlinearcovariancetocircularcovariance
-outc ${TEMP}/apTvSARPolarMatrixConvertRecCovToRecCoh.tif
-outc ${TEMP}/apTvSARPolarMatrixConvertRecLinCovToRecCirCov.tif
)
......
......@@ -22,6 +22,7 @@
#include "otbImage.h"
#include "otbImageFileReader.h"
#include "itkExtractImageFilter.h"
#include "otbMacro.h"
const unsigned int Dimension = 2;
typedef float PixelType;
......@@ -128,9 +129,9 @@ int ValidateAt( ImageType* inputImage, std::vector<ImageType::Pointer> computeRe
PixelType output = computeResults[i]->GetPixel(idx);
PixelType reference = featuresMeans[i];
std::cout << "index : " << idx << std::endl;
std::cout << "compute : " << output << std::endl;
std::cout << "ref : " << reference << std::endl;
otbLogMacro(Debug, << "index = " << idx
<< " ; compute = " << output
<< " ; ref = " << reference);
if (reference != output)
{
......
......@@ -23,6 +23,7 @@
#include "otbImageFileWriter.h"
#include "otbImageFileReader.h"
#include "otbComputeGainLutFilter.h"
#include "otbMacro.h"
int otbComputeGainLutFilter(int itkNotUsed(argc), char * argv [])
{
......@@ -62,7 +63,7 @@ int otbComputeGainLutFilter(int itkNotUsed(argc), char * argv [])
writer->Update();