CMakeLists.txt 7.1 KB
Newer Older
Thomas Feuvrier's avatar
Thomas Feuvrier committed
1
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
2

3
4
5
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
6
#Images de teledetection (grosses images )
7
8
9
IF(OTB_DATA_USE_LARGEINPUT)
  SET(IMAGEDATA ${OTB_DATA_LARGEINPUT_ROOT} )
ENDIF(OTB_DATA_USE_LARGEINPUT)
10
11
12
13
14
SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)


#Tolerance sur diff pixel image
SET(TOL 0.0)
Julien Michel's avatar
Julien Michel committed
15
16
SET(EPSILON 0.000001)

17

18
19
SET(VISU_TESTS1 ${CXX_TEST_PATH}/otbVisuTests1)
SET(VISU_TESTS2 ${CXX_TEST_PATH}/otbVisuTests2)
20

21
22
23
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbVISU_Tests1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
24
25
# -------       otb::ImageWidgetBase -----------------------------------

26
ADD_TEST(viTuImageWidgetBaseNew ${VISU_TESTS1} 
27
28
29
30
31
        otbImageWidgetBaseNew
        )

# -------       otb::FixedSizeFullImageWidget -----------------------------------

32
ADD_TEST(viTuFixedSizeFullImageWidgetNew ${VISU_TESTS1} 
33
34
35
        otbFixedSizeFullImageWidgetNew
        )

36
ADD_TEST(viTvFixedSizFullImageWidget ${VISU_TESTS1} 
37
38
39
40
41
42
        otbFixedSizeFullImageWidget
	${INPUTDATA}/poupees.png
        )

# -------       otb::FullResolutionImageWidget -----------------------------------

43
ADD_TEST(viTuFullResolutionImageWidgetNew ${VISU_TESTS1} 
44
45
46
        otbFullResolutionImageWidgetNew
        )

47
ADD_TEST(viTvFullResolutionImageWidget ${VISU_TESTS1} 
48
49
50
51
52
53
        otbFullResolutionImageWidget
	${INPUTDATA}/poupees.png
        )

# -------   otb::ZoomableImageWidget  -----------------------------------

54
ADD_TEST(viTuZoomableImageWidgetNew ${VISU_TESTS1} 
55
56
57
        otbZoomableImageWidgetNew
        )

58
ADD_TEST(viTvZoomableImageWidget ${VISU_TESTS1} 
59
60
61
62
        otbZoomableImageWidget
	${INPUTDATA}/poupees.png
        )

Julien Michel's avatar
Julien Michel committed
63
64
# -------   otb::ImageViewer  -----------------------------------

65
ADD_TEST(viTuImageViewerNew ${VISU_TESTS1} 
Julien Michel's avatar
Julien Michel committed
66
67
68
        otbImageViewerNew
        )

69
ADD_TEST(viTvImageViewerWithOtbVectorImage ${VISU_TESTS1} 
Julien Michel's avatar
Julien Michel committed
70
        otbImageViewer
Julien Michel's avatar
Julien Michel committed
71
	${INPUTDATA}/couleurs.jpg 3
Julien Michel's avatar
Julien Michel committed
72
        )
73

74
75
76
77
78
79
ADD_TEST(viTvImageViewerWithOtbImage ${VISU_TESTS1} 
        otbImageViewerWithOtbImage
        ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
        )

IF(OTB_DATA_USE_LARGEINPUT)
80
ADD_TEST(viTvImageViewerWithLargeOtbVectorImage ${VISU_TESTS1} 
81
        otbImageViewer
Julien Michel's avatar
Julien Michel committed
82
	${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF 0
83
84
        )

Julien Michel's avatar
Julien Michel committed
85
86
87
88
89
90
91
92
93
94
ADD_TEST(viTvModulusImageViewerWithComplexImage ${VISU_TESTS1} 
        otbImageViewer
	${IMAGEDATA}/RADARSAT2/SCENE01/DAT_01.001 1
        )

ADD_TEST(viTvPhaseImageViewerWithComplexImage ${VISU_TESTS1} 
        otbImageViewer
	${IMAGEDATA}/RADARSAT2/SCENE01/DAT_01.001 2
        )

95
ADD_TEST(viTvImageViewerWithLargeOtbImage ${VISU_TESTS1} 
96
        otbImageViewerWithOtbImage
Julien Michel's avatar
Julien Michel committed
97
	${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF 0
98
        )
99
ENDIF(OTB_DATA_USE_LARGEINPUT)
100

101
102
103
104
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbVISU_Tests2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ADD_TEST(viTvImageViewerWithMultiBandFilter ${VISU_TESTS2} 
105
106
107
108
        otbImageViewerWithMultiBandFilter
	${INPUTDATA}/couleurs.jpg
        )

109
ADD_TEST(viTvDoubleImageViewerWithLink ${VISU_TESTS2} 
Julien Michel's avatar
Julien Michel committed
110
111
112
113
        otbDoubleImageViewerWithLink
	${INPUTDATA}/couleurs.jpg
	${INPUTDATA}/couleurs.jpg
        )
114

115
116
# -------   otb::ImageToGrayscaleAnaglyphImageFilter  -----------------------------------

117
ADD_TEST(viTuImageToGrayscaleAnaglyphImageFilterNew ${VISU_TESTS2}
118
119
120
	otbImageToGrayscaleAnaglyphImageFilterNew
)

121
ADD_TEST(viTvImageToGrayscaleAnaglyphImageFilter ${VISU_TESTS2}
122
	--compare-image  ${EPSILON} 
123
124
125
	${BASELINE}/viTvGrayscaleAnaglyphFilterResult.tif
	${TEMP}/viTvGrayscaleAnaglyphFilterResult.tif
	otbImageToGrayscaleAnaglyphImageFilter
126
127
	${INPUTDATA}/anaglyphInput1.tif
	${INPUTDATA}/anaglyphInput2.tif
128
129
130
131
132
	${TEMP}/viTvGrayscaleAnaglyphFilterResult.tif
)

# -------   otb::VectorImageToColorAnaglyphVectorImageFilter  ---------------------------

133
ADD_TEST(viTuVectorImageToColorAnaglyphVectorImageFilterNew ${VISU_TESTS2}
134
135
136
	otbVectorImageToColorAnaglyphVectorImageFilterNew
)

137
ADD_TEST(viTvVectorImageToColorAnaglyphVectorImageFilter ${VISU_TESTS2}
Julien Michel's avatar
Julien Michel committed
138
	--compare-image ${EPSILON}  
139
140
141
	${BASELINE}/viTvColorAnaglyphFilterResult.tif
	${TEMP}/viTvColorAnaglyphFilterResult.tif
	otbVectorImageToColorAnaglyphVectorImageFilter
142
143
	${INPUTDATA}/anaglyphInput1.tif
	${INPUTDATA}/anaglyphInput2.tif
144
145
146
	${TEMP}/viTvColorAnaglyphFilterResult.tif
)

147
# -------  otb::ImageWidgetPolygonForm -------------------------------------------
148
ADD_TEST(viTuImageWidgetPolygonFormNew ${VISU_TESTS2} 
149
150
         otbImageWidgetPolygonFormNew)
  
151
ADD_TEST(viTuImageWidgetPolygonForm ${VISU_TESTS2} 
152
153
154
155
156
         otbImageWidgetPolygonForm
	      	${INPUTDATA}/poupees.tif	
		20 100 70 100 70 90 50 90 50 80 70 80 70 60 90 60 90 50 70 50 70 30 20 30 
)

Julien Michel's avatar
Julien Michel committed
157
# -------       otb::HistogramAndTransferFunctionWidgtet -----------------------------------
158

Julien Michel's avatar
Julien Michel committed
159
160
ADD_TEST(viTuHistogramAndTransferFunctionWidgetNew ${VISU_TESTS2} 
        otbHistogramAndTransferFunctionWidgetNew
Julien Michel's avatar
Julien Michel committed
161
162
        )

Julien Michel's avatar
Julien Michel committed
163
164
ADD_TEST(viTvHistogramAndTransferFunctionWidget ${VISU_TESTS2} 
        otbHistogramAndTransferFunctionWidget
Julien Michel's avatar
Julien Michel committed
165
166
	${INPUTDATA}/GomaAvant.png
        )
167

Julien Michel's avatar
Julien Michel committed
168
# -------       otb::ImageWidgetTransferFunctions -----------------------------------
Julien Michel's avatar
Julien Michel committed
169

Julien Michel's avatar
Julien Michel committed
170
171
ADD_TEST(viTuImageWidgetTransferFunctionsNew ${VISU_TESTS2} 
        otbImageWidgetTransferFunctionsNew
Julien Michel's avatar
Julien Michel committed
172
173
        )

Julien Michel's avatar
Julien Michel committed
174
ADD_TEST(viTvImageWidgetTransferFunctions ${VISU_TESTS2} 
Julien Michel's avatar
Julien Michel committed
175
--compare-ascii ${EPSILON}
Julien Michel's avatar
Julien Michel committed
176
177
178
179
		${BASELINE_FILES}/viTvImageWidgetTransferFunctionsOutput.txt
		${TEMP}/viTvImageWidgetTransferFunctionsOutput.txt
        otbImageWidgetTransferFunctions
	${TEMP}/viTvImageWidgetTransferFunctionsOutput.txt
Julien Michel's avatar
Julien Michel committed
180
181
        )

182
# -------       Fichiers sources CXX -----------------------------------
183
SET(BasicVisu_SRCS1
184
185
186
187
188
189
190
otbImageWidgetBaseNew.cxx
otbFixedSizeFullImageWidgetNew.cxx
otbFixedSizeFullImageWidget.cxx
otbFullResolutionImageWidgetNew.cxx
otbFullResolutionImageWidget.cxx
otbZoomableImageWidgetNew.cxx
otbZoomableImageWidget.cxx
Julien Michel's avatar
Julien Michel committed
191
otbImageViewer.cxx
192
otbImageViewerWithOtbImage.cxx
Julien Michel's avatar
Julien Michel committed
193
otbImageViewerNew.cxx
194
195
196
)
SET(BasicVisu_SRCS2
otbImageViewerWithMultiBandFilter.cxx
Julien Michel's avatar
Julien Michel committed
197
otbDoubleImageViewerWithLink.cxx
198
199
200
201
otbImageToGrayscaleAnaglyphImageFilterNew.cxx
otbImageToGrayscaleAnaglyphImageFilter.cxx
otbVectorImageToColorAnaglyphVectorImageFilterNew.cxx
otbVectorImageToColorAnaglyphVectorImageFilter.cxx
Julien Michel's avatar
Julien Michel committed
202
otbAlternateViewerTest.cxx
203
204
otbImageWidgetPolygonFormNew.cxx
otbImageWidgetPolygonForm.cxx
Julien Michel's avatar
Julien Michel committed
205
206
207
208
otbHistogramAndTransferFunctionWidgetNew.cxx
otbHistogramAndTransferFunctionWidget.cxx
otbImageWidgetTransferFunctions.cxx
otbImageWidgetTransferFunctionsNew.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
209
)
210

211
INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}") 
212

213
ADD_EXECUTABLE(otbVisuTests1 otbVisuTests1.cxx ${BasicVisu_SRCS1})
214
TARGET_LINK_LIBRARIES(otbVisuTests1 OTBVisu OTBIO)
215
ADD_EXECUTABLE(otbVisuTests2 otbVisuTests2.cxx ${BasicVisu_SRCS2})
216
TARGET_LINK_LIBRARIES(otbVisuTests2 OTBVisu OTBIO)
217

Thomas Feuvrier's avatar
Thomas Feuvrier committed
218
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )