...
 
Commits (116)
......@@ -37,9 +37,11 @@ List or link documentation modifications that were made (doxygen, example, Softw
The copyright owner is *COPYRIGHT OWNER (OR OWNER'S AGENT)* and has signed the ORFEO ToolBox Contributor License Agreement.
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
\ No newline at end of file
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
......@@ -196,6 +196,8 @@ foreach(otb-module ${OTB_MODULES_ALL})
if(OTB_MODULE_${otb-module}_ACTIVATION_OPTION
AND NOT ${OTB_MODULE_${otb-module}_ACTIVATION_OPTION})
otb_module_disable("${otb-module}" "${OTB_MODULE_${otb-module}_ACTIVATION_OPTION}")
elseif(OTB_MODULE_${otb-module}_IS_DEPRECATED AND NOT OTB_USE_DEPRECATED)
otb_module_disable("${otb-module}" "OTB_USE_DEPRECATED")
endif()
endforeach()
......
......@@ -69,6 +69,9 @@ macro(otb_module _name)
elseif("${arg}" MATCHES "^ENABLE_SHARED$")
set(_doing "")
set(OTB_MODULE_${otb-module}_ENABLE_SHARED 1)
elseif("${arg}" MATCHES "^DEPRECATED$")
set(_doing "")
set(OTB_MODULE_${otb-module}_IS_DEPRECATED 1)
elseif("${arg}" MATCHES "^[A-Z][A-Z][A-Z]$")
set(_doing "")
message(AUTHOR_WARNING "Unknown argument [${arg}]")
......@@ -221,6 +224,7 @@ macro(otb_module_impl)
generate_export_header(${otb-module}
EXPORT_FILE_NAME ${_export_header_file}
EXPORT_MACRO_NAME ${otb-module}_EXPORT
DEPRECATED_MACRO_NAME ${otb-module}_DEPRECATED
NO_EXPORT_MACRO_NAME ${otb-module}_HIDDEN
STATIC_DEFINE OTB_STATIC )
install(FILES
......
......@@ -156,16 +156,16 @@ if(NOT OTB_INSTALL_INCLUDE_DIR)
set(OTB_INSTALL_INCLUDE_DIR include/OTB-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR})
endif()
if(NOT OTB_INSTALL_APP_DIR)
set(OTB_INSTALL_APP_DIR "lib/otb/applications")
set(OTB_INSTALL_APP_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/applications")
endif()
if(NOT OTB_INSTALL_PYTHON_DIR)
set(OTB_INSTALL_PYTHON_DIR "lib/otb/python")
set(OTB_INSTALL_PYTHON_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python")
endif()
if(NOT OTB_INSTALL_PYTHON3_DIR)
set(OTB_INSTALL_PYTHON3_DIR "lib/otb/python3")
set(OTB_INSTALL_PYTHON3_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/python3")
endif()
if(NOT OTB_INSTALL_JAVA_DIR)
set(OTB_INSTALL_JAVA_DIR "lib/otb/java")
set(OTB_INSTALL_JAVA_DIR "${OTB_INSTALL_LIBRARY_DIR}/otb/java")
endif()
if(NOT OTB_INSTALL_DATA_DIR)
set(OTB_INSTALL_DATA_DIR "share/otb")
......@@ -455,6 +455,10 @@ add_subdirectory(Utilities/Doxygen)
add_subdirectory(Utilities/Completion)
if (BUILD_DOCUMENTATION)
add_subdirectory(Documentation/Cookbook)
endif()
#----------------------------------------------------------------------------
# Provide a target to generate the SuperBuild archive (only for Unix)
if(UNIX)
......
#!/bin/sh
export LD_LIBRARY_PATH=@OTB_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH
export PYTHONPATH=@OTB_PYTHONPATH@:$PYTHONPATH
export OTB_APPLICATION_PATH=@OTB_APPLICATION_PATH@
@PYTHON_EXECUTABLE@ @CMAKE_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py -o "$1"
#cmake builds with rpath in the binary dir, so we don't need to set LD_LIBRARY_PATH here
#export LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@/lib:$LD_LIBRARY_PATH
export PYTHONPATH=@PYTHONPATH_COOKBOOK@:$PYTHONPATH
export OTB_APPLICATION_PATH=@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py -o "$1"
set(OUT_OF_SOURCE_BUILD FALSE)
if(NOT PROJECT_NAME)
cmake_minimum_required(VERSION 3.0)
project(OTBCookBook)
set(OUT_OF_SOURCE_BUILD TRUE)
option(BUILD_TESTING "Build the testing tree." ON)
endif()
if(BUILD_TESTING)
enable_testing()
include(CTest)
endif()
string(TIMESTAMP OTB_COPYRIGHT_YEAR "%Y")
set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA)")
#find OTB
find_package(OTB REQUIRED)
if( OTB_FOUND )
include(${OTB_USE_FILE})
message(STATUS "Found OTB: ${OTB_DIR} (found version \"${OTB_VERSION}\")")
else()
message(FATAL_ERROR "OTB not found. Please set OTB_DIR")
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Build the cookbook
#
if (NOT UNIX)
message (STATUS "Not on Unix: skipping Cookbook build.")
return()
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}'")
if(NOT OTB_PYTHONPATH)
message(FATAL_ERROR "OTB_PYTHONPATH empty")
endif()
if(NOT OTB_APPLICATION_PATH)
message(FATAL_ERROR "OTB_APPLICATION_PATH empty")
endif()
if(NOT OTB_INSTALL_PREFIX)
message(FATAL_ERROR "OTB_INSTALL_PREFIX empty")
endif()
macro(remove_and_make_directories)
foreach(dir in ${ARGV})
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${dir})
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${dir})
endforeach()
endmacro()
message(STATUS "")
message(STATUS "Configuring Cookbook...")
#find Python
find_package(PythonInterp REQUIRED)
# here we could add
# find_package (Python3 COMPONENTS Interpreter)
# but it requires cmake 3.12+
find_program(SH_INTERP sh)
mark_as_advanced(SH_INTERP)
......@@ -73,18 +49,50 @@ mark_as_advanced(SPHINX_BUILD)
find_program(PDFLATEX_COMMAND NAMES pdflatex )
mark_as_advanced(PDFLATEX_COMMAND)
foreach(cmd LATEX_COMMAND TAR_COMMAND PDFLATEX_COMMAND SPHINX_BUILD SH_INTERP)
# Check that we found everything we need
foreach(cmd
LATEX_COMMAND
TAR_COMMAND
PDFLATEX_COMMAND
SPHINX_BUILD
SH_INTERP)
if(NOT ${cmd})
message(FATAL_ERROR "${cmd} not set. Cannot continue")
message(FATAL_ERROR "Error while configuring Cookbook, ${cmd} not set. Cannot continue")
endif()
endforeach()
set(RST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rst)
# We need to set PYTHONPATH for the script otbGenerateWrappersRstDoc.py, depending on how the Python3 module was built
if (OTB_WRAP_PYTHON3)
set(PYTHONPATH_COOKBOOK "${CMAKE_BINARY_DIR}/lib/otb/python3")
elseif (OTB_WRAP_PYTHON)
# Cookbook only supports Python3
# But OTB_WRAP_PYTHON can wrap both python2 and python3
if (${PYTHONLIBS_VERSION_STRING} STRGREATER "3.0.0")
set(PYTHONPATH_COOKBOOK "${CMAKE_BINARY_DIR}/lib/otb/python")
else()
message(FATAL_ERROR "Must wrap OTB with python lib 3+ to build the cookbook, but found version ${PYTHONLIBS_VERSION_STRING}")
endif()
endif()
set(RST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rst)
set(RST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/rst)
set(LATEX_DIR ${CMAKE_CURRENT_BINARY_DIR}/latex)
set(HTML_DIR ${CMAKE_CURRENT_BINARY_DIR}/html)
# Print summary of Cookbook configuration
message(STATUS "RST_SOURCE_DIR = ${RST_SOURCE_DIR}")
message(STATUS "RST_BINARY_DIR = ${RST_BINARY_DIR}")
message(STATUS "LATEX_DIR = ${LATEX_DIR}")
message(STATUS "HTML_DIR = ${HTML_DIR}")
message(STATUS "PYTHONPATH_COOKBOOK = ${PYTHONPATH_COOKBOOK}")
# Clean any existing build
macro(remove_and_make_directories)
foreach(dir in ${ARGV})
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${dir})
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${dir})
endforeach()
endmacro()
remove_and_make_directories(
${HTML_DIR}
......@@ -107,23 +115,28 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Art DESTINATION ${RST_BINARY_DIR})
set(SPHINX_CONF_DIR ${CMAKE_CURRENT_BINARY_DIR})
configure_file(${RST_SOURCE_DIR}/conf.py.in ${SPHINX_CONF_DIR}/conf.py @ONLY)
string(TIMESTAMP OTB_COPYRIGHT_YEAR "%Y")
set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed under a Creative Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA)")
#configure_file(${RST_SOURCE_DIR}/Makefile.in ${RST_GENERATED_SOURCE_DIR}/Makefile.sphinx @ONLY)
# Internal variables.
# PAPEROPT_a4 = -D latex_paper_size=a4
# PAPEROPT_letter = -D latex_paper_size=letter
# ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# # the i18n builder cannot share the environment and doctrees with the others
# I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
configure_file(${RST_SOURCE_DIR}/conf.py.in ${SPHINX_CONF_DIR}/conf.py @ONLY)
add_custom_target(generate_otbapps_rst
COMMAND ${SH_INTERP} ${CMAKE_CURRENT_BINARY_DIR}/RunApplicationsRstGenerator.sh
${RST_BINARY_DIR}
WORKING_DIRECTORY ${RST_BINARY_DIR}
COMMENT "Auto-generating Application Reference Documentation in RST"
DEPENDS OTBSWIGWrapper-all
)
# Add all applications as dependencies to rst generation
set(app_names ${OTB_APPLICATIONS_NAME_LIST})
list(REMOVE_ITEM app_names "TestApplication")
list(REMOVE_ITEM app_names "ApplicationExample")
list(REMOVE_DUPLICATES app_names)
foreach(app_name ${app_names})
add_dependencies(generate_otbapps_rst otbapp_${app_name})
endforeach()
add_custom_target(CookBookHTML
COMMAND ${SPHINX_BUILD}
-b html
......
......@@ -3,11 +3,11 @@ 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).
This is a replacement of the old OTB Cookbook which was written in LaTeX. This version has deviated completely from the 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 initial rst and then edited out errors manually. You do not have to generate them again.
The old Cookbook in otb-documents is deprecated.
Converting existing LaTeX to rst is not that straightforward. All rst files for OTB applications are generated using the Python script otbGenerateWrappersRstDoc.py.
For others files in the Recipes, we used a tool called pandoc to get an initial rst and then manually edit and remove the errors. You do not have to generate them again.
The old Cookbook in otb-documents is now deprecated.
Requirements
============
......
#!/usr/bin/python
#!/usr/bin/env python3
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import otbApplication
import os
import sys
......@@ -59,7 +79,7 @@ def GetPixelType(value):
# look for type
foundcode = -1
foundname = ""
for ptypename, ptypecode in pixeltypes.iteritems():
for ptypename, ptypecode in pixeltypes.items():
if value.endswith(ptypename):
foundcode = ptypecode
foundname = ptypename
......@@ -133,7 +153,10 @@ def GenerateParameterType(app,param):
if app.GetParameterType(param) == otbApplication.ParameterType_InputFilenameList :
return "Input File name list"
if app.GetParameterType(param) == otbApplication.ParameterType_ListView:
return "List"
if app.GetListViewSingleSelectionMode(param):
return "String"
else:
return "String List"
if app.GetParameterType(param) == otbApplication.ParameterType_Group:
return "Group"
if app.GetParameterType(param) == otbApplication.ParameterType_InputProcessXML:
......@@ -166,14 +189,14 @@ def FindLengthOfLargestColumnText(app,paramlist):
def RstTableHeaderLine(strlist, listlen, delimiter):
line = "+"
for i in xrange(len(strlist)):
for i in range(len(strlist)):
line += delimiter * listlen[i] + '+'
line += linesep
return line
def RstTableHeading(strlist, listlen):
heading = RstTableHeaderLine(strlist, listlen, '-')
for i in xrange(len(strlist)):
for i in range(len(strlist)):
spaces = ' ' * ((listlen[i] - len(strlist[i])) )
heading += '|' + strlist[i] + spaces
heading += '|' + linesep
......@@ -189,7 +212,7 @@ def GenerateParametersTable(app,paramlist):
colLength = FindLengthOfLargestColumnText(app, paramlist)
output = linesep + ".. [#] Table: Parameters table for " + ConvertString(app.GetDocName()) + "." + linesep + linesep
headerlist = ["Parameter Key", "Parameter Name", "Parameter Type"]
for i in xrange(len(headerlist)):
for i in range(len(headerlist)):
colLength[i] = len(headerlist[i]) if colLength[i] < len(headerlist[i]) else colLength[i]
output += RstTableHeading(headerlist, colLength)
for param in paramlist:
......@@ -446,7 +469,7 @@ def ApplicationToRst(appname):
try:
app = otbApplication.Registry.CreateApplication(appname)
except e:
print e
print(e)
# TODO: remove this when bug 440 is fixed
app.Init()
output += RstHeading(app.GetName() + ' - ' + app.GetDocName(), '^')
......@@ -516,18 +539,19 @@ def GenerateRstForApplications():
allApps = None
try:
allApps = otbApplication.Registry.GetAvailableApplications( )
print(allApps)
except:
print 'error in otbApplication.Registry.GetAvailableApplications()'
print('error in otbApplication.Registry.GetAvailableApplications()')
sys.exit(1)
if not allApps:
print 'No OTB applications available. Please check OTB_APPLICATION_PATH env variable'
sys.exit(1)
print('No OTB applications available. Please check OTB_APPLICATION_PATH env variable')
sys.exit(1)
writtenTags = []
appNames = [app for app in allApps if app not in blackList]
print "All apps: %s" % (appNames,)
print("All apps: %s" % (appNames,))
appIndexFile = open(RST_DIR + '/Applications.rst', 'w')
appIndexFile.write(RstPageHeading("Applications Reference Documentation", "2", ref="apprefdoc"))
......@@ -535,7 +559,7 @@ def GenerateRstForApplications():
tags = GetApplicationTags(appName)
if not tags:
print "No tags for application: " + appName
print("No tags for application: " + appName)
sys.exit(1)
tag = tags[0]
......@@ -545,7 +569,7 @@ def GenerateRstForApplications():
tag_ = tag.replace(' ', '_')
if not tag_:
print 'empty tag found for ' + appName
print('empty tag found for ' + appName)
if not tag_ in writtenTags:
appIndexFile.write('\tApplications/' + tag_ + '.rst' + linesep)
......@@ -562,7 +586,7 @@ def GenerateRstForApplications():
tagFile.write("\tapp_" + appName + linesep)
tagFile.close()
print "Generating " + appName + ".rst" + " on tag " + tag_
print("Generating " + appName + ".rst" + " on tag " + tag_)
appFile = open(RST_DIR + '/Applications/app_' + appName + '.rst', 'w')
out = ApplicationToRst(appName)
appFile.write(out)
......@@ -571,17 +595,16 @@ def GenerateRstForApplications():
return out
# Start parsing options
parser = OptionParser(usage="Export application(s) to rst file.")
parser.add_option("-a",dest="appname",help="Generate rst only for this application (eg: OrthoRectification)")
parser.add_option("-m",dest="module",help="Generate rst only for this module (eg: Image Manipulation)")
parser.add_option("-o",dest="rstdir",help="directory where rst files are generated")
(options, args) = parser.parse_args()
if __name__ == "__main__":
parser = OptionParser(usage="Export application(s) to rst file.")
parser.add_option("-a",dest="appname",help="Generate rst only for this application (eg: OrthoRectification)")
parser.add_option("-m",dest="module",help="Generate rst only for this module (eg: Image Manipulation)")
parser.add_option("-o",dest="rstdir",help="directory where rst files are generated")
(options, args) = parser.parse_args()
RST_DIR = options.rstdir
RST_DIR = options.rstdir
if not options.appname is None:
out = ApplicationToRst(options.appname)
#print out
else:
GenerateRstForApplications()
if not options.appname is None:
out = ApplicationToRst(options.appname)
else:
GenerateRstForApplications()
This diff is collapsed.
......@@ -30,10 +30,10 @@ What's in OTB?
- Geospatial analysis.
For a full list of applications see the :ref:`apprefdoc`.
For a full list of applications see the chapter :ref:`apprefdoc`.
For an introduction to the C++ API see the
`Software Guide <https://www.orfeo-toolbox.org/SoftwareGuide/>`_.
And for exhaustive descrpition of the C++ API see the
And for an exhaustive description of the C++ API see the
`Doxygen <https://www.orfeo-toolbox.org/doxygen/>`_.
What is ORFEO?
......
......@@ -20,7 +20,7 @@ entry points. While the framework can be extended, the Orfeo ToolBox ships with
ergonomic parameters setting, display of documentation, and progress
reporting,
- A SWIG interface, which means that any application can be loaded
- A SWIG interface, which means that any application can be loaded,
set-up and executed into a high-level language such as Python or Java
for instance.
......@@ -28,20 +28,20 @@ entry points. While the framework can be extended, the Orfeo ToolBox ships with
the SWIG/Python interface is available with seamless integration within
QGIS.
The complete list of applications is described in the :ref:`apprefdoc`.
The complete list of applications is described in the Chapter :ref:`apprefdoc`.
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
All standard applications share the same implementation and automatically expose
generated interfaces.
However they are accessed in a slightly different way: the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For cwinstance, calling ``otbcli_Convert`` will launch the
command-line interface of the Convert application, while
``otbgui_Convert`` will launch its GUI.
``otbgui_Convert`` will launch the GUI.
Command-line launcher
---------------------
The command-line application launcher loads an application
plugin, to set its parameters, and execute it using the command line.
plugin, allows for its parameters to be set, and can then be executed from the command line.
Launching the ``otbApplicationLauncherCommandLine`` without any arguments provided,
results in the following help to be displayed:
......@@ -52,23 +52,23 @@ results in the following help to be displayed:
The ``module_name`` parameter corresponds to the application name. The
``[MODULEPATH]`` argument is optional and allows the path to the shared library
(or plugin) correpsonding to the ``module_name`` to be passed to the launcher.
(or plugin) corresponding to the ``module_name`` to be passed to the launcher.
It is also possible to set this path with the environment variable
``OTB_APPLICATION_PATH``, making the ``[MODULEPATH]`` optional. This
variable is checked by default when no ``[MODULEPATH]`` argument is
given. When using multiple paths in ``OTB_APPLICATION_PATH``, one must
make sure to use the standard path separator of the target system, which
ensure that the standard path separator of the target system is used, which
is ``:`` on Unix and ``;`` on Windows.
An error in the application name (i.e. in parameter ``module_name``)
will make the ``otbApplicationLauncherCommandLine`` lists the name of
will make the ``otbApplicationLauncherCommandLine`` list the name of
all applications found in the available path (either ``[MODULEPATH]``
and/or ``OTB_APPLICATION_PATH``).
To ease the use of the applications, and try avoiding extensive
environment customization, ready-to-use scripts are provided by the OTB
installation to launch each application, and takes care of adding the
To ease the use of the applications, and to avoid extensive
environment customizations; ready-to-use scripts are provided by the OTB
installation to launch each application. They take care of adding the
standard application installation path to the ``OTB_APPLICATION_PATH``
environment variable.
......@@ -79,7 +79,7 @@ application with the script called ``otbcli_Orthorectification``.
Launching an application without parameters, or with incomplete parameters, will cause the
launcher to display a summary of the parameters. This summary will display the minimum set
of parameters that are required to execute the application. Here is an
example with the OrthoRectification application:
example based on the OrthoRectification application:
::
......@@ -125,11 +125,11 @@ example with the OrthoRectification application:
For a detailed description of the application behaviour and parameters,
please check the application reference documentation presented
chapter [chap:apprefdoc], page  or follow the ``DOCUMENTATION``
hyperlink provided in ``otbApplicationLauncherCommandLine`` output.
in chapter :ref:`apprefdoc`  or follow the ``DOCUMENTATION``
hyperlink provided in the output of ``otbApplicationLauncherCommandLine``.
Parameters are passed to the application using the parameter key (which
might include one or several ``.`` character), prefixed by a ``-``.
Command-line examples are provided in chapter [chap:apprefdoc], page.
Command-line examples are provided in the chapter :ref:`apprefdoc`.
Graphical launcher
------------------
......@@ -193,7 +193,7 @@ 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.
will be automatically available from an OSGeo4W shell.
As for the command line and GUI launchers, the path to the application
modules needs to be properly set with the ``OTB_APPLICATION_PATH``
......@@ -355,7 +355,7 @@ Here is an example of MPI call on a cluster::
One can see that the registration and pan-sharpening of the
panchromatic and multi-spectral bands of a Pleiades image has been split
among 560 cpus and only took 56 seconds.
between 560 CPUs and only took 56 seconds to complete.
Note that this MPI parallel invocation of applications is only
available for command-line calls to OTB applications, and only for
......
......@@ -14,12 +14,7 @@
import sys
import os
HAVE_RTD_THEME=False
try:
import sphinx_rtd_theme
HAVE_RTD_THEME=True
except:
pass
import sphinx_rtd_theme
# 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
......@@ -111,11 +106,10 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
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()]
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.
......
......@@ -20,6 +20,8 @@ A simple example is given below:
As we can see, the new band math filter works with the class
otb::VectorImage.
.. _syntax:
Syntax: first elements
----------------------
......@@ -134,8 +136,7 @@ or in more simple terms (and only if im2 contains two components):
.. math:: im2* \{1,2\}'
Concerning division, this operation is not originally defined between
two vectors (see next section “New operators and functions”
-[ssec:operators]-).
two vectors (see next section :ref:`operators`).
Now, let’s go back to the first formula: this one specifies the addition
of two images band to band. With muParserX lib, we can now define such
......@@ -170,6 +171,8 @@ Fundamentally, a neighbourhood is represented as a matrix inside the
muParserX framework; so the remark about mathematically well-defined
formulas still stands.
.. _operators:
New operators and functions
---------------------------
......@@ -205,7 +208,7 @@ ones. For instance:
.. math:: im1 ~ mlt ~ 2.0
Note that the operator ’\*’ could have been used instead of ’pw’ one.
But ’pw’ is a little bit more permisive, and can tolerate a
But ’pw’ is a little bit more permissive, and can tolerate a
one-dimensional vector as the right operand.
**Operators pow and pw** The first operator allows the definition of an
......@@ -267,20 +270,20 @@ takes two inputs). For instance:
.. math:: corr(im1b1N3x3,im1b2N3x3)
**Function maj** This function allows to compute the most represented
**Function maj** This function computes the most represented
element within a vector or a matrix (the function can take as many
inputs as needed; one maj element value is computed per input). For
instance:
.. math:: maj(im1b1N3x3,im1b2N3x3)
**Function vmin and vmax** These functions allow to compute the min or
**Function vmin and vmax** These functions calculate the min or
max value of a given vector or neighborhood (only one input). For
instance:
.. math:: (vmax(im3b1N3x5)+vmin(im3b1N3x5)) ~ div ~ \{2.0\}
**Function cat** This function allows to concatenate the results of
**Function cat** This function concatenates the results of
several expressions into a multidimensional vector, whatever their
respective dimensions (the function can take as many inputs as needed).
For instance:
......@@ -293,8 +296,7 @@ application will call the function ’cat’ automatically. For instance:
.. math:: filter->SetExpression("im3b1 ; vmin(im3b1N3x5) ; median(im3b1N3x5) ; vmax(im3b1N3x5)");
Please, also refer to the next section “Application Programming
Interface” ([ssec:API]).
Please, also refer to the next section :ref:`API`.
**Function ndvi** This function implements the classical normalized
difference vegetation index; it takes two inputs. For instance:
......@@ -302,7 +304,7 @@ difference vegetation index; it takes two inputs. For instance:
.. math:: ndvi(im1b1,im1b4)
First argument is related to the visible red band, and the second one to
the near-infrareds band.
the near-infrared band.
The table below summarises the different functions and operators.
......@@ -366,6 +368,8 @@ Functions and operators summary:
[variables]
.. _API:
Application Programming Interface (API)
---------------------------------------
......@@ -381,7 +385,7 @@ of the new band math filter.
/** Return a pointer on the nth filter input */
ImageType * GetNthInput(unsigned int idx);
Refer to the section “Syntax: first elements” ([ssec:syntax]) where the
Refer to the section :ref:`syntax`, where the
two first functions have already been commented. The function
GetNthInput is quite clear to understand.
......@@ -394,13 +398,13 @@ Each time the function SetExpression is called, a new expression is
pushed inside the filter. **There are as many outputs as there are
expressions. The dimensions of the outputs (number of bands) are totally
dependent on the dimensions of the related expressions (see also last
remark of the section “Syntax: first element” -[ssec:syntax]-).** Thus,
remark of the section :ref:`syntax`).** Thus,
the filter always performs a pre-evaluation of each expression, in order
to guess how to allocate the outputs.
The concatenation of the results of many expressions (whose results can
have different dimensions) into one unique output is possible. For that
puropose, semi-colons (“;”) are used as separating characters. For
purpose, semi-colons (“;”) are used as separating characters. For
instance:
.. math:: filter->SetExpression("im1 + im2 ; im1b1*im2b1");
......@@ -494,7 +498,7 @@ expr. For instance:
/** Export constants and expressions to a given filename */
void ExportContext(const std::string& filename);
This function allows the user to export a txt file that saves its
This function allows the user to export a text file that saves its
favorite constant or expression definitions. Such a file will be
reusable by the ImportContext function (see above).
......
......@@ -70,7 +70,7 @@ input image to the default value for DEM (which is -32768):
The third mode “apply” can be useful if you apply a formula to the
entire image. This will likely change the values of pixels flagged as
no-data, but the no-data value in the image metadata doesn’t change. If
no-data, but the no-data value in the image metadata does not change. If
you want to fix all no-data pixels to their original value, you can
extract the mask of the original image and apply it on the output image.
For instance:
......@@ -91,8 +91,8 @@ For instance:
-mode.apply.mask mask.tif
You can also use this “apply” mode with an additional parameter
“mode.apply.ndval”. This parameter allow to set the output nodata value
applying according to your input mask.
“mode.apply.ndval”. This parameter sets the output nodata value
of the input mask.
Segmentation
------------
......@@ -274,7 +274,7 @@ all the previous steps:
Most of the settings from the previous applications are also exposed in this
composite application. The range and spatial radius used for the segmentation
step are half the values used for Mean-Shift smooting, which are obtained from
step are half the values used for Mean-Shift smoothing, which are obtained from
LargeScaleMeanShift parameters. There are two output modes: vector (default)
and raster. When the raster output is chosen, last step (vectorization) is
skipped.
......@@ -295,8 +295,8 @@ Dempster Shafer based Classifier Fusion
This framework is dedicated to perform cartographic validation starting
from the result of a detection (for example a road extraction), enhance
the results fiability by using a classifier fusion algorithm. Using a
set of descriptor, the processing chain validates or invalidates the
the results viability by using a classifier fusion algorithm. Using a
set of descriptors, the processing chain validates or invalidates the
input geometrical features.
Fuzzy Model (requisite)
......@@ -341,7 +341,7 @@ for each studied polyline, the chosen descriptors. In this context, the
*ComputePolylineFeatureFromImage* application can be used for a large
range of descriptors. It has the following inputs:
- ``-in`` an image (of the sudied scene) corresponding to the chosen
- ``-in`` an image (of the studied scene) corresponding to the chosen
descriptor (NDVI, building Mask…)
- ``-vd`` a vector data containing polyline of interest
......@@ -394,7 +394,7 @@ Second Step: Feature Validation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The final application (*VectorDataDSValidation* ) will validate or
unvalidate the studied samples using `the Dempster-Shafer
invalidate the studied samples using `the Dempster-Shafer
theory <http://en.wikipedia.org/wiki/Dempster%E2%80%93Shafer_theory>`_
. Its inputs are:
......
......@@ -10,7 +10,7 @@ Optical radiometric calibration
In remote sensing imagery, pixel values are referred to as Digital
Numbers (DN) and they cannot be physically interpreted or compared. They are
influenced by various factors such as the amount of light flowing through
the sensor, the gain of the detectors and the analogic to numeric
the sensor, the gain of the detectors and the analogue to digital
converter.
Depending on the season, the light and atmospheric conditions, the
......@@ -63,7 +63,7 @@ sensors are:
- Formosat
The *OpticalCalibration* application allows to perform optical
The *OpticalCalibration* application performs optical
calibration. The mandatory parameters are the input and output images.
All other parameters are optional. By default the level of calibration
is set to TOA (Top Of Atmosphere). The output images are expressed in
......@@ -128,7 +128,7 @@ Using either **OTB Applications** or modules from **Monteverdi** , it is
possible to perform both steps in a row, or step-by-step fusion, as
described in the above sections.
The *BundleToPerfectSensor* application allows to perform both steps in
The *BundleToPerfectSensor* application performs both steps in
a row. Seamless sensor modelling is used to perform zooming and
registration of the multi-spectral image on the panchromatic image. In
the case of a Pléiades bundle, a different approach is used: an affine
......@@ -157,15 +157,15 @@ application:
There are also optional parameters that can be useful for this tool:
- The ``-elev`` option allows to specify the elevation, either with a
DEM formatted for OTB (``-elev.dem`` option, see section [ssec:dem])
- The ``-elev`` option specifies the elevation, either with a
DEM formatted for OTB (``-elev.dem`` option, see section :ref:`dem`)
or with an average elevation (``-elev.default`` option). Since
registration and zooming of the multi-spectral image is performed
using sensor-models, it may happen that the registration is not
perfect in case of landscape with high elevation variation. Using a
DEM in this case allows to get better registration.
perfect in case of a landscape with a large variation in elevation. In this
case a DEM will allow for a better registration to be achieved.
- The ``-lmSpacing`` option allows to specify the step of the
- The ``-lmSpacing`` option specifies the step of the
registration grid between the multi-spectral image and panchromatic
image. This is expressed in amount of panchromatic pixels. A lower
value gives a more precise registration but implies more computation
......@@ -173,15 +173,15 @@ There are also optional parameters that can be useful for this tool:
Default value is 10 pixels, which gives sufficient precision in most
of the cases.
- The ``-mode`` option allows to select the registration mode for the
- The ``-mode`` option selects the registration mode for the
multi-spectral image. The ``default`` mode uses the sensor model of
each image to create a generic MS to Pan transform. The ``phr``
mode uses a simple affine transform (which doesnt need an elevation
mode uses a simple affine transform (which does not need an elevation
source nor a registration grid).
Pan-sharpening is a quite heavy processing requiring a lot of system
resource. The ``-ram`` option allows you to limit the amount of memory
available for the computation, and to avoid overloading your computer.
Pan-sharpening is a process that requires a lot of system
resources. The ``-ram`` option allows you to limit the amount of memory
available for the computation, and also avoids overloading your computer.
Increasing the available amount of RAM may also result in better
computation time, seems it optimises the use of the system resources.
Default value is 256 Mb.
......@@ -194,7 +194,7 @@ Figure 5: Pan-sharpened image using Orfeo ToolBox.
Please also note that since registration and zooming of the
multi-spectral image with the panchromatic image relies on sensor
modelling, this tool will work only for images whose sensor models is
available in **Orfeo ToolBox** (see :ref:`section3` for a detailed
available in **Orfeo ToolBox** (see Section :ref:`section3` for a detailed
list). It will also work with ortho-ready products in cartographic
projection.
......@@ -204,17 +204,17 @@ Digital Elevation Model management
----------------------------------
A Digital Elevation Model (DEM) is a georeferenced image (or collection
of images) where each pixel corresponds to a local elevation. DEM are
of images) where each pixel corresponds to a local elevation. DEMs are
useful for tasks involving sensor to ground and ground to sensor
coordinate transforms, like during ortho-rectification (see :ref:`section3`). These transforms need to find the intersection
coordinate transformations, for example, ortho-rectification (see Section :ref:`section3`). These transforms need to find the intersection
between the line of sight of the sensor and the Earth geoid. If a simple
spheroid is used as the Earth model, potentially high localisation
errors can be made in areas where elevation is high or perturbed. Of
course, DEM accuracy and resolution have a great impact on the precision
of these transformations.
Two main available DEM, free of charges, and with worldwide cover, are
both delivered as 1 degree by 1 degree tiles:
The two principal DEMs that are available free of charges, and with worldwide cover, are
both delivered as 1 degree by 1 degree tiles. They are:
- `The Shuttle Radar topographic Mission
(SRTM) <http://www2.jpl.nasa.gov/srtm/>`_ is a DEM with a resolution of 90 metres,
......@@ -232,7 +232,7 @@ are supposed to be located within a single directory. General elevation
support is also supported from GeoTIFF files.
Whenever an application or **Monteverdi** module requires a DEM, the
option **elev.dem** allows set the DEM directory. This directory must
option **elev.dem** sets the DEM directory. This directory must
contain the DEM tiles, either in DTED or SRTM format or as a GeoTIFF.
Subdirectories are not supported.
......@@ -244,7 +244,7 @@ the Earth.
We provide one geoid in the `OTB-Data <https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-data/tree/master/Input/DEM>`_ repository.
In all applications, the option **elev.geoid** allows to manage the path
In all applications, the option **elev.geoid** manages the path
to the geoid. Finally, it is also possible to use an average elevation
in case no DEM is available by using the **elev.default** option.
......@@ -358,7 +358,7 @@ section.
Ortho-rectification with **OTB Applications**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The *OrthoRectification* application allows to perform
The *OrthoRectification* application performs
ortho-rectification and map re-projection. The simplest way to use it is
the following command:
......@@ -378,9 +378,10 @@ parameters:
- The region of interest (upper-left corner and size of the image) is
estimated so as to contain the whole input image extent.
In order to use a Digital Elevation Model (see :ref:`section2`.) for
better localisation performances, one can pass the directory containing
the DEM tiles to the application:
In order to use a Digital Elevation Model to improve
the locational accuracy, one can pass the directory containing
the DEM tiles to the application as follows. Further information regarding
the use of DEMs can be found in Section :ref:`section2`.
::
......@@ -448,30 +449,30 @@ follows:
-outputs.sizex x_size
-outputs.sizey y_size
Where the ``-outputs.ulx`` and ``-outputs.uly`` options allow to specify
the coordinates of the upper-left corner of the output image. The
``-outputs.sizex`` and ``-outputs.sizey`` options allow to specify the
Where the ``-outputs.ulx`` and ``-outputs.uly`` options specify
the coordinates of the upper-left corner of the output image, while the options:
``-outputs.sizex`` and ``-outputs.sizey`` specify the
size of the output image.
A few more interesting options are available:
- The ``-opt.rpc`` option allows to use an estimated RPC model instead
- The ``-opt.rpc`` option uses an estimated RPC model instead
of the rigorous SPOT5 model, which speeds-up the processing,
- The ``-opt.gridspacing`` option allows to define the spacing of the
- The ``-opt.gridspacing`` option defines the spacing of the
localisation grid used for ortho-rectification. A coarser grid
results in speeding-up the processing, but with potential loss of
accuracy. A standard value would be 10 times the ground spacing of
the output image.
- The ``-interpolator`` option allows to change the interpolation
- The ``-interpolator`` option changes the interpolation
algorithm between nearest neighbor, linear and bicubic. Default is
nearest neighbor interpolation, but bicubic should be fine in most
cases.
- The ``-opt.ram`` option allows to specify the amount of memory
available for the processing (in Mb). Default is 256 Mb. Increasing
this value to fit the available memory on your computer might
- The ``-opt.ram`` option specifies the amount of memory
available for the processing (in Mb), with a default value of 256 Mb. Increasing
this value to fit the available memory on your computer can
speed-up the processing.
......
......@@ -70,8 +70,8 @@ get a set of point which match in both images.
The basic idea is to use this set of homologous points and estimate with
them a residual transformation between the two images.
There is a wide variety of keypoint detector in the literature. They
allow to detect and describe local features in images. These algorithms
There is a wide variety of keypoint detectors in the literature, and they
allow for the detection and description of local features in images. These algorithms
provide for each interesting point a “feature description”. This
descriptor has the property to be invariant to image translation,
scaling, and rotation, partially invariant to illumination changes and
......@@ -90,16 +90,16 @@ The application offers two modes:
full extent of both images (please note that in this mode large image
file are not supported).
- The second mode, called *geobins*, allows to set-up spatial binning
- The second mode, called *geobins*, allows for the set-up of spatial binning
so as to get fewer points spread across the entire image. In this
mode, the corresponding spatial bin in the second image is estimated
using geographical transform or sensor modeling, and is padded
according to the user defined precision.
Moreover, in both modes the application can filter matches whose
co-localization in the first image exceed this precision. Last, the
co-localization in the first image exceed this precision. Finally, the
elevation parameters allow to deal more precisely with sensor modelling
in case of sensor geometry data. The *outvector* option allows to create
in case of sensor geometry data. The *outvector* option allows for the creation of
a vector file with segments corresponding to the localization error
between the matches.
......@@ -150,7 +150,7 @@ display in a GIS software.
Please note again that for a proper use of the application, elevation
must be correctly set (including DEM and geoid file). The map parameters
allows to choose a map projection in which the accuracy will be
sets a map projection in which the accuracy will be
estimated (in meters).
Accuracy values are provided as output of the application (computed
......@@ -177,7 +177,7 @@ reference. **Orfeo ToolBox** offers since version 3.16 the possibility
to use
hrefhttp://wiki.orfeo-toolbox.org/index.php/ExtendedFileNameextend image
path to use different metadata file as input. That’s what we are going
to use there to orthorectify the QuickBird image using the *.geom* file
to use to orthorectify the QuickBird image using the *.geom* file
obtained by the **RefineSensorModel** applications. over the first one
using for the second image estimated sensor model which take into
account the original sensor model of the slave and which also fit to the
......
......@@ -154,7 +154,7 @@ The \code{OTB} contains the following subdirectories:
OTB is organized into different modules, each one covering different part of image processing.
It is therefore important to understand the source code directory structure---found in \code{OTB/Modules}---.
\begin{itemize}
\item \code{OTB/Modules/Adapters}---Adapters for Boost, Curl, Gdal, OpenThreads and Ossim.
\item \code{OTB/Modules/Adapters}---Adapters for Boost, Curl, Gdal and Ossim.
\item \code{OTB/Modules/Applications}---a set of applications modules that can be launched in different ways
(command-line, graphical interface, Python/Java), refer to the OTB Cookbook for more information.
\item \code{OTB/Modules/Core}---core classes, macro definitions,
......@@ -166,16 +166,16 @@ It is therefore important to understand the source code directory structure---fo
instance, pansharpening.
\item \code{OTB/Modules/Hyperspectral}---hyperspectral images analysis.
\item \code{OTB/Modules/IO}---classes that support the reading
and writing of data.
and writing of data.
\item \code{OTB/Modules/Learning}---several functionalities for
supervised learning and classification.
\item \code{OTB/Modules/OBIA}---Object Based Image Analysis filters
and data structures.
and data structures.
\item \code{OTB/Modules/Radiometry}---classes allowing to compute
vegetation indices and radiometric corrections.
\item \code{OTB/Modules/Registration}---classes for registration of images or other data structures to each other.
\item \code{OTB/Modules/Remote}---Functions to fetch remote modules.
\item \code{OTB/Modules/Segmentation}---several functionalities for image segmentation.
vegetation indices and radiometric corrections.
\item \code{OTB/Modules/Registration}---classes for registration of images or other data structures to each other.
\item \code{OTB/Modules/Remote}---Functions to fetch remote modules.
\item \code{OTB/Modules/Segmentation}---several functionalities for image segmentation.
\item \code{OTB/Modules/ThirdParty}---Modules that import OTB's dependencies.
\item \code{OTB/Modules/Wrappers}---Applications wrappers with several access points (command-line, QT Gui, SWIG\ldots).
\end{itemize}
......
......@@ -26,11 +26,11 @@
// in OTB. This framework uses the generic programming approach. All
// change detection filters are
// \doxygen{otb}{BinaryFunctorNeighborhoodImageFilter}s, that is, they
// are filters taking two images as input and providing one image as
// output. The change detection computation itself is performed on a
// are filters taking two images as input and provide one image as
// output. The change detection computation itself is performed on
// the neighborhood of each pixel of the input images.
//
// The first step required to build a change detection filter is to
// The first step in building a change detection filter is to
// include the header of the parent class.
//
// Software Guide : EndLatex
......@@ -54,7 +54,7 @@
// something accepting the syntax \code{foo()}. This can be
// implemented using classical C/C++ functions, but it is preferable
// to implement it using C++ functors. These are classical C++ classes
// which overload the \code{()} operator. This allows using them with
// which overload the \code{()} operator. This allows to be used with
// the same syntax as C/C++ functions.
//
// Since change detectors operate on neighborhoods, the functor
......@@ -107,7 +107,7 @@ public:
// the functor used to perform the change detection operation.
//
// Inside the class only a few \code{typedef}s and the constructors
// and destructors have to be declared.
// and destructors need to be declared.
//
// Software Guide : EndLatex
......@@ -152,8 +152,8 @@ private:
// Software Guide : BeginLatex
//
// Pay attention to the fact that no \code{.hxx} file is needed, since
// filtering operation is implemented in the
// Pay particular attention to the fact that no \code{.hxx} file is needed, since
// the filtering operation is implemented in the
// \doxygen{otb}{BinaryFunctorNeighborhoodImageFilter} class. So all
// the algorithmics part is inside the functor.
//
......@@ -178,7 +178,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginLatex
//
// As usual, we start by defining the image types. The internal
// computations will be performed with floating point precision,
// computations will be performed using floating point precision,
// while the output image will be stored using one byte per pixel.
//
// SoftwareGuide : EndLatex
......@@ -210,7 +210,7 @@ int main(int argc, char* argv[])
// Software Guide : BeginLatex
//
// The next step is declaring the filter for the change detection.
// The next step is to declare the filter for the change detection.
//
// SoftwareGuide : EndLatex
......
......@@ -107,11 +107,11 @@ int main(int argc, char* argv[])
//
// The change detector will give positive and negative values
// depending on the sign of the difference. We are usually
// interested only in the asbolute value of the difference. For
// interested only in the absolute value of the difference. For
// this purpose, we will use the \doxygen{itk}{AbsImageFilter}. Also, before
// saving the image to a file in, for instance, PNG format, we will
// rescale the results of the change detection in order to use all
// the output pixel type range of values.
// rescale the results of the change detection in order to use the full range
// of values of the output pixel type.
//
// Software Guide : EndLatex
......
......@@ -38,11 +38,11 @@
// different set of parameters, mean vectors and covariance matrices. We
// choose the \subdoxygen{itk}{Statistics}{MeanSampleFilter} (sample mean) and the
// \subdoxygen{itk}{Statistics}{CovarianceSampleFilter} (sample covariance) for the
// estimation algorithms of the two parameters. If we want more a robust
// estimation algorithm, we can replace these estimation algorithms with more
// estimation algorithms of the two parameters. If we want a more robust
// estimation algorithm, we can replace these estimation algorithms with additional
// alternatives without changing other components in the classifier system.
//
// It is a bad idea to use the same sample for test and training
// It is a bad idea to use the same sample for both testing and training
// (parameter estimation) of the parameters. However, for simplicity, in
// this example, we use a sample for test and training.
//
......@@ -254,8 +254,8 @@ int main(int, char *[])
// \label{eq:bayes2}
// \end{equation}
//
// The remainder of the code snippet shows how to use user-specified class
// labels. The classification result will be stored in a
// The remainder of the code snippet demonstrates how user-specified class
// labels are used. The classification result will be stored in a
// MembershipSample object, and for each measurement vector, its
// class label will be one of the two class labels, 100 and 200
// (\code{unsigned int}).
......
......@@ -23,7 +23,7 @@
/**\defgroup boost Boost alike helpers
* \ingroup Thematic
* \brief Various helpers that are likelly to end-up in boost by themselves eventually.
* \brief Various helpers that are likely to eventually end-up in boost by themselves.
* \see http://www.boost.org/
* @{
*/
......
......@@ -69,7 +69,7 @@ Res LexicalCast(In const& in, std::string const& kind) {
* \param[in] errmsg a msg complement used to build the error message to
be shown if there is \c lexical_cast exception. See \c
otb:Utils::LexicalCast().
* \param delims delimitter characters (space is default)
* \param delims delimiter characters (space is default)
* \throw std::bad_alloc in case of exhausted memory
* \throw std::runtime_error in case an element from the input string
cannot be converted into a valid \c T instance.
......@@ -95,16 +95,16 @@ ConvertStringToVector(std::string const &str, T& ret, std::string const& errmsg,
}
/**\ingroup Utils
* split a given std::string of into key value based on given delimitter
* string. default delimitter is '='. If the string does not have a delimitter
* split a given std::string of into key value based on given delimiter
* string. The default delimiter is '='. If the string does not have a delimiter
* the key is set to input string and value is set to defValue.
* \param[in] str input string
* \param key[out] An std::string reference where key will be stored
* \param value[out] a reference of \cT where value will be stored
* \param defValue[in] a default value if there is no delimitter fo
* \param defValue[in] a default value if there is no delimiter fo
* \param[in] errmsg a msg complement used to build the error message to
be shown if there is \c lexical_cast exception. See \cotb:Utils::LexicalCast().
* \param delims delimitter characters (space is default)
* \param delims delimiter characters (space is default)
* \throw std::bad_alloc in case of exhausted memory
* \throw std::runtime_error in case an element from the input string
cannot be converted into a valid \c T instance.
......
......@@ -63,7 +63,7 @@ GDALDataType GetGDALDataType()
{
if( sizeof(long) == 8 )
{
//itkWarningMacro(<< "Cast a long (64 bits) image into an int (32 bits) one.")
//itkWarningMacro(<< "Cast a long (64 bit) image to an int (32 bit) one.")
}
return GDT_Int32;
}
......@@ -71,7 +71,7 @@ GDALDataType GetGDALDataType()
{
if( sizeof(unsigned long) == 8 )
{
//itkWarningMacro(<< "Cast an unsigned long (64 bits) image into an unsigned int (32 bits) one.")
//itkWarningMacro(<< "Cast an unsigned long (64 bit) image to an unsigned int (32 bit) one.")
}
return GDT_UInt32;
}
......
......@@ -24,8 +24,8 @@
/**\ingroup GeometriesFilters
* \file otbGeometriesToGeometriesFilter.h
* \since OTB v 3.14.0
* Commons definitions for geometries filter definition.
* This file contains all the main classes required to define new geometries
* Common definitions for geometry filter definitions.
* This file contains all the main classes required to define new geometry
* transformations.
*/
......@@ -46,7 +46,7 @@ namespace otb
{
/**\ingroup GeometriesFilters
* \class GeometriesToGeometriesFilter
* Root abstract class for all geometries to geometries filters.
* Root abstract class for all geometry to geometry filters.
* \since OTB v 3.14.0
*
* \ingroup OTBGdalAdapters
......@@ -203,10 +203,10 @@ struct OTBGdalAdapters_EXPORT FieldCopyTransformation
/**
* Defines the fields in the destination layer.
* The default action is to copy all fieds from one layer to another.
* The default action is to copy all fields from one layer to another.
* \param [in] source source \c Layer
* \param [in,out] dest destination \c Layer
* \throw itk::ExceptionObject in case the operation can't succeed.
* \throw itk::ExceptionObject in case the operation cannot succeed.
*/
void DefineFields(ogr::Layer const& source, ogr::Layer & dest) const;
private:
......
......@@ -18,7 +18,7 @@
# limitations under the License.
#
set(DOCUMENTATION "Adapters for the Gdal Library ( for reading and writing ).")
set(DOCUMENTATION "Adapters for the GDAL Library ( for reading and writing ).")
otb_module(OTBGdalAdapters
ENABLE_SHARED
......
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
project(OTBOpenThreadsAdapters)
set(OTBOpenThreadsAdapters_LIBRARIES OTBOpenThreadsAdapters)
otb_module_impl()
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbThreads_h
#define otbThreads_h
namespace otb
{
/** \class Threads
* \brief Operation from open threads that are used in Monteverdi
*
* Implement the sleep operation from openthreads to remove Monteverdi
* dependence to openthreads at compile time.
*
*
* \ingroup OTBOpenThreadsAdapters
*/
class Threads
{
public:
static int Sleep(unsigned int microsec);
};
} // namespace otb
#endif
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#