Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
81104c29
Commit
81104c29
authored
Jun 19, 2012
by
Jonathan Guinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST: add some dm instantiation tests.
parent
539c0a0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
1 deletion
+179
-1
Testing/Code/DisparityMap/CMakeLists.txt
Testing/Code/DisparityMap/CMakeLists.txt
+26
-1
Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
+42
-0
Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
+34
-0
Testing/Code/DisparityMap/otbDisparityMapTests4.cxx
Testing/Code/DisparityMap/otbDisparityMapTests4.cxx
+30
-0
Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
...ing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
+47
-0
No files found.
Testing/Code/DisparityMap/CMakeLists.txt
View file @
81104c29
...
...
@@ -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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests
3
~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbDisparityMapTests
4
~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ------- 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
)
Testing/Code/DisparityMap/otbAdhesionCorrectionFilter.cxx
0 → 100644
View file @
81104c29
/*=========================================================================
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
;
}
Testing/Code/DisparityMap/otbDisparityMapMedianFilter.cxx
0 → 100644
View file @
81104c29
/*=========================================================================
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
;
}
Testing/Code/DisparityMap/otbDisparityMapTests4.cxx
0 → 100644
View file @
81104c29
/*=========================================================================
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
);
}
Testing/Code/DisparityMap/otbSubPixelDisparityImageFilter.cxx
0 → 100644
View file @
81104c29
/*=========================================================================
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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment