Commit 4bac53c4 authored by Victor Poughon's avatar Victor Poughon

Merge branch 'release-6.6' into develop

parents 9501aa16 ae0a8d74
......@@ -104,7 +104,7 @@ endif ()
find_library ( QWT_LIBRARY
NAMES qwt qwt${QWT_MAJOR_VERSION} qwt-qt5
......@@ -120,7 +120,7 @@ endif()
find_library(CBLAS_LIBRARY NAMES cblas)
find_library(CBLAS_LIBRARY NAMES cblas blas PATH_SUFFIXES blas)
......@@ -174,6 +174,10 @@ if(NOT OTB_INSTALL_PACKAGE_DIR)
set (OTB_INSTALL_DESCR_DIR "share/otb/description")
#convert path to native for reconfiguring
......@@ -16,9 +16,10 @@ those values.
* ``OTB_MAX_RAM_HINT``: Default maximum memory that OTB should use for processing, in MB. If not set, default value is 128 MB.
* ``OTB_LOGGER_LEVEL``: Default level of logging for OTB. Should be one of ``DEBUG``, ``INFO``, ``WARNING``, ``CRITICAL`` or ``FATAL``, by increasing order of priority. Only messages with a higher priority than the level of logging will be displayed. If not set, default level is ``INFO``.
.. _extended-filenames:
Extended filenames
.. _extended-filenames:
Extended filenames is an interesting feature of OTB. With it, you can control
several aspects of the beahvior of the OTB in the OTB-Applications or in our
......@@ -116,7 +116,7 @@ FAQ
Q: Unable to import otbApplication library with Python3
......@@ -126,10 +126,9 @@ A: You need to add a symlink to to make it work
Here is the solution:
- find the libpython3.5XX on your system : find /usr/lib -iname *libpython3.5*
(on Ubuntu 14.04, it is /usr/lib/x86_64-linux-gnu/
- create a symlink : ln -s path/to/lib/python3.5XX
- Find the libpython3.5XX on your system : ``find /usr/lib -iname *libpython3.5*``
(on Ubuntu 14.04, it is ``/usr/lib/x86_64-linux-gnu/``)
- Create a symlink : ``ln -s path/to/lib/python3.5XX path/to/lib/``
- Try to import otbApplication again
See this discussion on `OTB issue tracker <>`_
This archive provides a development kit for the ORFEO ToolBox library which
allows to easily compile OTB and facilitate the creation of programs based on
It contains shared libraries of OTB dependencies and helper scripts for the
configuration and the compilation of the library.
Note that OTB sources are not included in the archive (see instructions below).
- cmake (>= 3.2)
- gcc (>= 4.9)
- git
Extract XDK
cd /opt (You can use another a directory of your own choice)
chmod +x OTB-|release|
**You now will have a directory named OTB-|release|-xdk-Linux64 in \'/opt\'**
Setup environment
There is a helper script in package called **xdkenv.profile**. This script export
required environments to configure and build OTB.
cd /opt/OTB-|release|-xdk-Linux64
. ./xdkenv.profile
Test environment setup by checking value of CMAKE_PREFIX_PATH
The above command will output:
Download, Configure and build OTB
mkdir -p /opt/OTB/build && cd /opt/OTB
git clone --depth=1 --branch=develop source
cd build && cmake ../source
make -j2
* By default, all OTB\_USE\_\* variables in OTB are set to FALSE except for 6S and SiftFast. You can check/activate them in your cmake-gui/ccmake.
* If you need to activate Qt4 modules (Monteverdi, Ice, QtWidget, ApplicationEngine ..), you must set *QT_BINARY_DIR*.
This is because Qt tools ( moc, rcc, et al) are reported as not found by cmake due to incorrect path in "qmake -query"
......@@ -137,7 +137,6 @@ SET( Tex_SRCS
\chapter{Contributors Guidelines}
This chapter is concerned with the contributor guidelines.
Here, you can find useful information about:
\item remote modules,
\item how to submit them,
\item what are the acceptance/release policies
\item what are the licence compliances
\item ...
in OTB sources.
A wiki page is also available here : \url{}.
\section{How to Contribute}
\item This section has to be reviewed by PSC
\item Some guidelines only apply after modularization is completed
Contributions through Remote Modules is the preferred way if your contribution is about adding new classes or application to bring new features to OTB.
Please also refer to ITK guidelines for remote modules (\url{}).
\section{What are remote modules?}
Remote modules are just like regular modules, except they are not distributed inside OTB source code.
In the Modules/Remote folder of the OTB sources, you can add any number of directories containing valid modules. You will then be able to activate those module through CMake configuration, and build them.
But there is more. Let assume that you have a valid remote module, hosted somewhere on a Git repository. We can add a special CMake file in the Modules/Remote that will tell CMake that this remote module is available, and can be activated during CMake configuration. Upon activation, CMake will first checkout the remote module source code into Modules/Remote, and then build it as a regular module.
But there is more. Once the CMake file describing your module is added into Remote/Modules, you can benefit from OTB development services just like any other module: dashboard build, packaging, doxygen documentation ...
To make it short, by contributing a remote module:
\item You still host the code of your contribution, which is not mixed with other parts of OTB,
\item Any user building OTB will be able to fetch and build your module,
\item Your module will be built on dashboard, packaged for official releases and documented by OTB automatic documentation processes,
\item You do not need permissions to push changesets on OTB repositories.
\section{How to get your remote module inside OTB? }
\item Follow the instructions on writing a remote module in order to have a working remote module inside your local source code tree (\ref{sec:writemodule}).
\item Host the remote module code on a publicly available git repository. If you do not have access to a git server, bitbucket or github can provide this service for you.
\item Write a short email to the otb-developers list, detailing your contributed remote module, and providing the cmake file to add into Modules/Remote so as to get it into OTB, as well as evidence that you comply with the remote module policy (see below).
\item Remote module acceptance policy compliance will be checked by the otb-developers list,
\item Acceptance of remote module is submitted to vote on otb-developers (to be reviewed by PSC).
If accepted, your CMake file will be placed into the Modules/Remote folder inside OTB source tree.
During the OTB release process, all module complying with the remote module release policy will be packaged along with standard modules.
A remote module can be removed from Modules/Remote (this only requires to remove the CMake file describing it), if:
\item It does no longer comply with the remote module acceptance policy (in which case the decision is submitted to vote on otb-developers),
\item The author of the remote module ask to remove it.
\section{Remote module acceptance policy }
So as to get your module accepted as an official remote module, you should comply with the following:
\item Remote module source code should be hosted on a publicly available Git repository
\item Author of the remote module should be identified and registered to otb-developers mailing list
\item Author of the remote module accepts to be contacted by developers or users regarding issues with his module (on a best effort basis),
\item Remote module source code should comply with OTB style as much as possible,
\item Remote module source code should be documented using doxygen tags,
\item Remote module should provide a minimal set of tests to ensure build of template code and basic non-regression testing,
\item Remote module should come with a form of documentation (website, publication, readme file ...)
\item Remote module should not embed code from any third party software (unless strong arguments are given by the author, in which case an exception can be made),
\item Remote module should avoid depending on new third parties if possible,
\item Remote module author should be the copyright owner and comply with licences of any third party, which in turn should comply with terms of OTB licence (to be reviewed by PSC)
\item Author of remote module should provide a small description of the remote module to be added on OTB website.
An internal module should \textbf{never} depend on a remote module whatsoever.
\section{Remote module release policy }
During the OTB release process, a remote module will be included in source and binary packages if:
\item Dashboard submission exist and show that the remote module:
\item Builds on all plateform,
\item Passes all tests on the reference platform,
\item Does not have any test crashing (i.e. failing with core dump or memory issues) on remaining platform
\item The remote module complies with the remote module acceptance policy at the time of the Release Candidate
Developers will notify remote modules authors of existing issues at Release Candidate. If by 3 day to the final release dates, some issues listed above still exist, the remote module will be removed from the release source and binary packages.
Moreover, remote module bringing in new third party dependencies will not be included in binary packages.
......@@ -49,6 +49,7 @@ Patrick Imbo (CS),
Remi Cresson (Irstea),
Rik Bellens,
Romain Garrigues (CS),
Santiago Pena Luque (CNES),
Sebastiaan Couwenberg (Debian GIS),
S\'ebastien Dinot (CS),
S\'ebastien Harasse (CS),
......@@ -59,4 +60,5 @@ Tishampati Dhar,
Victor Poughon (CNES),
Vincent Poulain (CNES),
Vincent Schut (Sarvision),
Yannick Reynard
Yannick Reynard,
Yannick Tanguy (CNES)
......@@ -126,7 +126,7 @@ See table \ref{tab:otb-dependencies} for the full list of dependencies.
\textbf{OPENGL} & \url{} & no & - \\
\textbf{Qt} & \url{} & no & 4 \\
\textbf{Qt} & \url{} & no & 5 \\
\textbf{QWT} & \url{} & no & 6 \\
......@@ -170,8 +170,7 @@ $ mkdir install
The OTB project uses a git branching model where \texttt{develop} is the current development version.
It contains the latest patches and represents the work in progress towards the next release.
For more information on OTB and git, including how to decide which branch to want to compile, please see the
OTB wiki page at \url{}.
For more information regarding the use of Git in the project please have a look at : \url{}. See the (\url{}) to have more inforamtion on how to contribute to OTB.
Checkout the relevant branch now:
......@@ -294,16 +293,16 @@ want to build) :
Qt library: Unlike other dependencies building Qt4 on all platform is not trivial task but
Qt library: Unlike other dependencies building Qt5 on all platform is not trivial task but
OTB SuperBuild makes best effort to make it easier for you. So there is still
some additional package installation, one has to do as a pre-requistie for SuperBuild
On a GNU/Linux you must have Qt X11 dependencies installed.
See Qt 4.8 documentation for list of packages that needs to be installed
before starting superbuild.
For a debian 8.1 systeme, I installed all Qt4 dependencies with below 'apt-get install'
See Qt 5 documentation for list of packages that needs to be installed
before starting superbuild.
For a Debian 8.1 system, I installed all Qt5 dependencies with below 'apt-get install'
\texttt{apt-get install libx11-dev libxext-dev libxt-dev libxi-dev libxrandr-dev libgl-dev libglu-dev}
You can also deactivate QT4 and skip this by passing \texttt{-DOTB\_USE\_QT4=OFF} to cmake.
You can also deactivate QT5 and skip this by passing \texttt{-DOTB\_USE\_QT=OFF} to cmake.
This will give you OTB install without monteverdi, mapla and gui application launchers.
For Mac OSX you need to install XCode and Windows 7,8.1,10 requires MSVC 2015 or higher.
......@@ -410,7 +409,7 @@ $ make install
\textbf{OTB\_USE\_LIBKML} & OTBlibkml & OTBKMZWriter OTBIOKML OTBAppKMZ \\
\textbf{OTB\_USE\_QT4} & OTBQt4 & OTBQtWidget \\
\textbf{OTB\_USE\_QT} & OTBQt & OTBQtWidget \\
\textbf{OTB\_USE\_QWT} & OTBQwt & OTBMonteverdiGUI OTBMonteverdi \\
......@@ -264,10 +264,6 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
\chapter{Release Notes}
%Comment generation of wrapping documentation for release 3.2
\chapter{Wrappings to other languages}
......@@ -144,7 +144,7 @@ private:
// Software Guide : BeginLatex
// Application parameters declaration is done using \code{AddParameter()} method.
// \code{AddParameter()} requires the input parameter type
// (ParameterType_InputImage, ParameterType_Int, ParameterType_Float), its name and description.
// (ParameterType\_InputImage, ParameterType\_Int, ParameterType\_Float), its name and description.
// \subdoxygen{otb}{Wrapper}{Application} class contains methods to set parameters characteristics.
// Software Guide : EndLatex
......@@ -138,7 +138,7 @@ public:
* \return the point projected in the image coordinates system.
* \throw None
void TransformPointToPhysicalPoint(const PointType& point) const
PointType TransformPointToPhysicalPoint(const PointType& point) const
// why no loop on VDimension ?
PointType physicalPoint;
......@@ -114,7 +114,11 @@ typedef mpl::map
< typename T
#if GDAL_VERSION_NUM >= 2030000
, T ( OGRFeature::*ptr_to_function )(int) const
, T ( OGRFeature::*ptr_to_function )(int)
, typename FinalReturnType = T
> class MemberGetterPtr
......@@ -190,7 +194,11 @@ template
< typename T
#if GDAL_VERSION_NUM >= 2030000
, T const* ( OGRFeature::*ptr_to_function )(int, int*) const
, T const* ( OGRFeature::*ptr_to_function )(int, int*)
, typename FinalReturnType = std::vector<T>
> class MemberContainerGetterPtr
......@@ -292,7 +300,11 @@ template
< typename T
#if GDAL_VERSION_NUM >= 2030000
, void ( OGRFeature::*ptr_to_function )(int, int, const T*)
, void ( OGRFeature::*ptr_to_function )(int, int, T*) // not const-correct
, typename ActualParamType = std::vector<T>
> class MemberContainerSetterPtr
......@@ -67,17 +67,17 @@ otb_add_test(NAME TvOGRExtendedFilename
otb_add_test(NAME TvOGRExtendedFilenameGDALCreate
COMMAND otbOGRTestDriver
otb_add_test(NAME TvOGRExtendedFilenameGDALLayer
COMMAND otbOGRTestDriver
otb_add_test(NAME TvOGRExtendedFilenameGDALLayerOption
COMMAND otbOGRTestDriver
\ No newline at end of file
......@@ -93,8 +93,8 @@ public:
bool WorldToLineSample(const Point3DType & inGEoPOint, Point2DType & cr) const;
/** Transform world point (lat,lon,hgt) to satellite position (x,y,z) and satellite velocity */
bool WorldToSatPositionAndVelocity(const Point3DType & inGeoPoint, Point3DType & satelitePosition,
Point3DType & sateliteVelocity) const;
bool WorldToSatPositionAndVelocity(const Point3DType & inGeoPoint, Point3DType & satellitePosition,
Point3DType & satelliteVelocity) const;
/** Transform world point (lat,lon,hgt) to cartesian point (x,y,z) */
static bool WorldToCartesian(const Point3DType & inGeoPoint, Point3DType & outCartesianPoint);
......@@ -182,8 +182,8 @@ bool SarSensorModelAdapter::WorldToCartesian(const Point3DType & inGeoPoint, Poi
bool SarSensorModelAdapter::WorldToSatPositionAndVelocity(const Point3DType & inGeoPoint,
Point3DType & satelitePosition,
Point3DType & sateliteVelocity) const
Point3DType & satellitePosition,
Point3DType & satelliteVelocity) const
if(m_SensorModel.get() == ITK_NULLPTR)
......@@ -205,13 +205,13 @@ bool SarSensorModelAdapter::WorldToSatPositionAndVelocity(const Point3DType & in
if(sensorPos.isNan() || !success)
return false;
satelitePosition[0] = sensorPos.x();
satelitePosition[1] = sensorPos.y();
satelitePosition[2] = sensorPos.z();
satellitePosition[0] = sensorPos.x();
satellitePosition[1] = sensorPos.y();
satellitePosition[2] = sensorPos.z();
sateliteVelocity[0] = sensorVel.x();
sateliteVelocity[1] = sensorVel.y();
sateliteVelocity[2] = sensorVel.z();
satelliteVelocity[0] = sensorVel.x();
satelliteVelocity[1] = sensorVel.y();
satelliteVelocity[2] = sensorVel.z();
return true;
......@@ -203,11 +203,15 @@ private:
GeometriesType::Pointer inputGeomSet;
ProjectionFilterType::Pointer geometriesProjFilter;
GeometriesType::Pointer outputGeomSet;
const OGRSpatialReference imgOGRSref =
OGRSpatialReference( imageProjectionRef.c_str() );
const OGRSpatialReference vectorOGRSref =
OGRSpatialReference( vectorProjectionRef.c_str() );
bool doReproj = true;
// don't reproject for these cases
if (vectorProjectionRef.empty() ||
(imageProjectionRef == vectorProjectionRef) ||
(imageProjectionRef.empty() && imageKwl.GetSize() == 0))
if ( vectorProjectionRef.empty()
|| ( imgOGRSref.IsSame( &vectorOGRSref ) )
|| ( imageProjectionRef.empty() && imageKwl.GetSize() == 0) )
doReproj = false;
if (doReproj)
......@@ -376,10 +376,14 @@ private:
ProjectionFilterType::Pointer geometriesProjFilter;
GeometriesType::Pointer outputGeomSet;
bool doReproj = true;
const OGRSpatialReference imgOGRSref =
OGRSpatialReference( imageProjectionRef.c_str() );
const OGRSpatialReference vectorOGRSref =
OGRSpatialReference( vectorProjectionRef.c_str() );
// don't reproject for these cases
if (vectorProjectionRef.empty() ||
(imageProjectionRef == vectorProjectionRef) ||
(imageProjectionRef.empty() && imageKwl.GetSize() == 0))
if ( vectorProjectionRef.empty()
|| ( imgOGRSref.IsSame( &vectorOGRSref ) )
|| ( imageProjectionRef.empty() && imageKwl.GetSize() == 0) )
doReproj = false;
if (doReproj)
......@@ -161,11 +161,11 @@ private:
SetDocLongDescription("This application is the implementation of the "
"histogram equalization algorithm. The idea of the algorithm is to use "
"the whole available dynamic. In order to do so it computes a histogram "
"over the image and then use the whole dynamic : meaning flattening the "
"over the image and then use the whole dynamic: meaning flattening the "
"histogram. That gives us gain for each bin that transform the original "
"histogram into the flat one. This gain is then apply on the original "
"\nThe application proposes several option to allow a finer result : "
"\nThe application proposes several options to allow a finer result: "
"\n- There is an option to limit contrast. We choose to limit the contrast "
"by modifying the original histogram. To do so we clip the histogram at a "
"given height and redistribute equally among the bins the clipped population. "
......@@ -197,7 +197,7 @@ private:
"The maximum height will be computed as hfact*eqHeight where eqHeight "
"is the height of the theoretical flat histogram. The higher hfact, the "
"higher the contrast."
"\nWhen using 'luminance mode', it is recommended to limit this factor to a small value (ex : 4)");
"\nWhen using 'luminance mode', it is recommended to limit this factor to a small value (ex: 4)");
AddParameter(ParameterType_Float , "nodata" , "Nodata Value");
......@@ -219,27 +219,34 @@ private:
AddParameter(ParameterType_Int,"spatial.local.h" ,
"Thumbnail height in pixel");
"Thumbnail height");
SetParameterDescription("spatial.local.h","Height of the thumbnail "
"over which the histogram will be computed. The value is in pixels.");
AddParameter(ParameterType_Int,"spatial.local.w" ,
"Thumbnail width in pixel");
"Thumbnail width");
SetParameterDescription("spatial.local.w","Width of the thumbnail "
"over which the histogram will be computed. The value is in pixels.");
AddParameter(ParameterType_Choice , "minmax" , "Minimum and maximum "
SetParameterDescription("minmax","Minimum and maximum value that will "
"bound the histogram.");
"bound the histogram and thus the dynamic of the resulting image. Values "
"over those boundaries will be clipped.");
AddChoice( "" , "Automatic" );
SetParameterDescription("" , "Minimum and maximum value will "
"be computed on the image (nodata value won't be taken "
"into account) . Each band will have a minimum and a maximum.");
AddParameter(ParameterType_Bool, "", "Global");
SetParameterDescription("" , "Automatic"
SetParameterDescription("" ,
"Min/max computation will result in the same minimum and maximum for "
"all the bands.");
AddChoice( "minmax.manual" , "Manual settings of min/max values" );
SetParameterDescription("","Minimum and maximum value will be "
AddChoice( "minmax.manual" , "Manual settings for min/max values" );
SetParameterDescription("minmax.manual","Minimum and maximum value will be "
"set by the user");
AddParameter(ParameterType_Float , "minmax.manual.min" , "Minimum value");
AddParameter(ParameterType_Float , "minmax.manual.max" , "Maximum value");
// SetDefaultParameterFloat("minmax.manual.min", 0 );
// SetDefaultParameterFloat("minmax.manual.max", 255 );
......@@ -249,9 +256,9 @@ private:
"Each channel is equalized independently" );
AddChoice( "mode.lum" , "Luminance" );
SetParameterDescription( "mode.lum" ,
"The relative luminance is calculated thanks to the coefficients."
"Then the histogram is equalized and then a gain is applied on each channels."
"This gain for each channels will depend on"
"The relative luminance is computed according to the coefficients."
"Then the histogram is equalized and the gain is applied to each of the "
"channels. The channel gain will depend on "
"the weight (coef) of the channel in the luminance."
"\nNote that default values come from color space theories "
"on how human eyes perceive colors)"
......@@ -441,10 +441,10 @@ private:
catch ( itk::ExceptionObject & /*err*/ )
auto rgbVect = metadataInterface->GetDefaultDisplay();
ossOutput << std::endl << "Image default RGB composition:" << std::endl;
ossOutput << "\t[R, G, B] = [" << GetParameterInt("rgb.r") << "," << GetParameterInt("rgb.g") << "," << GetParameterInt("rgb.b") << "]" << std::endl;
......@@ -629,23 +629,18 @@ private:
case Interpolator_Linear:
typedef itk::LinearInterpolateImageFunction<FloatVectorImageType,