source: branches/PublicaMundi_David_integration_01-devel/docs/kernel/orfeotoolbox.txt @ 948

Last change on this file since 948 was 573, checked in by nbozon, 10 years ago

more corrections on the ZOO OTB support doc

  • Property svn:keywords set to HeadURL Date Author Id Rev
File size: 3.9 KB
Line 
1.. _kernel-orfeotoolbox:
2   
3How To Use the Orfeo Toolbox support
4=============================================
5
6:Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna
7:Last Updated: $Date: 2015-02-09 17:33:28 +0000 (Mon, 09 Feb 2015) $
8
9The key idea of the ZOO `Orfeo Toolbox <http://orfeo-toolbox.org/otb/>`_  support implementation is to take advantage of the `OTB Applications <http://orfeo-toolbox.org/otb/otb-applications.html>`_ by using them directly as ZOO WPS Services, without any modifications. 
10
11Here is an overview of the installation procedure and the required configuration to activate the OTB support in ZOO-Project.
12
13.. Note:: These installation steps were successfully tested on Ubuntu 14.4 LTS
14
15.. contents:: Table of Contents
16    :depth: 3
17    :backlinks: top
18
19How to make it working ?
20------------------------
21
22Requirements
23**************
24
25   * latest `ZOO-Kernel <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel>`_ trunk version
26   * Orfeo Toolbox (`OTB 4.2.1 <http://orfeo-toolbox.org/otb/>`_ )
27   * Insight Segmentation and Registration Toolkit  (`ITK-4.7 <http://itk.org/ITK/resources/software.html/>`_ )
28
29Installation steps
30********************
31
32.. Note:: For OTB and ITK, the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS must first be set to ``-fPIC``
33
34Download lastest ZOO-Kernel code from SVN.
35
36.. code-block:: guess
37
38    svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel
39
40Then compile ZOO-Kernel using the needed configuration options as shown bellow:
41
42.. code-block:: guess
43
44     cd zoo-kernel
45     autoconf
46     ./configure  --with-otb=/usr/local --with-itk=/usr/local --with-itk-version=4.7
47     make
48     cp zoo_loader.cgi /usr/lib/cgi-bin
49
50Configuration steps
51*************************
52
53Main configuration file
54^^^^^^^^^^^^^^^^^^^^^^^
55
56Add the following content to your ``/usr/lib/cgi-bin/main.cfg`` file
57in the ``[env]`` section:
58
59.. code-block:: guess
60
61       ITK_AUTOLOAD_PATH=/usr/local/lib/otb/applications
62
63Services configuration file
64^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66The build of the `otb2zcfg  <http://zoo-project.org/trac/browser/trunk/thirds/otb2zcfg>`_ utility is required to activate the available OTB Applications as WPS services. This can be done using the following command:
67
68.. code-block:: guess
69       
70         mkdir build
71         cd build
72         ccmake ..
73         make
74       
75Run the following command to generate all the needed zcfg files for the available OTB Application:
76
77.. code-block:: guess
78       
79         mkdir zcfgs
80         cd zcfgs
81         export ITK_AUTOLOAD_PATH=/your/path/to/otb/applications
82         ../build/otb2zcfg
83         mkdir /location/to/your/cgi-bin/OTB
84         cp *zcfg /location/to/your/cgi-bin/OTB
85       
86.. warning
87
88     The ITK_AUTOLOAD_PATH environment variable is required in the [env] section of your main.cfg.
89
90Test the ZOO OTB support
91^^^^^^^^^^^^^^^^^^^^^^^
92
93Once done, OTB Applications should be listed as available WPS Services when runing a GetCapabilities request
94
95.. code-block:: guess
96
97        http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS
98
99Each OTB Service can then be described individually using the DescribeProcess request, as for example:
100
101.. code-block:: guess
102
103   http://localhost/cgi-bin/zoo_loader.cgi?request=DescribeProcess&service=WPS&version=1.0.0&Identifier=OTB.BandMath
104
105And executed according to your needs, as for the following example executing OTB.BandMath with the OTB sample data as input
106
107.. code-block:: guess
108
109   http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=OTB.BandMath&DataInputs=il=Reference@xlink:href=http://hg.orfeo-toolbox.org/OTB-Data/raw-file/ca154074b282/Examples/verySmallFSATSW.tif;il=Reference@xlink:href=http://hg.orfeo-toolbox.org/OTB-Data/raw-file/ca154074b282/Examples/verySmallFSATSW_nir.tif;out=float;exp=im1b3*cos%28im1b1%29,im1b2*cos%28im1b1%29,im1b1*cos%28im1b1%29&RawDataOutput=out@mimeType=image/png
110
111When executing OTB applications as WPS Services, it is also possible to check the OTB process status, using the usual ZOO GetStatus request.
112
113
114
115   
116
117
118
119
120
121
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png