Commit 80676832 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'develop' into muparserx_4_0_7

parents 3a35bef9 bf3dc3bc
......@@ -28,6 +28,8 @@ set(OTB_BUILD_SHARED "@BUILD_SHARED_LIBS@")
# List of available OTB modules.
set(OTB_MODULES_ENABLED "@OTB_CONFIG_MODULES_ENABLED@")
set(OTB_APPLICATION_PATH "@OTB_CONFIG_APPLICATION_PATH@")
# Import OTB targets.
set(OTB_CONFIG_TARGETS_FILE "@OTB_CONFIG_TARGETS_FILE@")
if(NOT OTB_TARGETS_IMPORTED@OTB_CONFIG_TARGETS_CONDITION@)
......
......@@ -27,3 +27,11 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ITK_REQUIRED_LINK_
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_FLAGS}")
# OpenCV : no USE_FILE defined
#PYTHONPATH
if( OTB_PYTHONPATH )
if(DEFINED ENV{PYTHONPATH})
set(ENV{PYTHONPATH} "${OTB_PYTHONPATH};$ENV{PYTHONPATH}")
endif()
endif()
......@@ -305,6 +305,12 @@ set(OTB_CONFIG_CODE "
set(OTB_MODULES_DIR \"${OTB_MODULES_DIR}\")")
set(OTB_CONFIG_CMAKE_DIR "${OTB_SOURCE_DIR}/CMake")
set(OTB_USE_FILE "${OTB_CONFIG_CMAKE_DIR}/UseOTB.cmake")
if(OTB_WRAP_PYTHON)
set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_PYTHONPATH \"${OTB_BINARY_DIR}/${OTB_INSTALL_PYTHON_DIR}\")")
endif()
set(OTB_CONFIG_APPLICATION_PATH "${OTB_BINARY_DIR}/${OTB_INSTALL_APP_DIR}")
set(OTB_CONFIG_TARGETS_CONDITION " AND NOT OTB_BINARY_DIR")
set(OTB_CONFIG_TARGETS_FILE "${OTB_BINARY_DIR}/OTBTargets.cmake")
set(OTB_CONFIG_MODULE_API_FILE "${OTB_SOURCE_DIR}/CMake/OTBModuleAPI.cmake")
......@@ -326,6 +332,11 @@ set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_MODULES_DIR \"\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/Modules\")")
set(OTB_USE_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/UseOTB.cmake")
set(OTB_CONFIG_CMAKE_DIR "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}")
if(OTB_WRAP_PYTHON)
set(OTB_CONFIG_CODE "${OTB_CONFIG_CODE}
set(OTB_PYTHONPATH \"\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PYTHON_DIR}\")")
endif()
set(OTB_CONFIG_APPLICATION_PATH "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_APP_DIR}")
set(OTB_CONFIG_TARGETS_CONDITION "")
set(OTB_CONFIG_TARGETS_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBTargets.cmake")
set(OTB_CONFIG_MODULE_API_FILE "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}/OTBModuleAPI.cmake")
......
#!/bin/sh
export LD_LIBRARY_PATH=@OTB_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH
export PYTHONPATH=@OTB_INSTALL_PREFIX@/lib:@OTB_PYTHONPATH@:$PYTHONPATH
export OTB_APPLICATION_PATH=@OTB_INSTALL_PREFIX@/lib/otb/applications
export PYTHONPATH=@OTB_PYTHONPATH@:$PYTHONPATH
export OTB_APPLICATION_PATH=@OTB_APPLICATION_PATH@
@PYTHON_EXECUTABLE@ @CMAKE_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py
......@@ -18,16 +18,14 @@ else()
return()
endif()
set(OTB_PYTHONPATH)
if( EXISTS "${OTB_DIR}/CMakeCache.txt" )
set(OTB_INSTALL_PREFIX ${OTB_DIR})
set(OTB_PYTHONPATH "${OTB_INSTALL_PREFIX}/Modules/Wrappers/SWIG/src")
elseif( EXISTS "${OTB_DIR}/UseOTB.cmake" )
get_filename_component(OTB_INSTALL_PREFIX ${OTB_DIR} PATH)
get_filename_component(OTB_INSTALL_PREFIX ${OTB_INSTALL_PREFIX} PATH)
get_filename_component(OTB_INSTALL_PREFIX ${OTB_INSTALL_PREFIX} PATH)
set(OTB_PYTHONPATH "${OTB_INSTALL_PREFIX}/lib/otb/python")
endif()
get_filename_component(OTB_INSTALL_PREFIX ${OTB_MODULES_DIR} PATH)
get_filename_component(OTB_INSTALL_PREFIX ${OTB_INSTALL_PREFIX} PATH)
get_filename_component(OTB_INSTALL_PREFIX ${OTB_INSTALL_PREFIX} PATH)
get_filename_component(OTB_INSTALL_PREFIX ${OTB_INSTALL_PREFIX} PATH)
message(STATUS "OTB_PYTHONPATH = '${OTB_PYTHONPATH}'")
message(STATUS "OTB_APPLICATION_PATH = '${OTB_APPLICATION_PATH}'")
message(STATUS "OTB_INSTALL_PREFIX = '${OTB_INSTALL_PREFIX}'")
#find Python
find_package(PythonInterp REQUIRED)
......@@ -137,12 +135,19 @@ add_custom_target(CookBookHTMLFromRST
DEPENDS generate_otbapps_rst
COMMENT "Building RST documentation in html")
find_program(TAR_COMMAND
NAMES tar
PATHS /usr/bin
)
find_program(TAR_COMMAND NAMES tar)
mark_as_advanced(TAR_COMMAND)
find_program(PDFLATEX_COMMAND NAMES pdflatex )
mark_as_advanced(PDFLATEX_COMMAND)
find_program(LATEX_COMMAND NAMES latex)
mark_as_advanced(LATEX_COMMAND)
if(NOT LATEX_COMMAND)
message(FATAL_ERROR "latex command not found. please add it to your path")
endif()
if(TAR_COMMAND)
add_custom_target(CookBookArchive
ALL
......@@ -154,12 +159,6 @@ if(TAR_COMMAND)
COMMENT "Creating archive for html CookBook")
endif()
find_program(PDFLATEX_COMMAND
NAMES pdflatex
PATHS /usr/bin
)
mark_as_advanced(PDFLATEX_COMMAND)
if(PDFLATEX_COMMAND)
add_custom_target(CookBookPDFFromRST
ALL
......@@ -167,4 +166,5 @@ if(PDFLATEX_COMMAND)
WORKING_DIRECTORY ${RST_GENERATED_SOURCE_DIR}
DEPENDS generate_otbapps_rst
COMMENT "Building RST documentation in pdf")
endif()
......@@ -49,6 +49,18 @@ The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize your environment
with ``source otbenv.profile``.
Python bindings
---------------
Starting from OTB 5.8.0, OTB python bindings are distributed with binary package.
currently only Python 2.x is supported. If no compatible python is found, installation
notify you about it. If everything works fine, you will be given information about
using python bindings.
You must have python numpy bindings installed in your system. you can install it locally
without admin rights with "pip install --user numpy". This is to give users to choose
their own existing python installation rather than distributing one in OTB package
Notes:
- You must use monteverdi and mapla through ``mapla.sh`` and ``monteverdi.sh`` helper scripts in extracted directory.
......
......@@ -25,6 +25,17 @@ Contents of OTB-|release|-Darwin64 is briefly listed below:
- ``share`` : A folder containing common resources and copyright
mentions.
Python bindings
---------------
Starting from OTB 5.8.0, OTB python bindings are distributed with binary package.
currently only Python 2.x is supported. If no compatible python is found, installation
notify you about it. If everything works fine, you will be given information about
using python bindings.
You must have python numpy bindings installed in your system. you can install it locally
without admin rights with "pip install --user numpy". This is to give users to choose
their own existing python installation rather than distributing one in OTB package
Notes:
- If you want to use the otbcli and otbgui launchers, you must access
......
......@@ -22,6 +22,17 @@ The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize a command prompt
with ``otbenv.bat``.
Python bindings
---------------
Starting from OTB 5.8.0, OTB python bindings are distributed with binary package.
currently only Python 2.x is supported. If no compatible python is found, installation
notify you about it. If everything works fine, you will be given information about
using python bindings.
You must have python numpy bindings installed in your system. you can install it locally
without admin rights with "pip install --user numpy". This is to give users to choose
their own existing python installation rather than distributing one in OTB package
Notes:
~~~~~~
- You must have "Visual C++ Redistributable for Visual Studio 2015" installed for using this package.
......
......@@ -7,10 +7,6 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = @RST_BUILD_DIR@
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
......
......@@ -31,7 +31,7 @@ entry points. The framework can be extended, but Orfeo Toolbox ships with the fo
QGIS.
The OTB Applications are now rich of more than 90 tools, which are
listed in the the applications reference documentation, presented in
listed in the applications reference documentation, presented in
chapter [chap:apprefdoc], page.
Running the applications
......@@ -40,7 +40,7 @@ Running the applications
Common framework
~~~~~~~~~~~~~~~~
All standard applications shared the same implementation and expose
All standard applications share the same implementation and expose
automatically generated interfaces.
Thus, the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For instance, calling ``otbcli_Convert`` will launch the
......@@ -149,8 +149,6 @@ The graphical interface for the applications provides a useful
interactive user interface to set the parameters, choose files, and
monitor the execution progress.
This interface can be activated through the CMake option .
This launcher needs the same two arguments as the command line launcher
:
......@@ -194,12 +192,12 @@ Using the Python interface
~~~~~~~~~~~~~~~~~~~~~~~~~~
The applications can also be accessed from Python, through a module
named ``otbApplication``
named ``otbApplication``.
On Unix systems it is typically available in the ``/usr/lib/otb/python``
directory. You may need to configure the environment variable
``PYTHONPATH`` to include this directory so that the module becomes
available from an Python shell.
On Unix systems, it is typically available in the ``/usr/lib/otb/python``
directory. Depending on how you installed OTB, you may need to configure the
environment variable ``PYTHONPATH`` to include this directory so that the module
becomes available from Python.
On Windows, you can install the ``otb-python`` package, and the module
will be available from an OSGeo4W shell automatically.
......
......@@ -14,7 +14,12 @@
import sys
import os
import sphinx_rtd_theme
HAVE_RTD_THEME=False
try:
import sphinx_rtd_theme
HAVE_RTD_THEME=True
except:
pass
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
......@@ -31,10 +36,12 @@ import sphinx_rtd_theme
# ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.imgmath',
'sphinx.ext.viewcode',
]
imgmath_latex='@LATEX_COMMAND@'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
......@@ -104,15 +111,17 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
if HAVE_RTD_THEME:
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
......@@ -165,13 +174,13 @@ html_static_path = ['_static']
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
......
......@@ -457,12 +457,19 @@ roofs. Data is available in the OTB-Data
and this image is produced with the commands inside this
`file <http://hg.orfeo-toolbox.org/OTB-Applications/file/3ce975605013/Testing/Classification/CMakeLists.txt>`_ .
.. |image_21| image:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. |image_22| image:: ../Art/MonteverdiImages/classification_chain_fancyclassif_fusion.jpg
.. |image_23| image:: ../Art/MonteverdiImages/classification_chain_fancyclassif.jpg
.. figure:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. figure:: ../Art/MonteverdiImages/classification_chain_fancyclassif_fusion.jpg
.. figure:: ../Art/MonteverdiImages/classification_chain_fancyclassif.jpg
.. _Figure2:
+---------------------------+---------------------------+---------------------------+
| |image_21| | |image_22| | |image_23| |
+---------------------------+---------------------------+---------------------------+
Figure 2: From left to right: Original image, result image with fusion (with monteverdi viewer) of original image and fancy classification and input image with fancy color classification from labeled image.
Figure 2: From left to right: Original image, result image with fusion (with monteverdi viewer) of original image and fancy classification and input image with fancy color classification from labeled image.
Fusion of classification maps
-----------------------------
......@@ -476,8 +483,7 @@ Classifications generates a single more robust and precise
classification map which combines the information extracted from the
input list of labeled images.
The *FusionOfClassifications* application has the following input
parameters :
The *FusionOfClassifications* application has the following input parameters:
- ``-il`` list of input labeled classification images to fuse
......@@ -516,30 +522,45 @@ The application can be used like this:
-out MVFusedClassificationMap.tif
Let us consider 6 independent classification maps of the same input
image (Cf. left image in `Figure 1`) generated from 6 different SVM models.
The `Figure 2` represents them after a color mapping by the same LUT.
image (Cf. left image in Figure2_) generated from 6 different SVM models.
The Figure3_ represents them after a color mapping by the same LUT.
Thus, 4 classes (water: blue, roads: gray,vegetation: green,
buildings with red roofs: red) are observable on each of them.
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C1_CM.png
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C2_CM.png
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C3_CM.png
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C4_CM.png
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C5_CM.png
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_C6_CM.png
.. |image_31| image:: ../Art/MonteverdiImages/QB_1_ortho_C1_CM.png
.. |image_32| image:: ../Art/MonteverdiImages/QB_1_ortho_C2_CM.png
.. |image_33| image:: ../Art/MonteverdiImages/QB_1_ortho_C3_CM.png
.. |image_34| image:: ../Art/MonteverdiImages/QB_1_ortho_C4_CM.png
.. |image_35| image:: ../Art/MonteverdiImages/QB_1_ortho_C5_CM.png
.. |image_36| image:: ../Art/MonteverdiImages/QB_1_ortho_C6_CM.png
.. _Figure3:
+---------------------------+---------------------------+---------------------------+
| |image_31| | |image_32| | |image_33| |
+---------------------------+---------------------------+---------------------------+
| |image_34| | |image_35| | |image_36| |
+---------------------------+---------------------------+---------------------------+
Figure 3: Six fancy colored classified images to be fused, generated from 6 different SVM models.
As an example of the *FusionOfClassifications* application by *majority
voting*, the fusion of the six input classification maps represented in
`Figure 3` leads to the classification map illustrated on the right in `Figure 4`.
Figure3_ leads to the classification map illustrated on the right in Figure4_.
Thus, it appears that this fusion highlights the more relevant classes among the six different
input classifications. The white parts of the fused image correspond to
the undecided class labels, i.e. to pixels for which there is not a
unique majority voting.
.. figure:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_MV_C123456_CM.png
.. |image_41| image:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. |image_42| image:: ../Art/MonteverdiImages/QB_1_ortho_MV_C123456_CM.png
.. _Figure4:
+------------------------------------------------+------------------------------------------------+
| |image_41| | |image_42| |
+------------------------------------------------+------------------------------------------------+
Figure 4: From left to right: Original image, and fancy colored classified image obtained by a majority voting fusion of the 6 classification maps represented in Fig. 4.13 (water: blue, roads: gray, vegetation: green, buildings with red roofs: red, undecided: white)
......@@ -586,16 +607,23 @@ The application can be used like this:
-out DSFusedClassificationMap.tif
As an example of the *FusionOfClassifications* application by *Dempster
Shafer*, the fusion of the six input classification maps represented in
`Figure 3` leads to the classification map illustrated on the right in `Figure 5`
[fig:ClassificationMapFusionApplicationDS]. Thus, it appears that this
fusion gives access to a more precise and robust classification map
Shafer*, the fusion of the six input classification maps represented in Figure3_
leads to the classification map illustrated on the right in Figure5_.
Thus, it appears that this fusion gives access to a more precise and robust classification map
based on the confidence level in each classifier.
.. figure:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. figure:: ../Art/MonteverdiImages/QB_1_ortho_DS_V_P_C123456_CM.png
Figure 5: From left to right: Original image, and fancy colored classified image obtained by a Dempster-Shafer fusion of the 6 classification maps represented in Fig. 4.13 (water: blue, roads: gray, vegetation: green, buildings with red roofs: red, undecided: white).
.. |image_51| image:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. |image_52| image:: ../Art/MonteverdiImages/QB_1_ortho_DS_V_P_C123456_CM.png
.. _Figure5:
+------------------------------------------------+------------------------------------------------+
| |image_51| | |image_52| |
+------------------------------------------------+------------------------------------------------+
Figure 5: From left to right: Original image, and fancy colored classified image obtained by a Dempster-Shafer fusion of the 6 classification maps represented in Figure3_ (water: blue, roads: gray, vegetation: green, buildings with red roofs: red, undecided: white).
Recommendations to properly use the fusion of classification maps
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -701,15 +729,14 @@ Example
~~~~~~~
Resulting from the application presented in section :ref:`fancy_classification_results`
and illustrated in Fig. [fig:MeanShiftVectorImageFilter],
the Fig.[fig:ClassificationMapRegularizationApplication] shows a regularization
and illustrated in Figure2_, the Figure6_ shows a regularization
of a classification map composed of 4 classes: water, roads, vegetation
and buildings with red roofs. The radius of the ball shaped structuring
element is equal to 3 pixels, which corresponds to a ball included in a
7 x 7 pixels square. Pixels with more than one majority class keep their
original labels.
|image| |image| |image| [fig:ClassificationMapRegularizationApplication]
Regression
----------
......@@ -720,10 +747,17 @@ a class index) from an input predictor. The workflow is the same as
classification. First, the regression model is trained, then it can be
used to predict output values. The applications to do that are and .
.. figure:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. figure:: ../Art/MonteverdiImages/classification_chain_fancyclassif_CMR_input.png
.. figure:: ../Art/MonteverdiImages/classification_chain_fancyclassif_CMR_3.png
.. |image_61| image:: ../Art/MonteverdiImages/classification_chain_inputimage.jpg
.. |image_62| image:: ../Art/MonteverdiImages/classification_chain_fancyclassif_CMR_input.png
.. |image_63| image:: ../Art/MonteverdiImages/classification_chain_fancyclassif_CMR_3.png
.. _Figure6:
+---------------------------+---------------------------+---------------------------+
| |image_61| | |image_62| | |image_63| |
+---------------------------+---------------------------+---------------------------+
Figure 6: From left to right: Original image, fancy colored classified image and regularized classification map with radius equal to 3 pixels.
The input data set for training must have the following structure :
......
......@@ -1178,6 +1178,7 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
typename FilterType::Pointer overSampledLowPass = FilterType::New();
overSampledLowPass->SetInput(cropedLowPass);
overSampledLowPass->SetSubsampleFactor(delta);
overSampledLowPass->SetNumberOfThreads(1);
overSampledLowPass->Update();
InputImagePointerType cropedHighPass = InputImageType::New();
......@@ -1196,6 +1197,7 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
typename FilterType::Pointer overSampledHighPass = FilterType::New();
overSampledHighPass->SetInput(cropedHighPass);
overSampledHighPass->SetSubsampleFactor(delta);
overSampledHighPass->SetNumberOfThreads(1);
overSampledHighPass->Update();
InnerProductType innerProduct;
......
#Contact: Adrien Lagrange <adrien.lagrange@irit.fr>
otb_fetch_module(OTBFastFeaturesSelection
otb_fetch_module(OTBFFSforGMM
"This module implements a method to perform a fast forward feature selection using a Gaussian Mixture Model.
A more detailed description can be found on the project website:
https://github.com/Laadr/otbFFSforGMM
......
......@@ -28,7 +28,7 @@ if ( OTB_WRAP_PYTHON )
include_directories(${NUMPY_INCLUDE_DIRS})
list(APPEND CMAKE_SWIG_FLAGS "-DOTB_SWIGNUMPY=1")
endif()
set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_SWIG_OUTDIR ${CMAKE_BINARY_DIR}/${OTB_INSTALL_PYTHON_DIR})
set(SWIG_MODULE_otbApplication_EXTRA_DEPS
${CMAKE_CURRENT_SOURCE_DIR}/Python.i
${CMAKE_CURRENT_SOURCE_DIR}/PyCommand.i
......@@ -36,6 +36,7 @@ if ( OTB_WRAP_PYTHON )
OTBApplicationEngine)
SWIG_add_module( otbApplication python otbApplication.i otbApplicationPYTHON_wrap.cxx itkPyCommand.cxx )
SWIG_link_libraries( otbApplication ${PYTHON_LIBRARIES} OTBApplicationEngine )
set_target_properties(_otbApplication PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SWIG_OUTDIR})
if(MSVC)
set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/otbApplicationPYTHON_wrap.cxx COMPILE_FLAGS "/wd4005" )
else()
......@@ -47,7 +48,9 @@ if ( OTB_WRAP_PYTHON )
TARGET _otbApplication
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Byte-compiling otbApplication.py"
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/CMake/PythonCompile.py otbApplication.py
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/CMake/PythonCompile.py
${CMAKE_SWIG_OUTDIR}/otbApplication.py
DEPENDS _otbApplication
)
......@@ -57,8 +60,8 @@ if ( OTB_WRAP_PYTHON )
DESTINATION ${OTB_INSTALL_PYTHON_DIR}
COMPONENT RuntimeLibraries )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/otbApplication.py
${CMAKE_CURRENT_BINARY_DIR}/otbApplication.pyc
install( FILES ${CMAKE_SWIG_OUTDIR}/otbApplication.py
${CMAKE_SWIG_OUTDIR}/otbApplication.pyc
DESTINATION ${OTB_INSTALL_PYTHON_DIR}
COMPONENT RuntimeLibraries )
......
......@@ -14,8 +14,8 @@ PATCH_ELF_EXE="$OUT_DIR/patchelf"
LD_LIBRARY_PATH=
echo "Configuring..."
#BINARY_FILES="@VAR_IN_PKGSETUP_CONFIGURE@"
BINARY_FILES=$(find $OUT_DIR/lib $OUT_DIR/lib/otb/applications $OUT_DIR/bin -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
#see next call below for otb applications
BINARY_FILES=$(find $OUT_DIR/lib $OUT_DIR/bin -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
# run patchelf
for bin_file in $BINARY_FILES; do
......@@ -33,6 +33,15 @@ if [ "$I_AM_XDK" = true ] ; then
sed -i "s,@DEPENDENCIES_INSTALL_DIR@,$OUT_DIR,g" lib/cmake/ITK-@PKG_ITK_SB_VERSION@/ITKTargets-release.cmake
else
OTB_APP_FILES=$(find $OUT_DIR/lib/otb/applications -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
# run patchelf
for app_file in $OTB_APP_FILES; do
#echo "adding rpath to $app_file"
if [ -f "$app_file" ]; then
"$PATCH_ELF_EXE" "--set-rpath" "$OUT_DIR/lib" "$app_file"
fi
done
cat > "$OUT_DIR/monteverdi.sh" << EOF
#!/bin/sh
......
......@@ -74,8 +74,8 @@ function(func_install_xdk_files)
#file(GLOB ITK_EXTRA_DLL_FILES_1 "${DEPENDENCIES_INSTALL_DIR}/bin/libITK*.dll")
#install(FILES ${ITK_EXTRA_DLL_FILES_1} DESTINATION ${PKG_STAGE_DIR}/bin)
#file(GLOB ITK_EXTRA_DLL_FILES_2 "${DEPENDENCIES_INSTALL_DIR}/bin/libitk*.dll")
#install(FILES ${ITK_EXTRA_DLL_FILES_2} DESTINATION ${PKG_STAGE_DIR}/bin)
file(GLOB ITK_EXTRA_DLL_FILES_2 "${DEPENDENCIES_INSTALL_DIR}/bin/itk*.dll")
install(FILES ${ITK_EXTRA_DLL_FILES_2} DESTINATION ${PKG_STAGE_DIR}/bin)
#file(GLOB OPENCV_EXTRA_DLL_FILES "${DEPENDENCIES_INSTALL_DIR}/bin/libopencv*.dll")
#install(FILES ${OPENCV_EXTRA_DLL_FILES} DESTINATION ${PKG_STAGE_DIR}/bin)
......
......@@ -307,7 +307,6 @@ function(func_prepare_package)
endfunction() #func_prepare_package
function(func_process_deps input_file)
search_library(${input_file} PKG_SEARCHDIRS input_file_full_path)
if(NOT input_file_full_path)
message(FATAL_ERROR "${input_file} not found. searched in ${PKG_SEARCHDIRS}")
......@@ -455,9 +454,11 @@ function(pkg_install_rule src_file)
message(FATAL_ERROR "unreachable code")
endif()
set(SKIP_INSTALL FALSE)
setif_value_in_list(is_gtk_lib "${src_file_NAME}" ALLOWED_SYSTEM_DLLS)
if(is_gtk_lib)
set(output_dir "lib/gtk")
set(SKIP_INSTALL TRUE)
endif()
#special case
......@@ -465,19 +466,18 @@ function(pkg_install_rule src_file)
set(output_dir "lib/otb/applications")
set(file_type PROGRAMS)
endif()
set(SKIP_INSTALL FALSE)
if(PKG_GENERATE_XDK)
if ("${src_file_NAME}"
MATCHES
"libOTB|libotb|otbApp|otbapp_|otbTest|libMonteverdi|monteverdi|mapla|iceViewer"
"([Oo][Tt][Bb])|([Mm]onteverdi)|mapla|iceViewer"
)
set(SKIP_INSTALL TRUE)
message("SKIP_INSTALL for ${src_file_NAME}")
endif()
if(is_gtk_lib)
set(SKIP_INSTALL TRUE)
endif()
endif()
......
......@@ -75,12 +75,32 @@ function(search_library input_file pkg_searchdirs result)
endfunction()
macro(add_to_symlink_list src_file target_file)
#TODO: avoid code duplication here and later in install_rule
set(SKIP_INSTALL FALSE)
if(PKG_GENERATE_XDK)
get_filename_component(src_file_NAME ${src_file} NAME)
setif_value_in_list(is_gtk_lib "${src_file_NAME}" ALLOWED_SYSTEM_DLLS)
if ("${src_file_NAME}"
MATCHES
"libOTB|libotb|otbApp|otbapp_|otbTest|libMonteverdi|monteverdi|mapla|iceViewer"
)
set(SKIP_INSTALL TRUE)
endif()
if(is_gtk_lib)
set(SKIP_INSTALL TRUE)
endif()
endif(PKG_GENERATE_XDK)
# NOTE: $OUT_DIR is set actually in pkgsetup.in. So don't try
# any pre-mature optimization on that variable names
if(NOT SKIP_INSTALL)
file(APPEND
${CMAKE_BINARY_DIR}/make_symlinks_temp
"ln -sf $OUT_DIR/lib/${src_file} $OUT_DIR/lib/${target_file}\n"
)
"if [ -f \"\$OUT_DIR/lib/${src_file}\" ]; then \n ln -sf \"$OUT_DIR/lib/${src_file}\" \"$OUT_DIR/lib/${target_file}\" \n fi;\n"
)
endif()
endmacro()
function(check_for_gtk_libs input_file result)
......
diff -burN InsightToolkit-4.10.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt InsightToolkit-4.10.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2016-12-06 16:03:06.000000000 +0100
+++ InsightToolkit-4.10.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2016-12-06 16:03:44.000000000 +0100
@@ -131,8 +131,10 @@
set(CORE_VIDEO_FOUND OFF CACHE INTERNAL "VXL core video libraries built")
endif ()
+if(BUILD_TESTING)
# common test executable
add_subdirectory(testlib)
+endif()
# Tests that check and output the vxl configuration
# NOTE: some external projects remove the tests directory (aka ITK)
Description: Fix build failure with GCC 6: no match for 'operator<<'.
Author: Rashad M <rashadkm@gmail.com>
Origin: https://trac.osgeo.org/ossim/attachment/ticket/2354/fix-ossim-trac-2354.diff
Bug-Debian: https://bugs.debian.org/811851
Bug: https://trac.osgeo.org/ossim/ticket/2354
--- a/ossim/src/ossim/elevation/ossimElevManager.cpp
+++ b/ossim/src/ossim/elevation/ossimElevManager.cpp
@@ -643,14 +643,26 @@ std::ostream& ossimElevManager::print(os
<< "\nm_useGeoidIfNullFlag = "<<m_useGeoidIfNullFlag
<< "\nm_currentDatabaseIdx = "<<m_currentDatabaseIdx
<< "\nm_dbRoundRobin.size = "<<m_dbRoundRobin.size();
+
for (ossim_uint32 i=0; i<m_dbRoundRobin.size(); ++i)
{
out<<"\nm_dbRoundRobin["<<i<<"].size = "<<m_dbRoundRobin[i].size()<<endl;
for (ossim_uint32 j=0; j<m_dbRoundRobin[i].size(); ++j)
- out<<"m_dbRoundRobin["<<i<<"]["<<j<<"] = "<<m_dbRoundRobin[i][j]->print(out)<<endl;
+ {
+ out<<"m_dbRoundRobin["<<i<<"]["<<j<<"] = ";
+ // GP: We have to separate this line. On MS it will not compile
+ // otherwise
+ m_dbRoundRobin[i][j]->print(out);
+
+ }
+ out<<endl;
}
- cout<<"\n"<<ossimElevSource::print(cout);
+ out<<"\n";
+ ossimElevSource::print(out);
return out;
+
+
+
}
--- a/ossim/src/ossim/elevation/ossimElevSource.cpp
+++ b/ossim/src/ossim/elevation/ossimElevSource.cpp
@@ -269,8 +269,9 @@ std::ostream& ossimElevSource::print(std
<< "\ntheMaxHeightAboveMSL = "<<theMaxHeightAboveMSL
<< "\ntheNullHeightValue = "<<theNullHeightValue
<< "\ntheSeaLevelValue = "<<theSeaLevelValue
- << "\ntheGroundRect = "<<theGroundRect
- << ossimSource::print(out);
+ << "\ntheGroundRect = "<<theGroundRect;
+ // GP: need this by itself. MS errors out
+ ossimSource::print(out);
return out;
}
diff -burN qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/linux.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/linux.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/linux.conf 2016-12-07 11:19:59.964124979 +0100
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/linux.conf 2016-12-07 11:22:29.116132748 +0100
@@ -1,7 +1,7 @@
#
# qmake configuration for common linux
#
-
+QMAKE_CXXFLAGS += -w -std=c++98
QMAKE_CFLAGS_THREAD += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD