Commit cf1cd26c authored by Stéphane Albert's avatar Stéphane Albert

MRG: Synchronized rfc-51-mvd_modules with develop.

parents 507cee3c a9108662
......@@ -58,6 +58,9 @@ macro(otb_module_check otb-module _needed_by stack)
foreach(dep IN LISTS OTB_MODULE_${otb-module}_DEPENDS)
otb_module_check(${dep} ${otb-module} "${otb-module};${stack}")
endforeach()
foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
otb_module_check(${dep} ${otb-module} "${otb-module};${stack}")
endforeach()
set(check_finished_${otb-module} 1)
endif()
endmacro()
......
......@@ -307,8 +307,8 @@ check_compiler_warning_flags(C_WARNING_FLAGS CXX_WARNING_FLAGS)
# Append OTB warnings to the CMake flags.
# We do not set them in OTB_REQUIRED FLAGS because all project which
# use OTB don't require these flags .
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_WARNING_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS}")
set(CMAKE_C_FLAGS "${C_WARNING_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CXX_WARNING_FLAGS} ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
#Check the set of platform flags the compiler supports
......
......@@ -28,5 +28,10 @@ export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
# Source GDAL_DATA, EPSG_CSV
if [ -f $CURRENT_SCRIPT_DIR/env_exports ]; then
. $CURRENT_SCRIPT_DIR/env_exports
fi
# start the application
$OTB_CLI_LAUNCHER "$@"
......@@ -28,5 +28,10 @@ export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
# Source GDAL_DATA, EPSG_CSV
if [ -f $CURRENT_SCRIPT_DIR/env_exports ]; then
. $CURRENT_SCRIPT_DIR/env_exports
fi
# start the application
$OTB_GUI_LAUNCHER "$@"
if(WIN32)
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
else()
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
endif()
cmake_minimum_required(VERSION 2.8.11)
foreach(p
CMP0025 # CMake 3.0
......@@ -411,7 +407,9 @@ endmacro()
message("\n======================= Begin of OTB cmake summary =======================\n")
message( ${OTB_GIT_STATUS_MESSAGE})
if(OTB_GIT_STATUS_MESSAGE)
message( ${OTB_GIT_STATUS_MESSAGE})
endif()
if(OTB_DATA_GIT_STATUS_MESSAGE)
message( ${OTB_DATA_GIT_STATUS_MESSAGE})
endif()
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/sh
export LD_LIBRARY_PATH=@OTB_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH
export PYTHONPATH=@OTB_INSTALL_PREFIX@/lib:@OTB_INSTALL_PREFIX@/lib/otb/python:$PYTHONPATH
export OTB_APPLICATION_PATH=@OTB_INSTALL_PREFIX@/lib/otb/applications
@PYTHON_EXECUTABLE@ @CMAKE_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py
set(OUT_OF_SOURCE_BUILD FALSE)
if(NOT PROJECT_NAME)
cmake_minimum_required(VERSION 2.8)
project(OTBCookBook)
set(OUT_OF_SOURCE_BUILD TRUE)
endif()
#find OTB
find_package(OTB REQUIRED)
#find Python
find_package(PythonInterp REQUIRED)
find_program(SH_INTERP sh)
if(NOT SH_INTERP)
message(FATAL_ERROR "'sh' program not found")
endif()
find_program(SPHINX_BUILD sphinx-build)
if(NOT SPHINX_BUILD)
message(FATAL_ERROR "The 'sphinx-build' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the 'sphinx-build' 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()
string(TIMESTAMP OTB_COPYRIGHT_YEAR "%Y")
set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR}, OTB Team")
set(RST_GENERATED_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/rst)
set(RST_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
set(RST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/rst)
#make some directories
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Applications)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/recipes)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art/MonteverdiImages)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/Art/QtImages)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/_static)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_GENERATED_SOURCE_DIR}/_templates)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/RunApplicationsRstGenerator.sh.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
@ONLY)
file(GLOB images ${CMAKE_CURRENT_SOURCE_DIR}/Art/*.*)
foreach(image ${images})
get_filename_component(out_file ${image} NAME)
configure_file(${image} ${RST_GENERATED_SOURCE_DIR}/Art/${out_file} COPYONLY)
endforeach()
file(GLOB mvd_images ${CMAKE_CURRENT_SOURCE_DIR}/Art/MonteverdiImages/*.*)
foreach(mvd_image ${mvd_images})
get_filename_component(out_file ${mvd_image} NAME)
configure_file(${mvd_image} ${RST_GENERATED_SOURCE_DIR}/Art/MonteverdiImages/${out_file} COPYONLY)
endforeach()
file(GLOB qt_images ${CMAKE_CURRENT_SOURCE_DIR}/Art/QtImages/*.png)
foreach(qt_image ${qt_images})
get_filename_component(out_file ${qt_image} NAME)
configure_file(${qt_image} ${RST_GENERATED_SOURCE_DIR}/Art/QtImages/${out_file} COPYONLY)
endforeach()
file(GLOB sar_images ${CMAKE_CURRENT_SOURCE_DIR}/Art/SARImages/*.png)
foreach(sar_image ${sar_images})
get_filename_component(out_file ${sar_image} NAME)
configure_file(${sar_image} ${RST_GENERATED_SOURCE_DIR}/Art/SARImages/${out_file} COPYONLY)
endforeach()
file(GLOB rst_sources1 ${RST_SOURCES}/*.rst)
foreach(rst_file ${rst_sources1})
get_filename_component(out_file ${rst_file} NAME)
configure_file(${rst_file} ${RST_GENERATED_SOURCE_DIR}/${out_file} COPYONLY)
endforeach()
file(GLOB rst_sources2 ${RST_SOURCES}/recipes/*.rst)
foreach(rst_file ${rst_sources2})
get_filename_component(out_file ${rst_file} NAME)
configure_file(${rst_file} ${RST_GENERATED_SOURCE_DIR}/recipes/${out_file} COPYONLY)
endforeach()
file(GLOB rst_sources3 ${RST_SOURCES}/Applications/*.rst)
foreach(rst_file ${rst_sources3})
get_filename_component(out_file ${rst_file} NAME)
configure_file(${rst_file} ${RST_GENERATED_SOURCE_DIR}/Applications/${out_file} COPYONLY)
endforeach()
configure_file(${RST_SOURCES}/conf.py.in ${RST_GENERATED_SOURCE_DIR}/conf.py @ONLY)
configure_file(${RST_SOURCES}/Makefile.in ${RST_GENERATED_SOURCE_DIR}/Makefile @ONLY)
add_custom_target(generate_otbapps_rst
ALL
COMMAND ${SH_INTERP} ${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
WORKING_DIRECTORY ${RST_GENERATED_SOURCE_DIR}
COMMENT "Auto-generating Application Reference Documentation in RST"
)
add_custom_target(CookBookHTMLFromRST
ALL
COMMAND ${CMAKE_MAKE_PROGRAM} html
WORKING_DIRECTORY ${RST_GENERATED_SOURCE_DIR}
DEPENDS generate_otbapps_rst
COMMENT "Building RST documentation in html")
# add_custom_target(CookBookHTMLFromPDF
# ALL
# COMMAND ${CMAKE_MAKE_PROGRAM} pdf
# WORKING_DIRECTORY ${RST_GENERATED_SOURCE_DIR}
# COMMENT "Building RST documentation in pdf")
# add_dependencies(CookBookHTMLFromPDF CookBookHTMLFromRST)
RST docs for Orfeo Toolbox CookBook
Introduction
============
This is a replacement of old OTB Cookbook which was written in Latex. This version is completely deviate from existing Latex format to reStructured format (rst).
Converting existing latex to rst is not that straightforward. All rst files for OTB applications are generated using python script otbGenerateWrappersRstDoc.py.
For others in recipes, we used a tool called pandoc to get an inital rst and then edited out errors manually. You do not have to generate them again.
The old Cookbook in otb-documents is deprecated.
Requirements
============
install OTB, sphnix, sphinx-rtd-theme
aptitude install python-sphinx python-sphinx-rtd-theme
How to build the Cookbook:
==========================
mkdir ~/build-cookbook
cd ~/build-cookbook
cmake ~/sources/otb/Documentation/CookBook -DOTB_DIR=/path/where/you/installed/otb/lib/cmake/OTB-X.Y
make
View results
============
Open the cookbook documentation in a firefox tab!
firefox ~/build-cookbook/rst/_build/html/index.html
This diff is collapsed.
Applications
============
This chapter is the reference documentation for applications delivered
with OTB. It provides detailed description of the application behaviour and
parameters, as well as python and bash snippets describing how to use them.
.. toctree::
:maxdepth: 3
Applications/Image_Manipulation.rst
Applications/Vector_Data_Manipulation.rst
Applications/Calibration.rst
Applications/Geometry.rst
Applications/Image_Filtering.rst
Applications/Feature_Extraction.rst
Applications/Stereo.rst
Applications/Learning.rst
Applications/Segmentation.rst
Applications/Miscellaneous.rst
Calibration
===========
.. toctree::
:maxdepth: 1
app_OpticalCalibration
app_SARCalibration
app_SarRadiometricCalibration
app_SARDecompositions
app_SARPolarMatrixConvert
app_SARPolarSynth
Feature Extraction
==================
.. toctree::
:maxdepth: 1
app_BinaryMorphologicalOperation
app_ComputePolylineFeatureFromImage
app_DSFuzzyModelEstimation
app_EdgeExtraction
app_GrayScaleMorphologicalOperation
app_HaralickTextureExtraction
app_HomologousPointsExtraction
app_LineSegmentDetection
app_LocalStatisticExtraction
app_MultivariateAlterationDetector
app_RadiometricIndices
app_SFSTextureExtraction
app_VectorDataDSValidation
Geometry
========
.. toctree::
:maxdepth: 1
app_BundleToPerfectSensor
app_ConvertCartoToGeoPoint
app_ConvertSensorToGeoPoint
app_GeneratePlyFile
app_GenerateRPCSensorModel
app_GridBasedImageResampling
app_ImageEnvelope
app_OrthoRectification
app_Pansharpening
app_RefineSensorModel
app_RigidTransformResample
app_Superimpose
Image Filtering
===============
.. toctree::
:maxdepth: 1
app_Despeckle
app_DimensionalityReduction
app_MeanShiftSmoothing
app_Smoothing
Image Manipulation
==================
.. toctree::
:maxdepth: 1
app_ColorMapping
app_ConcatenateImages
app_Convert
app_DownloadSRTMTiles
app_ExtractROI
app_MultiResolutionPyramid
app_Quicklook
app_ReadImageInfo
app_Rescale
app_SplitImage
app_TileFusion
app_ManageNoData
app_DEMConvert
Learning
========
.. toctree::
:maxdepth: 1
app_ClassificationMapRegularization
app_ComputeConfusionMatrix
app_ComputeImagesStatistics
app_FusionOfClassifications
app_PolygonClassStatistics
app_SampleExtraction
app_SampleSelection
app_ImageClassifier
app_KMeansClassification
app_SOMClassification
app_TrainImagesClassifier
app_TrainVectorClassifier
app_PredictRegression
app_TrainRegression
Miscellaneous
=============
.. toctree::
:maxdepth: 1
app_BandMath
app_BandMathX
app_CompareImages
app_HyperspectralUnmixing
app_KmzExport
app_OSMDownloader
app_ObtainUTMZoneFromGeoPoint
app_PixelValue
app_VertexComponentAnalysis
Segmentation
============
.. toctree::
:maxdepth: 1
app_ComputeOGRLayersFeaturesStatistics
app_ConnectedComponentSegmentation
app_HooverCompareSegmentation
app_LSMSSegmentation
app_LSMSSmallRegionsMerging
app_LSMSVectorization
app_OGRLayerClassifier
app_Segmentation
app_TrainOGRLayersClassifier
Stereo
======
.. toctree::
:maxdepth: 1
app_BlockMatching
app_DisparityMapToElevationMap
app_FineRegistration
app_StereoFramework
app_StereoRectificationGridGenerator
Vector Data Manipulation
========================
.. toctree::
:maxdepth: 1
app_ConcatenateVectorData
app_Rasterization
app_VectorDataExtractROI
app_VectorDataReprojection
app_VectorDataSetField
app_VectorDataTransform
Installation
============
We provide different standalone binary packages for OTB-Applications:
- for Windows platform (7 or higher)
- for 64bit Linux distribution
- for MacOS X
Other binaries can be available as packages (OSGeo packages,
Debian/Ubuntu packages, OpenSuse packages), however be advised that they
may not be up-to-date nor delivered with full features. If you want to
build from source or if we don’t provide packages for your system,
information is available in the `Software Guide <http://orfeo-toolbox.org/SoftwareGuide/>`_,
in the section "Building from Source".
Windows
-------
We provide for Windows Seven and later through standalone packages. They
are cross-compiled with MinGW, for 32 bits and 64 bits platforms. They
contain all applications and their launchers (both command line and graphical
launchers are provided).
Check the `Download page <https://www.orfeo-toolbox.org/download>`__
There is a 32 bits and a 64 bits version. They contain the same directory
structure:
- ``monteverdi.bat`` : A launcher script for Monteverdi
- ``mapla.bat`` : A launcher script for Mapla
- ``otbenv.bat`` : A script to initialize the environment for OTB
executables
- ``bin`` : A folder containing application launchers (otbcli.bat,
otbgui.bat) and the DLLs.
- ``lib`` : A folder containing application DLLs.
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``.
Linux 64bit
-----------
We provide for Linux 64 bits OS through standalone packages. They contain
all OTB Applications and their launchers (both command line and
graphical launchers are provided). Check the `Download page <https://www.orfeo-toolbox.org/download>`__
This package is a self-extractible archive. You may uncompress it with a
double-click on the file, or with the command line :
.. parsed-literal::
chmod +x OTB-|release|-Linux64.run