CMakeLists.txt 6.4 KB
Newer Older
Jordi Inglada's avatar
Jordi Inglada committed
1 2 3
#
#  Examples on the use of Iterators.
#
4 5
project(IteratorExamples)
include_regular_expression("^.*$")
Jordi Inglada's avatar
Jordi Inglada committed
6

7 8
add_executable(ImageRandomConstIteratorWithIndex ImageRandomConstIteratorWithIndex.cxx)
target_link_libraries(ImageRandomConstIteratorWithIndex OTBIO OTBCommon   )
Jordi Inglada's avatar
Jordi Inglada committed
9

10 11
add_executable(NeighborhoodIterators4 NeighborhoodIterators4.cxx)
target_link_libraries(NeighborhoodIterators4 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
12

13 14
add_executable(NeighborhoodIterators5 NeighborhoodIterators5.cxx)
target_link_libraries(NeighborhoodIterators5 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
15

16 17
add_executable(NeighborhoodIterators1 NeighborhoodIterators1.cxx)
target_link_libraries(NeighborhoodIterators1 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
18

19 20
add_executable(NeighborhoodIterators2 NeighborhoodIterators2.cxx)
target_link_libraries(NeighborhoodIterators2 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
21

22 23
add_executable(NeighborhoodIterators3 NeighborhoodIterators3.cxx)
target_link_libraries(NeighborhoodIterators3 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
24

25 26
add_executable(NeighborhoodIterators6 NeighborhoodIterators6.cxx)
target_link_libraries(NeighborhoodIterators6 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
27

28 29
add_executable(ImageRegionIteratorWithIndex ImageRegionIteratorWithIndex.cxx)
target_link_libraries(ImageRegionIteratorWithIndex OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
30

31 32
add_executable(ImageRegionIterator ImageRegionIterator.cxx)
target_link_libraries(ImageRegionIterator OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
33

34 35
add_executable(ImageLinearIteratorWithIndex2 ImageLinearIteratorWithIndex2.cxx)
target_link_libraries(ImageLinearIteratorWithIndex2 OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
36

37 38
add_executable(ImageLinearIteratorWithIndex ImageLinearIteratorWithIndex.cxx)
target_link_libraries(ImageLinearIteratorWithIndex OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
39

40 41
add_executable(ImageSliceIteratorWithIndex ImageSliceIteratorWithIndex.cxx)
target_link_libraries(ImageSliceIteratorWithIndex OTBIO OTBCommon)
Jordi Inglada's avatar
Jordi Inglada committed
42

43 44
add_executable(ShapedNeighborhoodIterators1 ShapedNeighborhoodIterators1.cxx)
target_link_libraries(ShapedNeighborhoodIterators1  OTBIO OTBCommon )
Jordi Inglada's avatar
Jordi Inglada committed
45

46 47
add_executable(ShapedNeighborhoodIterators2 ShapedNeighborhoodIterators2.cxx)
target_link_libraries(ShapedNeighborhoodIterators2  OTBIO OTBCommon )
Jordi Inglada's avatar
Jordi Inglada committed
48

49 50
add_executable(IteratorsExamples IteratorsExamples.cxx )
target_link_libraries(IteratorsExamples OTBIO OTBCommon OTBTesting)
Jordi Inglada's avatar
Jordi Inglada committed
51

Julien Michel's avatar
Julien Michel committed
52

53
if( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
Julien Michel's avatar
Julien Michel committed
54

55
set(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Iterators)
Julien Michel's avatar
Julien Michel committed
56

57 58
set(INPUTDATA ${OTB_DATA_ROOT}/Examples)
set(TEMP ${OTB_BINARY_DIR}/Testing/Temporary)
Julien Michel's avatar
Julien Michel committed
59

60
set(EXE_TESTS ${CXX_TEST_PATH}/otbIteratorsExamplesTests)
Julien Michel's avatar
Julien Michel committed
61

62
set(TOL 0.0)
Julien Michel's avatar
Julien Michel committed
63 64 65 66


# ------- ImageRegionIteratorWithIndexTest----------

67
add_test(itTeImageRegionIteratorWithIndexTest ${EXE_TESTS}
68 69 70 71 72 73
        --compare-n-images ${TOL} 1
        ${BASELINE}/ImageRegionIteratorWithIndexOutput.png
        ${TEMP}/ImageRegionIteratorWithIndexOutput.png
        ImageRegionIteratorWithIndexTest
        ${INPUTDATA}/ROI_QB_MUL_2.tif
        ${TEMP}/ImageRegionIteratorWithIndexOutput.png
Julien Michel's avatar
Julien Michel committed
74 75 76 77
)

# ------- NeighborhoodIterators1Test----------

78
add_test(itTeNeighborhoodIterators1Test ${EXE_TESTS}
79 80 81 82 83 84
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators1a.png
        ${TEMP}/NeighborhoodIterators1a.png
        NeighborhoodIterators1Test
        ${INPUTDATA}/ROI_QB_PAN_1.tif
        ${TEMP}/NeighborhoodIterators1a.png
Julien Michel's avatar
Julien Michel committed
85 86 87 88
)

# ------- NeighborhoodIterators4Test----------

89
add_test(itTeNeighborhoodIterators4Test ${EXE_TESTS}
90 91 92 93 94 95
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators4a.png
        ${TEMP}/NeighborhoodIterators4a.png
        NeighborhoodIterators4Test
        ${INPUTDATA}/QB_Suburb.png
        ${TEMP}/NeighborhoodIterators4a.png
Julien Michel's avatar
Julien Michel committed
96 97 98 99 100
    0
)

# ------- NeighborhoodIterators4Test----------

101
add_test(itTeNeighborhoodIterators4Test ${EXE_TESTS}
102 103 104 105 106 107
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators4b.png
        ${TEMP}/NeighborhoodIterators4b.png
        NeighborhoodIterators4Test
        ${INPUTDATA}/QB_Suburb.png
        ${TEMP}/NeighborhoodIterators4b.png
Julien Michel's avatar
Julien Michel committed
108 109 110 111 112
    1
)

# ------- NeighborhoodIterators4Test----------

113
add_test(itTeNeighborhoodIterators4Test ${EXE_TESTS}
114 115 116 117 118 119
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators4c.png
        ${TEMP}/NeighborhoodIterators4c.png
        NeighborhoodIterators4Test
        ${INPUTDATA}/QB_Suburb.png
        ${TEMP}/NeighborhoodIterators4c.png
Julien Michel's avatar
Julien Michel committed
120 121 122 123 124
    2
)

# ------- NeighborhoodIterators4Test----------

125
add_test(itTeNeighborhoodIterators4Test ${EXE_TESTS}
126 127 128 129 130 131
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators4d.png
        ${TEMP}/NeighborhoodIterators4d.png
        NeighborhoodIterators4Test
        ${INPUTDATA}/QB_Suburb.png
        ${TEMP}/NeighborhoodIterators4d.png
Julien Michel's avatar
Julien Michel committed
132 133 134 135 136
    5
)

# ------- NeighborhoodIterators6Test----------

137
add_test(itTeNeighborhoodIterators6Test ${EXE_TESTS}
138 139 140 141 142
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators6a.png
        ${TEMP}/NeighborhoodIterators6a.png
        NeighborhoodIterators6Test
        ${TEMP}/NeighborhoodIterators6a.png
Julien Michel's avatar
Julien Michel committed
143 144 145 146 147
    100 100
)

# ------- NeighborhoodIterators6Test----------

148
add_test(itTeNeighborhoodIterators6Test ${EXE_TESTS}
149 150 151 152 153
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators6b.png
        ${TEMP}/NeighborhoodIterators6b.png
        NeighborhoodIterators6Test
        ${TEMP}/NeighborhoodIterators6b.png
Julien Michel's avatar
Julien Michel committed
154 155 156 157 158
    50 150
)

# ------- NeighborhoodIterators6Test----------

159
add_test(itTeNeighborhoodIterators6Test ${EXE_TESTS}
160 161 162 163 164
        --compare-n-images ${TOL} 1
        ${BASELINE}/NeighborhoodIterators6c.png
        ${TEMP}/NeighborhoodIterators6c.png
        NeighborhoodIterators6Test
        ${TEMP}/NeighborhoodIterators6c.png
Julien Michel's avatar
Julien Michel committed
165 166 167 168 169
    150 50
)

# ------- ImageRegionIteratorTest----------

170
add_test(itTeImageRegionIteratorTest ${EXE_TESTS}
171 172 173 174 175 176
        --compare-n-images ${TOL} 1
        ${BASELINE}/ImageRegionIteratorOutput.png
        ${TEMP}/ImageRegionIteratorOutput.png
        ImageRegionIteratorTest
        ${INPUTDATA}/QB_Suburb.png
        ${TEMP}/ImageRegionIteratorOutput.png
Julien Michel's avatar
Julien Michel committed
177 178 179 180 181
     10 10 110 140
)

# ------- ShapedNeighborhoodIterators2Test----------

182
add_test(itTeShapedNeighborhoodIterators2Test ${EXE_TESTS}
183 184 185 186 187 188
        --compare-n-images ${TOL} 1
        ${BASELINE}/ShapedNeighborhoodIterators1b.png
        ${TEMP}/ShapedNeighborhoodIterators1b.png
        ShapedNeighborhoodIterators2Test
        ${INPUTDATA}/BinaryImage.png
        ${TEMP}/ShapedNeighborhoodIterators1b.png
Julien Michel's avatar
Julien Michel committed
189 190 191
  4
)

192 193 194
include_directories(${OTB_SOURCE_DIR}/Testing/Code)
add_executable(otbIteratorsExamplesTests otbIteratorsExamplesTests.cxx)
target_link_libraries(otbIteratorsExamplesTests OTBBasicFilters OTBDisparityMap OTBTesting)
Julien Michel's avatar
Julien Michel committed
195

196
endif()