Commit 81104c29 authored by Jonathan Guinet's avatar Jonathan Guinet

TEST: add some dm instantiation tests.

parent 539c0a0f
......@@ -5,6 +5,8 @@ IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
SET(DISPARITYMAP_TESTS1 ${CXX_TEST_PATH}/otbDisparityMapTests1)
SET(DISPARITYMAP_TESTS2 ${CXX_TEST_PATH}/otbDisparityMapTests2)
SET(DISPARITYMAP_TESTS3 ${CXX_TEST_PATH}/otbDisparityMapTests3)
SET(DISPARITYMAP_TESTS4 ${CXX_TEST_PATH}/otbDisparityMapTests4)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests1 ~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -283,6 +285,10 @@ ADD_TEST(dmTvSinusoidDeformationFieldEstimation ${DISPARITYMAP_TESTS2}
15 10 10 250 0.95 4 25
)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests3 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ------- otb::StreamingWarpImageFilter ----------
......@@ -467,8 +473,18 @@ ${TEMP}/dmTvPixelWiseBlockMatchingImageFilterNCCOutputMetric.tif
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests3 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests4 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ------- otb::AdhesionCorrectionFilter ----------
ADD_TEST(dmTuAdhesionCorrectionFilterNew ${DISPARITYMAP_TESTS4}
otbAdhesionCorrectionFilterNew)
ADD_TEST(dmTuDisparityMapMedianFilterNew ${DISPARITYMAP_TESTS4}
otbDisparityMapMedianFilterNew)
ADD_TEST(dmTuSubPixelDisparityImageFilterrNew ${DISPARITYMAP_TESTS4}
otbSubPixelDisparityImageFilterNew)
# ------- Fichiers sources CXX -----------------------------------
......@@ -510,8 +526,17 @@ otbStereorectificationDeformationFieldSource.cxx
otbPixelWiseBlockMatchingImageFilter.cxx
)
SET(BasicDisparityMap_SRCS4
otbDisparityMapTests4.cxx
otbAdhesionCorrectionFilter.cxx
otbDisparityMapMedianFilter.cxx
otbSubPixelDisparityImageFilter.cxx
)
OTB_ADD_EXECUTABLE(otbDisparityMapTests1 "${BasicDisparityMap_SRCS1}" "OTBDisparityMap;OTBIO;OTBTesting")
OTB_ADD_EXECUTABLE(otbDisparityMapTests2 "${BasicDisparityMap_SRCS2}" "OTBDisparityMap;OTBIO;OTBTesting")
OTB_ADD_EXECUTABLE(otbDisparityMapTests3 "${BasicDisparityMap_SRCS3}" "OTBDisparityMap;OTBIO;OTBTesting")
OTB_ADD_EXECUTABLE(otbDisparityMapTests4 "${BasicDisparityMap_SRCS4}" "OTBDisparityMap;OTBIO;OTBTesting")
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
/*=========================================================================
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.
=========================================================================*/
#include "otbAdhesionCorrectionFilter.h"
#include "otbImage.h"
int otbAdhesionCorrectionFilterNew(int argc, char* argv[])
{
const unsigned int Dimension = 2;
typedef float PixelType;
typedef otb::Image<PixelType, Dimension> ImageType;
typedef unsigned char MaskPixelType;
typedef otb::Image<MaskPixelType, Dimension> MaskType;
typedef otb::AdhesionCorrectionFilter<ImageType, MaskType> AdhesionCorrectionFilterType;
// Instantiation
AdhesionCorrectionFilterType::Pointer filter = AdhesionCorrectionFilterType::New();
return EXIT_SUCCESS;
}
int otbAdhesionCorrectionFilter(int argc, char* argv[])
{
return EXIT_SUCCESS;
}
/*=========================================================================
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.
=========================================================================*/
#include "otbDisparityMapMedianFilter.h"
#include "otbImage.h"
int otbDisparityMapMedianFilterNew(int argc, char* argv[])
{
const unsigned int Dimension = 2;
typedef float PixelType;
typedef otb::Image<PixelType, Dimension> FloatImageType;
typedef otb::DisparityMapMedianFilter<FloatImageType,FloatImageType,FloatImageType> DisparityMapMedianFilterType;
// Instantiation
DisparityMapMedianFilterType::Pointer filter = DisparityMapMedianFilterType::New();
return EXIT_SUCCESS;
}
/*=========================================================================
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 otbDisparityMapTest for the test driver
// and all it expects is that you have a function called RegisterTests
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(otbAdhesionCorrectionFilterNew);
REGISTER_TEST(otbDisparityMapMedianFilterNew);
REGISTER_TEST(otbSubPixelDisparityImageFilterNew);
}
/*=========================================================================
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.
=========================================================================*/
#include "otbSubPixelDisparityImageFilter.h"
#include "otbPixelWiseBlockMatchingImageFilter.h"
#include "otbImage.h"
int otbSubPixelDisparityImageFilterNew(int argc, char* argv[])
{
const unsigned int Dimension = 2;
typedef float PixelType;
typedef otb::Image<PixelType, Dimension> FloatImageType;
typedef unsigned char MaskPixelType;
typedef otb::Image<MaskPixelType, Dimension> MaskType;
typedef otb::Functor::SSDBlockMatching<FloatImageType,FloatImageType> SSDBlockMatchingFunctorType;
typedef otb::SubPixelDisparityImageFilter<FloatImageType,FloatImageType,FloatImageType,FloatImageType,
SSDBlockMatchingFunctorType> SubPixelDisparityImageFilterType;
// Instantiation
SubPixelDisparityImageFilterType::Pointer filter = SubPixelDisparityImageFilterType::New();
return EXIT_SUCCESS;
}
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