Skip to content
Snippets Groups Projects
Commit f211d8ea authored by Grégoire Mercier's avatar Grégoire Mercier
Browse files

TEST: SOM with missing or erroneous value

parent cc2e9908
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,17 @@ ADD_TEST(leTvSOMActivationBuilder ${LEARNING_TESTS2}
${TEMP}/leSOMPoupeesSubActivationMap1.hdr
32 32 10 10 5 1.0 0.1 128)
# ------- otb::SOMbasedImageFilter -----------------------------------
ADD_TEST(leTuSOMbasedImageFilterNew ${LEARNING_TESTS2}
otbSOMbasedImageFilterNew )
# ------ otb::SOMWithMissingValue -----------------------------------
ADD_TEST(leTuSOMWithMissingValueNew ${LEARNING_TESTS2}
otbSOMWithMissingValue )
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbLearningTESTS3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -417,6 +428,8 @@ otbPeriodicSOMNew.cxx
otbPeriodicSOM.cxx
otbSOMActivationBuilderNew.cxx
otbSOMActivationBuilder.cxx
otbSOMbasedImageFilterNew.cxx
otbSOMWithMissingValueNew.cxx
)
SET(BasicLearning_SRCS3
otbSOMClassifierNew.cxx
......
......@@ -41,4 +41,6 @@ void RegisterTests()
REGISTER_TEST(otbPeriodicSOM);
REGISTER_TEST(otbSOMActivationBuilderNew);
REGISTER_TEST(otbSOMActivationBuilder);
REGISTER_TEST(otbSOMbasedImageFilterNew);
REGISTER_TEST(otbSOMWithMissingValue);
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
See ITCopyright.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 "otbVectorImage.h"
#include "itkVariableLengthVector.h"
#include "itkListSample.h"
#include "otbSOMMap.h"
#include "otbPeriodicSOM.h"
#include "otbSOMWithMissingValue.h"
#include "otbFlexibleDistanceWithMissingValue.h"
int otbSOMWithMissingValueNew ( int argc, char * argv[] )
{
const unsigned int Dimension = 2;
typedef double PixelType;
typedef otb::VectorImage< PixelType, Dimension > ImageType;
typedef ImageType::PixelType VectorType;
typedef otb::Statistics::FlexibleDistanceWithMissingValue< VectorType > DistanceType;
typedef otb::SOMMap< VectorType, DistanceType, Dimension > MapType;
typedef itk::Statistics::ListSample< VectorType > SampleListType;
typedef otb::Functor::CzihoSOMLearningBehaviorFunctor LearningBehaviorFunctorType;
typedef otb::Functor::CzihoSOMNeighborhoodBehaviorFunctor NeighborhoodBehaviorFunctorType;
typedef otb::SOMWithMissingValue< SampleListType, MapType,
LearningBehaviorFunctorType, NeighborhoodBehaviorFunctorType > SOMType;
SOMType::Pointer som = SOMType::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.
Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
See ITCopyright.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 "otbVectorImage.h"
#include "itkVariableLengthVector.h"
#include "otbFlexibleDistanceWithMissingValue.h"
#include "otbSOMbasedImageFilter.h"
int otbSOMbasedImageFilterNew ( int argc, char * argv[] )
{
const unsigned int Dimension = 2;
typedef double PixelType;
typedef otb::VectorImage< PixelType, Dimension > ImageType;
typedef ImageType::PixelType VectorType;
typedef otb::Statistics::FlexibleDistanceWithMissingValue< VectorType > DistanceType;
typedef otb::SOMbasedImageFilter< ImageType, ImageType, DistanceType, ImageType >
FilterType;
FilterType::Pointer somFilter = FilterType::New();
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment