CMakeLists.txt 2.24 KB
Newer Older
Jordi Inglada's avatar
Jordi Inglada committed
1
2
3
4
PROJECT(FeatureExtraction)
INCLUDE_REGULAR_EXPRESSION("^.*$")

ADD_EXECUTABLE(ChangeDetectionFrameworkExample ChangeDetectionFrameworkExample.cxx )
5
TARGET_LINK_LIBRARIES(ChangeDetectionFrameworkExample OTBCommon gdal OTBIO ITKCommon ITKIO)
Jordi Inglada's avatar
Jordi Inglada committed
6

7
ADD_EXECUTABLE(DiffChDet DiffChDet.cxx)
8
TARGET_LINK_LIBRARIES(DiffChDet OTBIO OTBCommon  gdal ITKCommon ITKIO)
9
10

ADD_EXECUTABLE(RatioChDet RatioChDet.cxx)
11
TARGET_LINK_LIBRARIES(RatioChDet OTBIO OTBCommon  gdal ITKCommon ITKIO)
12
13

ADD_EXECUTABLE(CorrelChDet CorrelChDet.cxx)
14
TARGET_LINK_LIBRARIES(CorrelChDet OTBIO OTBCommon  gdal ITKCommon ITKIO)
15
16

ADD_EXECUTABLE(LHMIChDet LHMIChDet.cxx)
17
TARGET_LINK_LIBRARIES(LHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
18
19

ADD_EXECUTABLE(JHMIChDet JHMIChDet.cxx)
20
TARGET_LINK_LIBRARIES(JHMIChDet OTBIO OTBCommon gdal ITKCommon ITKIO ITKStatistics)
Jordi Inglada's avatar
Jordi Inglada committed
21

Julien Michel's avatar
Julien Michel committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

IF( NOT OTB_DISABLE_CXX_TESTING )

SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/ChangeDetection)

SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data)
SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary)

SET(EXE_TESTS ${CXX_TEST_PATH}/otbChangeDetectionExamplesTests)

SET(TOL 0.0)


# ------- CorrelChDetTest----------

ADD_TEST(CorrelChDetTest ${EXE_TESTS}
	--compare-n-images ${TOL} 1
	${BASELINE}/CorrChDet.tif
	${TEMP}/CorrChDet.tif
	CorrelChDetTest
	${INPUTDATA}/ERSBefore.png
	${INPUTDATA}/ERSAfter.png
	${TEMP}/CorrChDet.tif
    15
)

# ------- DiffChDetTest----------

ADD_TEST(DiffChDetTest ${EXE_TESTS}
	--compare-n-images ${TOL} 1
	${BASELINE}/DiffChDet.tif
	${TEMP}/DiffChDet.tif
	DiffChDetTest
	${INPUTDATA}/SpotBefore.png
	${INPUTDATA}/SpotAfter.png
	${TEMP}/DiffChDet.tif
    3
)

# ------- RatioChDetTest----------

ADD_TEST(RatioChDetTest ${EXE_TESTS}
	--compare-n-images ${TOL} 1
	${BASELINE}/RatioChDet.tif
	${TEMP}/RatioChDet.tif
	RatioChDetTest
	${INPUTDATA}/GomaAvant.png
	${INPUTDATA}/GomaApres.png
	${TEMP}/RatioChDet.tif
    3
)


INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")

ADD_EXECUTABLE(otbChangeDetectionExamplesTests otbChangeDetectionExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbChangeDetectionExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction  OTBLearning  OTBMultiScale)

ENDIF( NOT OTB_DISABLE_CXX_TESTING )