CMakeLists.txt 6.54 KB
Newer Older
1
2
3
4
5
PROJECT(IOExamples)

ADD_EXECUTABLE(ImageReadWrite ImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(ImageReadWrite OTBCommon OTBIO ITKCommon ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
6
7
8
ADD_EXECUTABLE(StreamingImageReadWrite StreamingImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(StreamingImageReadWrite OTBCommon OTBIO ITKCommon ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
9
10
11
ADD_EXECUTABLE(ExplicitStreamingExample ExplicitStreamingExample.cxx )
TARGET_LINK_LIBRARIES(ExplicitStreamingExample OTBCommon OTBIO ITKCommon ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
12

13
14
ADD_EXECUTABLE(ImageReadCastWrite ImageReadCastWrite.cxx )
TARGET_LINK_LIBRARIES(ImageReadCastWrite OTBCommon OTBIO ITKCommon ITKIO)
15
16

#ADD_EXECUTABLE(ImageReadExtractWrite ImageReadExtractWrite.cxx )
17
#TARGET_LINK_LIBRARIES(ImageReadExtractWrite OTBCommon OTBIO ITKCommon ITKIO)
18

19
20
21
22
ADD_EXECUTABLE(ImageReadRegionOfInterestWrite ImageReadRegionOfInterestWrite.cxx )
TARGET_LINK_LIBRARIES(ImageReadRegionOfInterestWrite OTBCommon OTBIO ITKCommon ITKIO)
ADD_EXECUTABLE(RGBImageReadWrite RGBImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(RGBImageReadWrite OTBCommon OTBIO ITKCommon ITKIO)
23
24
25
26
27
28
29
30
31
32
33
34
35

#ADD_EXECUTABLE(CovariantVectorImageWrite CovariantVectorImageWrite.cxx )
#TARGET_LINK_LIBRARIES(CovariantVectorImageWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(CovariantVectorImageRead CovariantVectorImageRead.cxx )
#TARGET_LINK_LIBRARIES(CovariantVectorImageRead ITKCommon ITKIO)

#ADD_EXECUTABLE(CovariantVectorImageExtractComponent CovariantVectorImageExtractComponent.cxx )
#TARGET_LINK_LIBRARIES(CovariantVectorImageExtractComponent ITKCommon ITKIO)

#ADD_EXECUTABLE(VectorImageReadWrite VectorImageReadWrite.cxx )
#TARGET_LINK_LIBRARIES(VectorImageReadWrite ITKCommon ITKIO)

36
37
38
39
40
41
42
43
ADD_EXECUTABLE(ComplexImageReadWrite ComplexImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(ComplexImageReadWrite OTBCommon OTBIO ITKCommon ITKIO)

ADD_EXECUTABLE(MultibandImageReadWrite MultibandImageReadWrite.cxx )
TARGET_LINK_LIBRARIES(MultibandImageReadWrite OTBCommon OTBIO ITKCommon ITKIO)

ADD_EXECUTABLE(ExtractROI ExtractROI.cxx )
TARGET_LINK_LIBRARIES(ExtractROI OTBCommon OTBIO ITKCommon ITKIO)
44

Jordi Inglada's avatar
Jordi Inglada committed
45
46
47
48
ADD_EXECUTABLE(ImageSeriesIOExample ImageSeriesIOExample.cxx )
TARGET_LINK_LIBRARIES(ImageSeriesIOExample OTBCommon OTBIO ITKCommon ITKIO)


Jordi Inglada's avatar
Jordi Inglada committed
49
50
51
ADD_EXECUTABLE(MetadataExample MetadataExample.cxx )
TARGET_LINK_LIBRARIES(MetadataExample OTBCommon OTBIO ITKCommon ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
52
ADD_EXECUTABLE(DXFReaderExample DXFReaderExample.cxx )
53
TARGET_LINK_LIBRARIES(DXFReaderExample OTBCommon OTBIO ITKCommon ITKIO  ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
Jordi Inglada's avatar
Jordi Inglada committed
54

Jordi Inglada's avatar
Jordi Inglada committed
55
ADD_EXECUTABLE(VectorDataIOExample VectorDataIOExample.cxx )
56
TARGET_LINK_LIBRARIES(VectorDataIOExample OTBCommon OTBIO ITKCommon ITKIO)
Jordi Inglada's avatar
Jordi Inglada committed
57

Cyrille Valladeau's avatar
Cyrille Valladeau committed
58
ADD_EXECUTABLE(DEMToImageGenerator DEMToImageGenerator.cxx )
59
TARGET_LINK_LIBRARIES(DEMToImageGenerator OTBProjections OTBIO OTBCommon ITKCommon ITKIO otbossim )
Jordi Inglada's avatar
Jordi Inglada committed
60

61
62
63
ADD_EXECUTABLE(DEMToOrthoImageGenerator DEMToOrthoImageGenerator.cxx )
TARGET_LINK_LIBRARIES(DEMToOrthoImageGenerator OTBProjections OTBIO OTBCommon ITKCommon ITKIO otbossim )

64
65
66
67
68
IF(ITK_USE_REVIEW)
  ADD_EXECUTABLE(LidarToImageExample LidarToImageExample.cxx )
  TARGET_LINK_LIBRARIES(LidarToImageExample OTBIO OTBCommon ITKCommon ITKIO otbossim )
ENDIF(ITK_USE_REVIEW)

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ADD_EXECUTABLE(ImageReadExportVTK ImageReadExportVTK.cxx )
#TARGET_LINK_LIBRARIES(ImageReadExportVTK ITKCommon ITKIO)

#ADD_EXECUTABLE(RGBImageSeriesReadWrite RGBImageSeriesReadWrite.cxx )
#TARGET_LINK_LIBRARIES(RGBImageSeriesReadWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(ImageSeriesReadWrite ImageSeriesReadWrite.cxx )
#TARGET_LINK_LIBRARIES(ImageSeriesReadWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(ImageReadImageSeriesWrite ImageReadImageSeriesWrite.cxx )
#TARGET_LINK_LIBRARIES(ImageReadImageSeriesWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomSeriesReadImageWrite DicomSeriesReadImageWrite.cxx )
#TARGET_LINK_LIBRARIES(DicomSeriesReadImageWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomSeriesReadImageWrite2 DicomSeriesReadImageWrite2.cxx )
#TARGET_LINK_LIBRARIES(DicomSeriesReadImageWrite2 ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomSeriesReadPrintTags DicomSeriesReadPrintTags.cxx )
#TARGET_LINK_LIBRARIES(DicomSeriesReadPrintTags ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomImageReadPrintTags DicomImageReadPrintTags.cxx )
#TARGET_LINK_LIBRARIES(DicomImageReadPrintTags ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomImageReadWrite DicomImageReadWrite.cxx )
#TARGET_LINK_LIBRARIES(DicomImageReadWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomImageReadChangeHeaderWrite DicomImageReadChangeHeaderWrite.cxx )
#TARGET_LINK_LIBRARIES(DicomImageReadChangeHeaderWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomSeriesReadSeriesWrite DicomSeriesReadSeriesWrite.cxx )
#TARGET_LINK_LIBRARIES(DicomSeriesReadSeriesWrite ITKCommon ITKIO)

#ADD_EXECUTABLE(DicomPrintPatientInformation DicomPrintPatientInformation.cxx )
#TARGET_LINK_LIBRARIES(DicomPrintPatientInformation ITKCommon ITKIO)

#ADD_EXECUTABLE(TransformReadWrite TransformReadWrite.cxx )
#TARGET_LINK_LIBRARIES(TransformReadWrite ITKCommon ITKIO)
Julien Michel's avatar
Julien Michel committed
107

108
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
Thomas Feuvrier's avatar
Thomas Feuvrier committed
109

Julien Michel's avatar
Julien Michel committed
110
111

SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/IO)
112
SET(DATA ${OTB_DATA_ROOT}/Input)
Julien Michel's avatar
Julien Michel committed
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

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

SET(EXE_TESTS ${CXX_TEST_PATH}/otbIOExamplesTests)

SET(TOL 0.0)


# ------- ExtractROITest----------

ADD_TEST(ExtractROITest ${EXE_TESTS}
	--compare-n-images ${TOL} 2
	${BASELINE}/ROI_IMAGERY_RGB.png
	${TEMP}/ROI_IMAGERY_RGB.png
	${BASELINE}/ROI_IMAGERY_MIR.png
	${TEMP}/ROI_IMAGERY_MIR.png
	ExtractROITest
	${INPUTDATA}/IMAGERY_SSECH.tif
	${TEMP}/ROI_IMAGERY_RGB.png
	${TEMP}/ROI_IMAGERY_MIR.png
    0 0 100 100
)

Cyrille Valladeau's avatar
Cyrille Valladeau committed
137
138
139
ADD_TEST(DEMToImageGeneratorTest ${EXE_TESTS}
--compare-image ${TOL}  ${BASELINE}/DEMToImageGenerator.tif
                        ${TEMP}/DEMToImageGenerator.tif
Julien Michel's avatar
Julien Michel committed
140
        DEMToImageGeneratorTest        
Cyrille Valladeau's avatar
Cyrille Valladeau committed
141
         ${TEMP}/DEMToImageGenerator.tif
Thomas Feuvrier's avatar
Commit    
Thomas Feuvrier committed
142
	 ${TEMP}/pretty_DEMToImageGenerator.png
Cyrille Valladeau's avatar
Cyrille Valladeau committed
143
         6.5
144
         45.5
Cyrille Valladeau's avatar
Cyrille Valladeau committed
145
146
         500
         500
147
	 0.002
148
	 -0.002	
Julien Michel's avatar
Julien Michel committed
149
	  ${INPUTDATA}/DEM_srtm
Cyrille Valladeau's avatar
Cyrille Valladeau committed
150
         )
151
152
153
154
155
156
157
158
159
160
161
162
163
164

IF(ITK_USE_REVIEW)
ADD_TEST(LidarToImageExampleTest ${EXE_TESTS}
--compare-image ${TOL}  ${BASELINE}/lidar-image-4.hdr
                        ${TEMP}/lidar-image-4.hdr
         LidarToImageExampleTest
         ${DATA}/TO_core_last_zoom.las
         ${TEMP}/lidar-image-4.hdr
	 ${TEMP}/lidar-image-4.png
         1.0
         5
         4
         )
ENDIF(ITK_USE_REVIEW)
Julien Michel's avatar
Julien Michel committed
165
166

ADD_EXECUTABLE(otbIOExamplesTests otbIOExamplesTests.cxx)
167
TARGET_LINK_LIBRARIES(otbIOExamplesTests otbossim OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction  OTBLearning  OTBMultiScale OTBProjections ITKIO ITKAlgorithms ITKStatistics ITKCommon  ${OTB_IO_UTILITIES_DEPENDENT_LIBRARIES})
Julien Michel's avatar
Julien Michel committed
168

169
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )