diff --git a/Documentation/Cookbook/rst/Installation.rst b/Documentation/Cookbook/rst/Installation.rst index 973783f63321df3fded8e591a0dec9846a751304..e37fd817b6046e39319e6502f05f4825a9e7c4da 100644 --- a/Documentation/Cookbook/rst/Installation.rst +++ b/Documentation/Cookbook/rst/Installation.rst @@ -87,7 +87,7 @@ You can add it by using these command-lines: sudo aptitude install add-apt-repository sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable -After you can run: +You will then need to run: :: @@ -114,8 +114,8 @@ OpenSuse 12.X and higher For OpenSuse 12.X and higher, OTB Applications packages are available through *zypper*. -First, you need to add the appropriate repositories with these -command-lines (please replace :math:`11.4` by your OpenSuse version): +First, you need to add the appropriate repositories with the following +commands (please replace :math:`11.4` with your version of OpenSuse): :: @@ -126,7 +126,7 @@ command-lines (please replace :math:`11.4` by your OpenSuse version): sudo zypper ar http://download.opensuse.org/repositories/home:/tzotsos/openSUSE_11.4/ tzotsos -Now run: +You should then run: :: diff --git a/Documentation/Cookbook/rst/Installation_Linux.txt b/Documentation/Cookbook/rst/Installation_Linux.txt index c4eb913166f05a59ea93471a2f6abac81beddc7b..bc238f41188379a7e082f6df34cf30180bc519f9 100644 --- a/Documentation/Cookbook/rst/Installation_Linux.txt +++ b/Documentation/Cookbook/rst/Installation_Linux.txt @@ -1,24 +1,24 @@ We provide a binary package for GNU/Linux x86_64. This package includes -all of OTB applications along with commandline and graphical launchers. -Download it from `OTB's download page +all of the OTB applications along with command line and graphical launchers. +It can be downloaded from `OTB's 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: +This package is a self-extractable archive. You may uncompress it with a +double-click on the file, or from the command line as follows: .. parsed-literal:: chmod +x OTB-|release|-Linux64.run ./OTB-|release|-Linux64.run -The self-extractible archive only needs common tools found on most Linux +The self-extractable archive only needs common tools found on most Linux distributions ("sed", "grep", "find", "cat", "printf", "ln", ...). However, be aware that it requires tools such as "which" and "file" (they are not always present, for instance when building a container). Please note that the resulting installation is not meant to be moved, you should uncompress the archive in its final location. Once the -archive is extracted, the directory structure is made of: +archive is extracted, the directory structure consists of: - ``monteverdi.sh``: A launcher script for Monteverdi @@ -38,9 +38,9 @@ archive is extracted, the directory structure is made of: In order to run the command line launchers, this package doesn’t require any special library that is not present in most modern Linux -distributions. There is a small caveat for "expat" though. The binaries depend +distributions. There is a small caveat for "expat" though as these binaries depend on "libexpat.so", which can be supplied by most package managers (apt, yum, ...). -If not already present, look for one of the following packages: +If not already present, it is necessary to install one of the following packages: :: @@ -65,14 +65,14 @@ with ``source otbenv.profile``. Python bindings ~~~~~~~~~~~~~~~ -Starting from OTB 5.8.0, OTB python bindings are distributed with binary package. -currently only Python 2.x is supported. If no compatible python is found, installation -notify you about it. If everything works fine, you will be given information about -using python bindings. +Starting from OTB 5.8.0, OTB Python bindings are distributed with binary package. +Currently only Python 2.x is supported and if no compatible Python version is found a +notification is generated during the installation process. If the installation completes +without issue, information relating to your Python bindings will be provided. -You must have python numpy bindings installed in your system. you can install it locally -without admin rights with "pip install --user numpy". This is to give users to choose -their own existing python installation rather than distributing one in OTB package +You must have Python numpy bindings installed in your system. They can be installed locally +without admin rights as follows: "pip install --user numpy". This is to give users the option +to select their own existing Python installation rather than the one dibstributed by the OTB package. Notes: diff --git a/Documentation/Cookbook/rst/Installation_Macx.txt b/Documentation/Cookbook/rst/Installation_Macx.txt index c142851cefee0ea80700ba48eb020051f05efd29..c004af64d3f1d0679015b608fba8f753ab5c1457 100644 --- a/Documentation/Cookbook/rst/Installation_Macx.txt +++ b/Documentation/Cookbook/rst/Installation_Macx.txt @@ -35,7 +35,7 @@ using python bindings. You must have python numpy bindings installed in your system. you can install it locally without admin rights with "pip install --user numpy". This is to give users to choose -their own existing python installation rather than distributing one in OTB package +their own existing python installation rather than distributing one in OTB package. Notes: diff --git a/Documentation/Cookbook/rst/Installation_Windows.txt b/Documentation/Cookbook/rst/Installation_Windows.txt index d9a72803aa4b5a0d61eb2adb4906e2ee4d50415d..d49f183da74fce0cfa575f2c8c1004fbcb6aa622 100644 --- a/Documentation/Cookbook/rst/Installation_Windows.txt +++ b/Documentation/Cookbook/rst/Installation_Windows.txt @@ -25,14 +25,14 @@ with ``otbenv.bat``. Python bindings ~~~~~~~~~~~~~~~ -Starting from OTB 5.8.0, OTB python bindings are distributed with binary package. -currently only Python 2.x is supported. If no compatible python is found, installation -notify you about it. If everything works fine, you will be given information about -using python bindings. - -You must have python numpy bindings installed in your system. you can install it locally -without admin rights with "pip install --user numpy". This is to give users to choose -their own existing python installation rather than distributing one in OTB package +Starting from OTB 5.8.0, OTB Python bindings are distributed with binary package. +Currently only Python 2.x is supported and if no compatible Python version is found a +notification is generated during the installation process. If the installation completes +without issue, information relating to your Python bindings will be provided. + +You must have Python numpy bindings installed in your system. They can be installed locally +without admin rights as follows: "pip install --user numpy". This is to give users the option +to select their own existing Python installation rather than the one dibstributed by the OTB package. Notes ~~~~~ diff --git a/Documentation/Cookbook/rst/Monteverdi.rst b/Documentation/Cookbook/rst/Monteverdi.rst index 991b4d6e7c5b81ab8ee90fe899aa17de91558734..257ae1a017a0bac15cadf68443a6a5cdf6d236a4 100644 --- a/Documentation/Cookbook/rst/Monteverdi.rst +++ b/Documentation/Cookbook/rst/Monteverdi.rst @@ -72,11 +72,11 @@ Image displaying This part of the main window is intended to display the images loaded by the user. There are many nice keyboard shortcuts or mouse tricks that let the user have a better experience in navigating throughout the -loaded images. These shortcuts and tricks are given within the Help item -of the main menu, by clicking Keymap; here is a short list of the most -useful ones: +loaded images. These shortcuts and tricks are provided within the Help item +of the main menu under Keymap. Here is a short list of the most +commonly used ones: -The classical ones: +The standard ones: - CTRL+O = Open file(s) @@ -108,8 +108,8 @@ Right side dock The dock on the right side is divided into four tabs: -- Quicklook: gives the user a degraded view of the whole extent, - letting him/her easily select the area to be displayed +- Quicklook: provides an overview of the full extent of the image, + and allows one to easily select the area to be displayed. - Histogram: gives the user information about the value distribution of the selected channels. By clicking the mouse’s left button, user @@ -208,21 +208,20 @@ BandMath BandMath application is intended to apply mathematical operations on pixels (launch it with shortcut CTRL+A). In this example, we are going to use this application to change the dynamics of an image, and check -the result by looking at histogram tab, in the right side dock. The +the result by looking at the histogram tab on the right-hand side of the GUI. The formula used is the following: :math:`\text{im1b1} \times 1000`. In the figures below ( [fig:BM]), one can notice that the mode of the distribution is located at position :math:`356.0935`, whereas in the transformed image, the mode is located at position :math:`354737.1454`, -that’s to say 1000 times farther away approximately (the cursors aren’t +that’s to say approximately 1000 times further away (the cursors aren’t placed exactly at the same position in the screenshots). .. figure:: Art/MonteverdiImages/BM.png Segmentation ~~~~~~~~~~~~ - -Now, let’s use the segmentation application (launch it with shortcut -CTRL+A). We let the user take a look at the application’s documentation; +From within Monteverdi, the Segmentation application can be launched using the +shortcut CTRL+A. We let the user take a look at the application’s documentation; let’s simply say that as we wish we could display the segmentation with , we must tell the application to output the segmentation in raster format. Thus, the value of the mode option must be set to raster. The diff --git a/Documentation/Cookbook/rst/OTB-Applications.rst b/Documentation/Cookbook/rst/OTB-Applications.rst index 9d218f15fa2a65c1d52bc691a24a19373b80a737..55d0f53dd1043442aa4ecd488337de5fe774bfbd 100644 --- a/Documentation/Cookbook/rst/OTB-Applications.rst +++ b/Documentation/Cookbook/rst/OTB-Applications.rst @@ -3,15 +3,16 @@ A brief tour of OTB Applications OTB ships with more than 90 ready to use applications for remote sensing tasks. They usually expose existing processing functions from the underlying C++ -library, or compose them into high level pipelines. OTB applications allow to: +library, or integrate them into high level pipelines. OTB applications allow the user +to: -- Combine together two or more functions from the Orfeo Toolbox, +- Combine two or more functions from the Orfeo ToolBox, -- Provide a nice high level interface to handle: parameters, input - data, output data and communication with the user. +- Provide a high level interface to handle: input and output data, + definition of parameters and communication with the user. OTB applications can be launched in different ways, and accessed from different -entry points. The framework can be extended, but Orfeo Toolbox ships with the following: +entry points. While the framework can be extended, the Orfeo ToolBox ships with the following: - A command-line launcher, to call applications from the terminal, @@ -50,16 +51,15 @@ results in the following help to be displayed: Usage: ./otbApplicationLauncherCommandLine module_name [MODULEPATH] [arguments] The ``module_name`` parameter corresponds to the application name. The -``[MODULEPATH]`` argument is optional and allows to pass to the launcher -a path where the shared library (or plugin) corresponding to -``module_name`` is. +``[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. 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 -is ``:`` on Unix, and ``;`` on Windows. +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 @@ -73,12 +73,12 @@ standard application installation path to the ``OTB_APPLICATION_PATH`` environment variable. These scripts are named ``otbcli_<ApplicationName>`` and do not need any -path settings. For example you can start the Orthorectification +path settings. For example, you can start the Orthorectification application with the script called ``otbcli_Orthorectification``. -Launching an application with no or incomplete parameters will make the -launcher display a summary of the parameters, indicating the mandatory -parameters missing to allow for application execution. Here is an +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: :: @@ -129,7 +129,7 @@ chapter [chap:apprefdoc], page or follow the ``DOCUMENTATION`` hyperlink provided in ``otbApplicationLauncherCommandLine`` output. 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 chapter [chap:apprefdoc], page. Graphical launcher ------------------ @@ -138,8 +138,7 @@ The graphical interface for the applications provides a useful interactive user interface to set the parameters, choose files, and monitor the execution progress. -This launcher needs the same two arguments as the command line launcher -: +This launcher needs the same two arguments as the command line launcher: :: @@ -207,10 +206,10 @@ configured automatically so you don’t need to tweak In the ``otbApplication`` module, two main classes can be manipulated : - ``Registry``, which provides access to the list of available - applications, and can create applications + applications, and can create applications. - ``Application``, the base class for all applications. This allows to - interact with an application instance created by the ``Registry`` + interact with an application instance created by the ``Registry``. Here is one example of how to use Python to run the ``Smoothing`` application, changing the algorithm at each iteration. @@ -372,7 +371,7 @@ The processing toolbox OTB applications are available from QGIS. Use them from the processing toolbox, which is accessible with Processing :math:`\rightarrow` -Toolbox. Switch to “advanced interface†in the bottom of the application +ToolBox. Switch to “advanced interface†in the bottom of the application widget and OTB applications will be there. .. figure:: Art/QtImages/qgis-otb.png @@ -492,7 +491,7 @@ Here is an example of MPI call on a cluster:: ------------ END JOB INFO 1043196.tu-adm01 --------- One can see that the registration and pan-sharpening of the -panchromatic and multi-spectral bands of a Pleiades image has bee split +panchromatic and multi-spectral bands of a Pleiades image has been split among 560 cpus and took only 56 seconds. Note that this MPI parallel invocation of applications is only diff --git a/Documentation/Cookbook/rst/Recipes.rst b/Documentation/Cookbook/rst/Recipes.rst index 6550a09b2623d76c4f334f0d69bf01ee9ae81ac6..fa9478d5abf7698b4abbdcf806d625a0ab220cba 100644 --- a/Documentation/Cookbook/rst/Recipes.rst +++ b/Documentation/Cookbook/rst/Recipes.rst @@ -1,11 +1,10 @@ Recipes ======= -This chapter presents guideline to perform various remote sensing and +This chapter presents guidelines to perform various remote sensing and image processing tasks with either , or both. Its goal is not to be -exhaustive, but rather to help the non-developer user to get familiar -with these two packages, so that he can use and explore them for his -future needs. +exhaustive, but rather to familiarise users with the OTB package functionality +and demonstrate how the can be applied. .. toctree:: :maxdepth: 6 diff --git a/Documentation/Cookbook/rst/recipes/featextract.rst b/Documentation/Cookbook/rst/recipes/featextract.rst index 3d5e1af59d23df22aff23be8ce7d3d67f5727252..4bf18f042a688a55d7bf16ec4a99e66a18404a45 100644 --- a/Documentation/Cookbook/rst/recipes/featextract.rst +++ b/Documentation/Cookbook/rst/recipes/featextract.rst @@ -139,8 +139,8 @@ relevant channels in brackets are: Soil:BI - Brightness index (Red, Green) Soil:BI2 - Brightness index 2 (NIR, Red, Green) -The application can be used like this, which leads to an output image -with 3 bands, respectively with the Vegetation:NDVI, Vegetation:RVI and +The application can be used as follows, which would produce an output image +containing 3 bands, respectively with the Vegetation:NDVI, Vegetation:RVI and Vegetation:IPVI radiometric indices in this exact order: :: @@ -153,8 +153,8 @@ Vegetation:IPVI radiometric indices in this exact order: -list Vegetation:NDVI Vegetation:RVI Vegetation:IPVI -or like this, which leads to a single band output image with the -Water:NDWI2 radiometric indice: +or as follows, which would produce a single band output image with the +Water:NDWI2 radiometric index: :: diff --git a/Documentation/Cookbook/rst/recipes/optpreproc.rst b/Documentation/Cookbook/rst/recipes/optpreproc.rst index b6b1f2ba2d09713bf1f1541a58f9b663cd15686a..013152ad9282ab62b163555ee0fe34ae0ac232f5 100644 --- a/Documentation/Cookbook/rst/recipes/optpreproc.rst +++ b/Documentation/Cookbook/rst/recipes/optpreproc.rst @@ -2,14 +2,14 @@ From raw image to calibrated product ==================================== This section presents various pre-processing tasks that are presented in -a classical order to obtain a calibrated, pan-sharpened image. +a standard order to obtain a calibrated, pan-sharpened image. Optical radiometric calibration ------------------------------- -In remote sensing imagery, pixel values are called DN (for Digital -Numbers) and can not be physically interpreted and compared: they are -influenced by various factors such as the amount of light flowing trough +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 converter. @@ -87,14 +87,14 @@ Pan-sharpening Because of physical constrains on the sensor design, it is difficult to achieve high spatial and spectral resolution at the same time: a better -spatial resolution means a smaller detector, which in turns means lesser +spatial resolution means a smaller detector, which in turn means lesser optical flow on the detector surface. On the contrary, spectral bands are obtained through filters applied on the detector surface, that lowers the optical flow, so that it is necessary to increase the detector size to achieve an acceptable signal to noise ratio. For these reasons, many high resolution satellite payload are composed -of two sets of detectors, which in turns delivers two different kind of +of two sets of detectors, which in turn delivers two different kind of images: - The multi-spectral (XS) image, composed of 3 to 8 spectral bands @@ -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 :ref:`section3` for a detailed list). It will also work with ortho-ready products in cartographic projection. @@ -207,37 +207,37 @@ A Digital Elevation Model (DEM) is a georeferenced image (or collection of images) where each pixel corresponds to a local elevation. DEM 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 -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 +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 transforms. +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 Shuttle Radar topographic Mission - (SRTM) <http://www2.jpl.nasa.gov/srtm/>`_ is a 90 meters resolution - DEM, obtained by radar interferometry during a campaign of the + (SRTM) <http://www2.jpl.nasa.gov/srtm/>`_ is a DEM with a resolution of 90 metres, + obtained by radar interferometry during a campaign of the Endeavour space shuttle from NASA in 2000. - The `Advanced Spaceborne Thermal Emission and Reflection Radiometer - (ASTER) <http://www.ersdac.or.jp/GDEM/E/2.html>`_ is a 30 meters - resolution DEM obtained by stereoscopic processing of the archive of + (ASTER) <http://www.ersdac.or.jp/GDEM/E/2.html>`_ is a DEM with a resolution of + 30 metres obtained by stereoscopic processing of the archive of the ASTER instrument. -The **Orfeo Toolbox** relies on `OSSIM <http://www.ossim.org/>`_ +The **Orfeo ToolBox** relies on `OSSIM <http://www.ossim.org/>`_ capabilities for sensor modelling and DEM handling. Tiles of a given DEM 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 -contains the DEM tiles, either in DTED or SRTM format, either as GeoTIFF -files. Subdirectories are not supported. +contain the DEM tiles, either in DTED or SRTM format or as a GeoTIFF. +Subdirectories are not supported. Depending on the reference of the elevation, you also need to use a -geoid to manage elevation accurately. For this, you need to specify a +geoid to accurately manage the elevation. For this, you need to specify a path to a file which contains the geoid. `Geoid <http://en.wikipedia.org/wiki/Geoid>`_ corresponds to the equipotential surface that would coincide with the mean ocean surface of the Earth. @@ -290,7 +290,7 @@ Ortho-rectification can be performed either with **OTB Applications** or **Monteverdi** . Sensor parameters and image meta-data are seamlessly read from the image files without needing any user interaction, provided that all auxiliary files are available. The sensor for which **Orfeo -Toolbox** supports ortho-rectification of raw products are the +ToolBox** supports ortho-rectification of raw products are the following: - Pleiades @@ -306,7 +306,7 @@ following: - WorldView In addition, GeoTiff and other file format with geographical information -are seamlessly read by **Orfeo Toolbox** , and the ortho-rectification +are seamlessly read by **Orfeo ToolBox** , and the ortho-rectification tools can be used to re-sample these images in another map projection. Beware of “ortho-ready†products @@ -331,7 +331,7 @@ it. Obviously, this map projection is not as accurate as the sensor parameters of the raw geometry. In addition, the impact of the elevation model can’t be observed if the map projection is used. In order to perform an ortho-rectification on this type of product, the map -projection has to be hidden from **Orfeo Toolbox** . +projection has to be hidden from **Orfeo ToolBox** . You can see if a product is an “ortho-ready†product by using ``gdalinfo`` or OTB ReadImageInfo application. @@ -343,7 +343,7 @@ Check if your product verifies following two conditions: - The product has a map projection: you should see a projection name with physical origin and spacing. -In that case, you can hide the map projection from the **Orfeo Toolbox** +In that case, you can hide the map projection from the **Orfeo ToolBox** by using *extended* filenames. Instead of using the plain input image path, you append a specific key at the end: diff --git a/Documentation/Cookbook/rst/recipes/pbclassif.rst b/Documentation/Cookbook/rst/recipes/pbclassif.rst index 320e3e4796e3429d43d74820c70b8b63b04b7b92..d82ef45724aca938be69b9733988489476f68982 100644 --- a/Documentation/Cookbook/rst/recipes/pbclassif.rst +++ b/Documentation/Cookbook/rst/recipes/pbclassif.rst @@ -33,7 +33,7 @@ model algorithm to train. You have the possibility to do the unsupervised classification,for it, you must to choose the Shark kmeans classifier. Please refer to the ``TrainVectorClassifier`` application reference documentation. -In case of multiple samples files, you can add them to the ``-io.vd`` +In case of multiple sample files, you can add them to the ``-io.vd`` parameter. The feature to be used for training must be explicitly listed using @@ -49,14 +49,14 @@ can be set using the ``-cfield`` option. By default, the application will estimate the trained classifier performances on the same set of samples that has been used for -training. The ``-io.vd`` parameter allows to specify a different -samples file for this purpose, for a more fair estimation of the -performances. Note that this performances estimation scheme can also -be estimated afterward (see `Validating the classification model`_ +training. The ``-io.vd`` parameter allows for the specification of different +sample files for this purpose, for a more fair estimation of the +performances. Note that this scheme to estimate the performance can also +be carried out afterwards (see `Validating the classification model`_ section). -Features classification +Feature classification ~~~~~~~~~~~~~~~~~~~~~~~ Once the classifier has been trained, one can apply the model to @@ -71,8 +71,8 @@ classify a set of features on a new vector data file using the -cfield predicted -out classifiedData.shp -This application output a vector data file storing sample values -and classification label. The output is optional, in this case the +This application outputs a vector data file storing sample values +and classification labels. The output is optional, in this case the input vector data classification label field is updated. Validating classification @@ -83,7 +83,7 @@ or *TrainImagesClassifier* applications is directly estimated by the application itself, which displays the precision, recall and F-score of each class, and can generate the global confusion matrix for supervised algorithms. For unsupervised algorithms a contingency table -is generated. Those results are output as an \*.CSV file. +is generated. These results are output as an \*.CSV file. Pixel based classification -------------------------- @@ -173,13 +173,13 @@ The output XML file will look like this:: -Samples selection +Sample selection ~~~~~~~~~~~~~~~~~ Now, we know exactly how many samples are available in the image for -each class and each geometry in the training set. From this +each class and each geometry in the training set. From these statistics, we can now compute the sampling rates to apply for each -classes, and perform the sample selection. This will be done by the +class, and perform the sample selection. This will be done by the ``SampleSelection`` application. There are several strategies to compute those sampling rates: @@ -192,27 +192,27 @@ There are several strategies to compute those sampling rates: * **Percent strategy:** Each class will be sampled with a user-defined percentage (same value for all classes) of samples available in this class. -* **Total strategy:** A global number of samples to generate is - divided proportionally among each class (classes proportions are +* **Total strategy:** A global number of samples to select is + divided proportionally among each class (class proportions are enforced). -* **Take all strategy:** Take all the available samples +* **Take all strategy:** Take all the available samples. * **By class strategy:** Set a target number of samples for each class. The number of samples for each class is read from a CSV file. To actually select the sample positions, there are two available -sampler: +sampling techniques: * **Random:** Randomly select samples while respecting the sampling - rate -* **Periodic:** Sample periodically using the sampling rate + rate. +* **Periodic:** Sample periodically using the sampling rate. The application will make sure that samples spans the whole training set extent by adjusting the sampling rate. Depending on the strategy to determine the sampling rate, some geometries of the training set -might not be sampled. +may not be sampled. The application will accept as input the input image and training -geometries, as well class statistics XML file computed during previous +geometries, as well class statistics XML file computed during the previous step. It will output a vector file containing point geometries which indicate the location of the samples. @@ -227,7 +227,7 @@ indicate the location of the samples. -out samples.sqlite The csv file written by the optional ``-outrates`` parameter sums-up what -has been done during samples selection:: +has been done during sample selection:: #className requiredSamples totalSamples rate 11 941 56774 0.0165745 @@ -253,8 +253,8 @@ has been done during samples selection:: Samples extraction ~~~~~~~~~~~~~~~~~~ -Now that we selected the location of the samples, we will attach -measurement to them. This is the purpose of the ``SampleExtraction`` +Now that the locations of the samples are selected, we will attach +measurements to them. This is the purpose of the ``SampleExtraction`` application. It will walk through the list of samples and extract the underlying pixel values. If no ``-out`` parameter is given, the ``SampleExtraction`` application can work in update mode, thus allowing @@ -286,8 +286,7 @@ Working with several images If the training set spans several images, the ``MultiImageSamplingRate`` application allows to compute the appropriate sampling rates per image -and per class, in order to get samples that spans the whole images -coverage. +and per class, in order to get samples that span the entire extents of the images. It is first required to run the ``PolygonClassStatistics`` application on each image of the set separately. The ``MultiImageSamplingRate`` diff --git a/Documentation/Cookbook/rst/recipes/residual_registration.rst b/Documentation/Cookbook/rst/recipes/residual_registration.rst index 5bae14b3d6b46e1a295a36d1338448abff80a41f..d01cb0734b615db35257263a17a50e82271ae13e 100644 --- a/Documentation/Cookbook/rst/recipes/residual_registration.rst +++ b/Documentation/Cookbook/rst/recipes/residual_registration.rst @@ -173,7 +173,7 @@ Orthorecrtify image using the affine geometry Now we will show how we can use this new sensor model. In our case we’ll use this sensor model to orthorectify the image over the Pléiades -reference. **Orfeo Toolbox** offers since version 3.16 the possibility +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 diff --git a/Documentation/Cookbook/rst/recipes/sarprocessing.rst b/Documentation/Cookbook/rst/recipes/sarprocessing.rst index f61bbb4a90e32e0c00ae732d9b2e7cca4fb347b4..9d74c1bbc7b364f5c62d36e0c824de85b94ba528 100644 --- a/Documentation/Cookbook/rst/recipes/sarprocessing.rst +++ b/Documentation/Cookbook/rst/recipes/sarprocessing.rst @@ -20,7 +20,7 @@ If SARimg.tif is a TerraSAR-X or a COSMO-SkyMed image: otbcli_SarRadiometricCalibration -in SARimg.tif -out SARimg-calibrated.tif -If SARimg.tif is a RadarSat2 or a Sentinel1 image, it ’s possible to +If SARimg.tif is a RadarSat2 or a Sentinel1 image, it is possible to specify the look-up table (automatically found in the metadata provided with such image): diff --git a/Documentation/Cookbook/rst/recipes/stereo.rst b/Documentation/Cookbook/rst/recipes/stereo.rst index 2c868a753698214beaec22e8a1836b381647f890..c25b3f74a880296bf8053cdd1737fbfa2b8f412b 100644 --- a/Documentation/Cookbook/rst/recipes/stereo.rst +++ b/Documentation/Cookbook/rst/recipes/stereo.rst @@ -194,7 +194,7 @@ can be directly linked to the local elevation An almost complete spectrum of `stereo correspondence algorithms <http://vision.middlebury.edu/stereo/eval3/>`_ has been published and it is still augmented at a significant rate! -The **Orfeo Toolbox** implements different local strategies for block +The **Orfeo ToolBox** implements different local strategies for block matching: - Sum of Square Distances block-matching (SSD) diff --git a/Documentation/SoftwareGuide/Latex/ContributorList.tex b/Documentation/SoftwareGuide/Latex/ContributorList.tex index 347a2bd7cfc0ccb656576f3f6e6abf27a78ac74b..8f34a6e134c565737bfa4edc4313219968fb53b2 100644 --- a/Documentation/SoftwareGuide/Latex/ContributorList.tex +++ b/Documentation/SoftwareGuide/Latex/ContributorList.tex @@ -13,6 +13,7 @@ Christophe Lay, Christophe Palmann (CS), Conrad Bielski (JRC), Cyrille Valladeau (CS), +Daniel McInerney, David Dubois, David Youssefi (CNES Intern, then CS), Edouard Barthelet (Telecom Bretagne and Thales Communications), diff --git a/Documentation/SoftwareGuide/Latex/Installation.tex b/Documentation/SoftwareGuide/Latex/Installation.tex index 3b5fa2ded7cfdb8943edbdc22c2b1896d0a256c8..a5521be83db8be2685853792a2dadc55017cd4a9 100644 --- a/Documentation/SoftwareGuide/Latex/Installation.tex +++ b/Documentation/SoftwareGuide/Latex/Installation.tex @@ -128,7 +128,7 @@ See table \ref{tab:otb-dependencies} for the full list of dependencies. \hline \textbf{Qt} & \url{http://qt-project.org} & no & 4 \\ \hline -\textbf{QWT} & \url{http://qwt.sourceforge.net} & no & 5 \\ +\textbf{QWT} & \url{http://qwt.sourceforge.net} & no & 6 \\ \hline \textbf{Shark} & \url{http://image.diku.dk/shark/} & no & 3.1 \\ \hline @@ -404,15 +404,23 @@ $ make install \hline \textbf{OTB\_USE\_QT4} & OTBQt4 & OTBQtWidget \\ \hline -\textbf{OTB\_USE\_OPENCV} & OTBOpenCV & \\ +\textbf{OTB\_USE\_QWT} & OTBQwt & OTBMonteverdiGUI OTBMonteverdi \\ \hline -\textbf{OTB\_USE\_MUPARSERX} & OTBMuParserX & OTBMathParserX OTBAppMathParserX \\ +\textbf{OTB\_USE\_GLEW} & OTBGlew & OTBIce OTBMonteverdiGUI OTBMonteverdi \\ +\hline +\textbf{OTB\_USE\_OPENGL} & OTBOpenGL & OTBIce OTBMonteverdiGUI OTBMonteverdi \\ \hline \textbf{OTB\_USE\_CURL} & OTBCurl & \\ \hline \textbf{OTB\_USE\_MUPARSER} & OTBMuParser & OTBMathParser OTBDempsterShafer OTBAppClassification OTBAppMathParser OTBAppStereo OTBAppProjection OTBAppSegmentation OTBAppClassification OTBRoadExtraction OTBRCC8 OTBCCOBIA OTBAppSegmentation OTBMeanShift OTBAppSegmentation OTBMeanShift OTBAppSegmentation \\ \hline -\textbf{OTB\_USE\_LIBSVM} & OTBLibSVM & OTBSVMLearning \\ +\textbf{OTB\_USE\_MUPARSERX} & OTBMuParserX & OTBMathParserX OTBAppMathParserX \\ +\hline +\textbf{OTB\_USE\_LIBSVM} & OTBLibSVM & optional for OTBSupervised OTBAppClassification \\ +\hline +\textbf{OTB\_USE\_OPENCV} & OTBOpenCV & optional for OTBSupervised OTBAppClassification \\ +\hline +\textbf{OTB\_USE\_SHARK} & OTBShark & optional for OTBSupervised OTBAppClassification \\ \hline \textbf{OTB\_USE\_MAPNIK} & OTBMapnik & OTBVectorDataRendering \\ \hline diff --git a/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx b/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx index c9afc715e9f28a85260245a65d0a354bdcc26264..5f108a9a13e1ee408449082bb89f980b00761c94 100644 --- a/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx +++ b/Modules/Applications/AppClassification/app/otbComputeOGRLayersFeaturesStatistics.cxx @@ -94,12 +94,23 @@ private: otb::ogr::Feature feature = layer.ogr().GetNextFeature(); ClearChoices("feat"); + + std::vector<std::string> choiceKeys; + for(int iField=0; iField<feature.ogr().GetFieldCount(); iField++) { std::string key, item = feature.ogr().GetFieldDefnRef(iField)->GetNameRef(); key = item; - key.erase(std::remove(key.begin(), key.end(), ' '), key.end()); + + // Transform chain : lowercase and alphanumerical + key.erase(std::remove_if(key.begin(), key.end(), std::not1(std::ptr_fun(::isalnum))), key.end()); std::transform(key.begin(), key.end(), key.begin(), tolower); + + // Key must be unique + choiceKeys = GetChoiceKeys("feat"); + while(choiceKeys.end() != std::find(choiceKeys.begin(), choiceKeys.end(), key) ) + key.append("0"); + key="feat."+key; AddChoice(key,item); } diff --git a/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx b/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx index 971c79a427a44e1064f75c194e2630ebfa73affb..eb58a7e0ac4371d6c0fa4830f457bf36c11d426f 100644 --- a/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbOGRLayerClassifier.cxx @@ -113,12 +113,22 @@ private: otb::ogr::Feature feature = layer.ogr().GetNextFeature(); ClearChoices("feat"); + std::vector<std::string> choiceKeys; + for(int iField=0; iField<feature.ogr().GetFieldCount(); iField++) { std::string key, item = feature.ogr().GetFieldDefnRef(iField)->GetNameRef(); key = item; - key.erase(std::remove(key.begin(), key.end(), ' '), key.end()); + + // Transform chain : lowercase and alphanumerical + key.erase(std::remove_if(key.begin(), key.end(), std::not1(std::ptr_fun(::isalnum))), key.end()); std::transform(key.begin(), key.end(), key.begin(), tolower); + + // Key must be unique + choiceKeys = GetChoiceKeys("feat"); + while(choiceKeys.end() != std::find(choiceKeys.begin(), choiceKeys.end(), key) ) + key.append("0"); + key="feat."+key; AddChoice(key,item); } diff --git a/Modules/Applications/AppImageUtils/app/otbConvert.cxx b/Modules/Applications/AppImageUtils/app/otbConvert.cxx index 8298c8877aa3355a71df8138f65413b2ee976bab..4c50e1a2e7b17488d7fc9f8885e762e623c7d46f 100644 --- a/Modules/Applications/AppImageUtils/app/otbConvert.cxx +++ b/Modules/Applications/AppImageUtils/app/otbConvert.cxx @@ -21,17 +21,16 @@ #include "otbWrapperApplication.h" #include "otbWrapperApplicationFactory.h" -#include "itkCastImageFilter.h" - - #include "otbVectorRescaleIntensityImageFilter.h" -#include "itkCastImageFilter.h" #include "otbUnaryImageFunctorWithVectorImageFilter.h" #include "otbStreamingShrinkImageFilter.h" #include "itkListSample.h" #include "otbListSampleToHistogramListGenerator.h" #include "itkImageRegionConstIterator.h" +#include "otbImageListToVectorImageFilter.h" +#include "otbMultiToMonoChannelExtractROI.h" +#include "otbImageList.h" namespace otb { @@ -71,13 +70,19 @@ public: /** Filters typedef */ typedef itk::Statistics::ListSample<FloatVectorImageType::PixelType> ListSampleType; typedef itk::Statistics::DenseFrequencyContainer2 DFContainerType; - typedef ListSampleToHistogramListGenerator<ListSampleType, FloatVectorImageType::InternalPixelType, DFContainerType> HistogramsGeneratorType; - typedef StreamingShrinkImageFilter<FloatVectorImageType, FloatVectorImageType> ShrinkFilterType; + typedef ListSampleToHistogramListGenerator<ListSampleType, + FloatVectorImageType::InternalPixelType, + DFContainerType> HistogramsGeneratorType; + typedef StreamingShrinkImageFilter<FloatVectorImageType, + FloatVectorImageType> ShrinkFilterType; typedef Functor::LogFunctor<FloatVectorImageType::InternalPixelType> TransferLogFunctor; - typedef UnaryImageFunctorWithVectorImageFilter<FloatVectorImageType, FloatVectorImageType, TransferLogFunctor> TransferLogType; + typedef UnaryImageFunctorWithVectorImageFilter<FloatVectorImageType, + FloatVectorImageType, + TransferLogFunctor> TransferLogType; private: + void DoInit() ITK_OVERRIDE { SetName("Convert"); @@ -85,16 +90,26 @@ private: " and/or changing the pixel type."); // Documentation SetDocName("Image Conversion"); - SetDocLongDescription("This application performs an image pixel type conversion (short, ushort, uchar, int, uint, float and double types are handled). The output image is written in the specified format (ie. that corresponds to the given extension).\n The conversion can include a rescale using the image 2 percent minimum and maximum values. The rescale can be linear or log2."); + SetDocLongDescription("This application performs an image pixel type conversion " + "(short, ushort, uchar, int, uint, float and double types are handled). " + "The output image is written in the specified format (ie. that corresponds " + "to the given extension).\n The conversion can include a rescale of the data range, " + "by default it's set from 2% to 98% of the data values. The rescale can be linear or log2. \n " + "The choice of the output channels can be done with the extended filename, " + "but less easy to handle. To do this, a 'channels' parameter allows you to select " + "the desired bands at the output. There are 3 modes, the available choices are: \n" + " * grayscale : to display mono image as standard color image \n" + " * rgb : select 3 bands in the input image (multi-bands) \n" + " * all : keep all bands."); SetDocLimitations("None"); SetDocAuthors("OTB-Team"); SetDocSeeAlso("Rescale"); - AddDocTag(Tags::Manip); + AddDocTag(Tags::Manip); AddDocTag("Conversion"); AddDocTag("Image Dynamic"); - AddParameter(ParameterType_InputImage, "in", "Input image"); + AddParameter(ParameterType_InputImage, "in", "Input image"); SetParameterDescription("in", "Input image"); AddParameter(ParameterType_Choice, "type", "Rescale type"); @@ -110,7 +125,8 @@ private: MandatoryOff("type.linear.gamma"); AddParameter(ParameterType_InputImage, "mask", "Input mask"); - SetParameterDescription("mask", "The masked pixels won't be used to adapt the dynamic (the mask must have the same dimensions as the input image)"); + SetParameterDescription("mask", "The masked pixels won't be used to adapt the dynamic " + "(the mask must have the same dimensions as the input image)"); MandatoryOff("mask"); DisableParameter("mask"); @@ -118,40 +134,90 @@ private: SetParameterDescription("hcp","Parameters to cut the histogram edges before rescaling"); AddParameter(ParameterType_Float, "hcp.high", "High Cut Quantile"); - SetParameterDescription("hcp.high", "Quantiles to cut from histogram high values before computing min/max rescaling (in percent, 2 by default)"); + SetParameterDescription("hcp.high", "Quantiles to cut from histogram high values " + "before computing min/max rescaling (in percent, 2 by default)"); MandatoryOff("hcp.high"); SetDefaultParameterFloat("hcp.high", 2.0); DisableParameter("hcp.high"); AddParameter(ParameterType_Float, "hcp.low", "Low Cut Quantile"); - SetParameterDescription("hcp.low", "Quantiles to cut from histogram low values before computing min/max rescaling (in percent, 2 by default)"); + SetParameterDescription("hcp.low", "Quantiles to cut from histogram low values " + "before computing min/max rescaling (in percent, 2 by default)"); MandatoryOff("hcp.low"); SetDefaultParameterFloat("hcp.low", 2.0); DisableParameter("hcp.low"); AddParameter(ParameterType_OutputImage, "out", "Output Image"); SetParameterDescription("out", "Output image"); + SetDefaultOutputPixelType("out",ImagePixelType_uint8); + + AddParameter(ParameterType_Choice, "channels", "Channels selection"); + SetParameterDescription("channels", "It's possible to select the channels " + "of the output image. There are 3 modes, the available choices are:"); + + AddChoice("channels.all", "Default mode"); + SetParameterDescription("channels.all", "Select all bands in the input image, (1,...,n)."); + + AddChoice("channels.grayscale", "Grayscale mode"); + SetParameterDescription("channels.grayscale", "Display single channel as standard color image."); + AddParameter(ParameterType_Int, "channels.grayscale.channel", "Grayscale channel"); + SetDefaultParameterInt("channels.grayscale.channel", 1); + SetMinimumParameterIntValue("channels.grayscale.channel", 1); + + AddChoice("channels.rgb", "RGB composition"); + SetParameterDescription("channels.rgb", "Select 3 bands in the input image " + "(multi-bands), by default (1,2,3)."); + + AddParameter(ParameterType_Int, "channels.rgb.red", "Red Channel"); + SetParameterDescription("channels.rgb.red", "Red channel index."); + SetMinimumParameterIntValue("channels.rgb.red", 1); + AddParameter(ParameterType_Int, "channels.rgb.green", "Green Channel"); + SetParameterDescription("channels.rgb.green", "Green channel index."); + SetMinimumParameterIntValue("channels.rgb.green", 1); + AddParameter(ParameterType_Int, "channels.rgb.blue", "Blue Channel"); + SetParameterDescription("channels.rgb.blue", "Blue channel index."); + SetMinimumParameterIntValue("channels.rgb.blue", 1); AddRAMParameter(); // Doc example parameter settings SetDocExampleParameterValue("in", "QB_Toulouse_Ortho_XS.tif"); - SetDocExampleParameterValue("out", "otbConvertWithScalingOutput.png uint8"); + SetDocExampleParameterValue("out", "otbConvertWithScalingOutput.png"); SetDocExampleParameterValue("type", "linear"); + SetDocExampleParameterValue("channels", "rgb"); SetOfficialDocLink(); } void DoUpdateParameters() ITK_OVERRIDE { - // Nothing to do here for the parameters : all are independent + // Read information + typedef otb::ImageMetadataInterfaceBase ImageMetadataInterfaceType; + ImageMetadataInterfaceType::Pointer metadataInterface = + ImageMetadataInterfaceFactory::CreateIMI(GetParameterImage("in")->GetMetaDataDictionary()); + + int nbBand = GetParameterImage("in")->GetNumberOfComponentsPerPixel(); + SetMaximumParameterIntValue("channels.grayscale.channel", nbBand); + SetMaximumParameterIntValue("channels.rgb.red", nbBand); + SetMaximumParameterIntValue("channels.rgb.green", nbBand); + SetMaximumParameterIntValue("channels.rgb.blue", nbBand); + + if (nbBand > 1) + { + // get band index : Red/Green/Blue + int bandRed = metadataInterface->GetDefaultDisplay()[0] + 1; + int bandGreen = metadataInterface->GetDefaultDisplay()[1] + 1; + int bandBlue = metadataInterface->GetDefaultDisplay()[2] + 1; + SetDefaultParameterInt("channels.rgb.red", bandRed); + SetDefaultParameterInt("channels.rgb.green", bandGreen); + SetDefaultParameterInt("channels.rgb.blue", bandBlue); + } + } template<class TImageType> void GenericDoExecute() { - typename TImageType::Pointer castIm; - std::string rescaleType = this->GetParameterString("type"); if( (rescaleType != "none") && (rescaleType != "linear") && (rescaleType != "log2") ) @@ -161,21 +227,24 @@ private: if( rescaleType == "none" ) { - castIm = this->GetParameterImage<TImageType>("in"); + // selected channel + typename TImageType::Pointer tempImage; + tempImage = GetSelectedChannels<TImageType>(); + + SetParameterOutputImage<TImageType>("out", tempImage); + } - else + else // linear or log2 { - FloatVectorImageType::Pointer input = this->GetParameterImage("in"); - FloatVectorImageType::Pointer mask; - bool useMask = false; - if (IsParameterEnabled("mask")) - { - mask = this->GetParameterImage("mask"); - useMask = true; - } - const unsigned int nbComp(input->GetNumberOfComponentsPerPixel()); + if (IsParameterEnabled("mask")) mask = this->GetParameterImage("mask"); + + // selected channel + typename FloatVectorImageType::Pointer tempImage; + tempImage = GetSelectedChannels<FloatVectorImageType>(); + + const unsigned int nbComp(tempImage->GetNumberOfComponentsPerPixel()); typedef otb::VectorRescaleIntensityImageFilter<FloatVectorImageType, TImageType> RescalerType; typename TImageType::PixelType minimum; @@ -197,8 +266,9 @@ private: // Shrink factor is computed so as to load a quicklook of 1000 // pixels square at most - typename FloatVectorImageType::SizeType imageSize = input->GetLargestPossibleRegion().GetSize(); - unsigned int shrinkFactor = std::max(imageSize[0], imageSize[1]) < 1000 ? 1 : std::max(imageSize[0], imageSize[1])/1000; + typename FloatVectorImageType::SizeType imageSize = tempImage->GetLargestPossibleRegion().GetSize(); + unsigned int shrinkFactor = + std::max(imageSize[0], imageSize[1]) < 1000 ? 1 : std::max(imageSize[0], imageSize[1])/1000; otbAppLogDEBUG( << "Shrink factor used to compute Min/Max: "<<shrinkFactor ); @@ -212,7 +282,7 @@ private: { //define the transfer log m_TransferLog = TransferLogType::New(); - m_TransferLog->SetInput(input); + m_TransferLog->SetInput(tempImage); m_TransferLog->UpdateOutputInformation(); shrinkFilter->SetInput(m_TransferLog->GetOutput()); @@ -221,37 +291,32 @@ private: } else { - shrinkFilter->SetInput(input); - rescaler->SetInput(input); + shrinkFilter->SetInput(tempImage); + rescaler->SetInput(tempImage); shrinkFilter->Update(); } ShrinkFilterType::Pointer maskShrinkFilter = ShrinkFilterType::New(); - if (useMask) - { - maskShrinkFilter->SetShrinkFactor(shrinkFactor); - maskShrinkFilter->SetInput(mask); - maskShrinkFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); - maskShrinkFilter->Update(); - } - - otbAppLogDEBUG( << "Shrink done" ); - otbAppLogDEBUG( << "Evaluating input Min/Max..." ); - itk::ImageRegionConstIterator<FloatVectorImageType> it(shrinkFilter->GetOutput(), shrinkFilter->GetOutput()->GetLargestPossibleRegion()); + itk::ImageRegionConstIterator<FloatVectorImageType> + it(shrinkFilter->GetOutput(), shrinkFilter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionConstIterator<FloatVectorImageType> itMask; - if (useMask) - { - itMask = itk::ImageRegionConstIterator<FloatVectorImageType>(maskShrinkFilter->GetOutput(),maskShrinkFilter->GetOutput()->GetLargestPossibleRegion()); - } typename ListSampleType::Pointer listSample = ListSampleType::New(); - listSample->SetMeasurementVectorSize(input->GetNumberOfComponentsPerPixel()); + listSample->SetMeasurementVectorSize(tempImage->GetNumberOfComponentsPerPixel()); // Now we generate the list of samples - if (useMask) + if (IsParameterEnabled("mask")) { + maskShrinkFilter->SetShrinkFactor(shrinkFactor); + maskShrinkFilter->SetInput(mask); + maskShrinkFilter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); + maskShrinkFilter->Update(); + + itMask = itk::ImageRegionConstIterator<FloatVectorImageType>( + maskShrinkFilter->GetOutput(),maskShrinkFilter->GetOutput()->GetLargestPossibleRegion()); + // Remove masked pixels it.GoToBegin(); itMask.GoToBegin(); @@ -265,19 +330,16 @@ private: ++it; ++itMask; } - } - else - { - for(it.GoToBegin(); !it.IsAtEnd(); ++it) + if (listSample->Size() == 0) { - listSample->PushBack(it.Get()); + otbAppLogINFO( << "All pixels were masked, the application assume a wrong mask " + "and include all the image"); } } - // if all pixels were masked, we assume a wrong mask and then include all image - if (listSample->Size() == 0) + // if mask is disable and all pixels were masked + if ((!IsParameterEnabled("mask")) || (listSample->Size() == 0)) { - otbAppLogINFO( << "All pixels were masked, the application assume a wrong mask and include all the image"); for(it.GoToBegin(); !it.IsAtEnd(); ++it) { listSample->PushBack(it.Get()); @@ -294,10 +356,15 @@ private: // And extract the lower and upper quantile typename FloatVectorImageType::PixelType inputMin(nbComp), inputMax(nbComp); + auto histOutput = histogramsGenerator->GetOutput(); + assert(histOutput); + for(unsigned int i = 0; i < nbComp; ++i) { - inputMin[i] = histogramsGenerator->GetOutput()->GetNthElement(i)->Quantile(0, 0.01 * GetParameterFloat("hcp.low")); - inputMax[i] = histogramsGenerator->GetOutput()->GetNthElement(i)->Quantile(0, 1.0 - 0.01 * GetParameterFloat("hcp.high")); + auto && elm = histOutput->GetNthElement(i); + assert(elm); + inputMin[i] = elm->Quantile(0, 0.01 * GetParameterFloat("hcp.low")); + inputMax[i] = elm->Quantile(0, 1.0 - 0.01 * GetParameterFloat("hcp.high")); } otbAppLogDEBUG( << std::setprecision(5) << "Min/Max computation done : min=" << inputMin @@ -313,15 +380,99 @@ private: } m_TmpFilter = rescaler; - castIm = rescaler->GetOutput(); + + SetParameterOutputImage<TImageType>("out", rescaler->GetOutput()); } + } + // Get the bands order + std::vector<int> GetChannels() + { + std::vector<int> channels; + + int nbChan = GetParameterImage("in")->GetNumberOfComponentsPerPixel(); + std::string channelMode = GetParameterString("channels"); - SetParameterOutputImage<TImageType>("out", castIm); + if(channelMode == "grayscale") + { + if (GetParameterInt("channels.grayscale.channel") <= nbChan) + { + channels = {GetParameterInt("channels.grayscale.channel"), + GetParameterInt("channels.grayscale.channel"), + GetParameterInt("channels.grayscale.channel")}; + } + else + { + itkExceptionMacro(<< "The channel has an invalid index"); + } + } + else if (channelMode == "rgb") + { + if ((GetParameterInt("channels.rgb.red") <= nbChan) + && ( GetParameterInt("channels.rgb.green") <= nbChan) + && ( GetParameterInt("channels.rgb.blue") <= nbChan)) + { + channels = {GetParameterInt("channels.rgb.red"), + GetParameterInt("channels.rgb.green"), + GetParameterInt("channels.rgb.blue")}; + } + else + { + itkExceptionMacro(<< "At least one needed channel has an invalid index"); + } + } + else if (channelMode == "all") + { + // take all bands + channels.resize(nbChan); + std::iota(channels.begin(), channels.end(), 1); + } + return channels; + } + + // return an image with the bands order modified of the input image + template<class TImageType> + typename TImageType::Pointer GetSelectedChannels() + { + typedef MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType, + typename TImageType::InternalPixelType> ExtractROIFilterType; + typedef ObjectList<ExtractROIFilterType> ExtractROIFilterListType; + typedef otb::ImageList<otb::Image<typename TImageType::InternalPixelType> > ImageListType; + typedef ImageListToVectorImageFilter<ImageListType, + TImageType > ListConcatenerFilterType; + + typename ImageListType::Pointer imageList; + typename ListConcatenerFilterType::Pointer concatener; + typename ExtractROIFilterListType::Pointer extractorList; + + imageList = ImageListType::New(); + concatener = ListConcatenerFilterType::New(); + extractorList = ExtractROIFilterListType::New(); + + const bool monoChannel = IsParameterEnabled("channels.grayscale"); + + // get band order + std::vector<int> channels = GetChannels(); + + for (auto && channel : channels) + { + typename ExtractROIFilterType::Pointer extractROIFilter = ExtractROIFilterType::New(); + extractROIFilter->SetInput(GetParameterImage("in")); + if (!monoChannel) extractROIFilter->SetChannel(channel); + extractROIFilter->UpdateOutputInformation(); + extractorList->PushBack(extractROIFilter); + imageList->PushBack(extractROIFilter->GetOutput()); + } + + concatener->SetInput(imageList); + concatener->UpdateOutputInformation(); + concatener->Update(); + + return concatener->GetOutput(); } - void DoExecute() ITK_OVERRIDE + void DoExecute() ITK_OVERRIDE { switch ( this->GetParameterOutputImagePixelType("out") ) { diff --git a/Modules/Applications/AppImageUtils/test/CMakeLists.txt b/Modules/Applications/AppImageUtils/test/CMakeLists.txt index 1117d032186bd937d516522ce449924bdc63e8f2..f3f1eb67b3b2ce9721c769f060bfa42149839207 100644 --- a/Modules/Applications/AppImageUtils/test/CMakeLists.txt +++ b/Modules/Applications/AppImageUtils/test/CMakeLists.txt @@ -34,7 +34,7 @@ otb_test_application(NAME apTuUtDownloadSRTMTiles otb_test_application(NAME apTvUtConvertBasic APP Convert OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif - -out ${TEMP}/apTvUtConvertBasicOutput.tif + -out ${TEMP}/apTvUtConvertBasicOutput.tif float VALID --compare-image ${NOTOL} ${INPUTDATA}/apTvUtConvertBasicOutput.tif ${TEMP}/apTvUtConvertBasicOutput.tif @@ -49,7 +49,7 @@ otb_test_application(NAME apTuUtConvertExtendedFilename_writer otb_test_application(NAME apTvUtConvertWithScaling APP Convert OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif - -out ${TEMP}/apTvUtConvertWithScalingOutput.tif uint8 + -out ${TEMP}/apTvUtConvertWithScalingOutput.tif -type linear VALID --compare-image ${NOTOL} ${INPUTDATA}/apTvUtConvertWithScalingOutput.tif @@ -64,6 +64,28 @@ otb_test_application(NAME apTvUtConvertExtendedFilename_readerGEOM ${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom ${TEMP}/apTvUtGeomExtendedFilename.geom) +otb_test_application(NAME apTvUtConvertSelectChannels + APP Convert + OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif + -out ${TEMP}/apTvUtConvertSelectChannelsRgbOutput.tif + -channels rgb + -channels.rgb.red 2 + -channels.rgb.green 3 + -channels.rgb.blue 1 + -type linear + VALID --compare-image ${NOTOL} + ${INPUTDATA}/apTvUtConvertSelectChannelsRgbOutput.tif + ${TEMP}/apTvUtConvertSelectChannelsRgbOutput.tif) + +otb_test_application(NAME apTvUtConvertMonoChannel + APP Convert + OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif + -out ${TEMP}/apTvUtConvertMonoChannelOutput.tif + -channels grayscale + -type linear + VALID --compare-image ${NOTOL} + ${INPUTDATA}/apTvUtConvertMonoChannelOutput.tif + ${TEMP}/apTvUtConvertMonoChannelOutput.tif) #----------- PixelInfo TESTS ---------------- diff --git a/Modules/Applications/AppProjection/app/otbOrthoRectification.cxx b/Modules/Applications/AppProjection/app/otbOrthoRectification.cxx index 1313e70650cb4748f66d19f59de968dd31bba812..2dc6a6119f70ce75cd81e2483d32392e10933fc6 100644 --- a/Modules/Applications/AppProjection/app/otbOrthoRectification.cxx +++ b/Modules/Applications/AppProjection/app/otbOrthoRectification.cxx @@ -91,7 +91,7 @@ private: { SetName("OrthoRectification"); std::ostringstream oss; - oss << "This application allows ortho-rectification of optical images from supported sensors." << std::endl; + oss << "This application allows ortho-rectification of optical and radar images from supported sensors." << std::endl; SetDescription(oss.str()); // Documentation SetDocName("Ortho-rectification"); @@ -101,7 +101,7 @@ private: oss<<"A Digital Elevation Model can be specified to account for terrain deformations. "<<std::endl; oss<<"In case of SPOT5 images, the sensor model can be approximated by an RPC model in order to speed-up computation."; SetDocLongDescription(oss.str()); - SetDocLimitations("Supported sensors are Pleiades, SPOT5 (TIF format), SPOT6/7, Ikonos, Quickbird, Worldview2, Worldview3, GeoEye, Sentinel1."); + SetDocLimitations("Supported sensors (both optical and radar) are: GeoEye, Ikonos, Pleiades, Quickbird, RadarSat, Sentinel-1, SPOT5 (TIF format), SPOT6/7, TerraSAR-X, Worldview 1/2/3."); SetDocAuthors("OTB-Team"); SetDocSeeAlso("Ortho-rectification chapter from the OTB Software Guide"); diff --git a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx index 1a442a249a7ace0ad8768ec2ecac7be1b077cce8..7fa8822ec670b416ed36e9b7eab478afca57fccb 100644 --- a/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx +++ b/Modules/Learning/Sampling/include/otbPersistentSamplingFilterBase.txx @@ -725,19 +725,22 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage> { tmpLayers.push_back(this->GetInMemoryInput(i)); } - + + const unsigned int nbFeatThread = std::ceil(inLayer.GetFeatureCount(true) / (float) numberOfThreads); + assert(nbFeatThread > 0); + OGRFeatureDefn &layerDefn = inLayer.GetLayerDefn(); ogr::Layer::const_iterator featIt = inLayer.begin(); unsigned int counter=0; + unsigned int cptFeat = 0; for(; featIt!=inLayer.end(); ++featIt) { ogr::Feature dstFeature(layerDefn); dstFeature.SetFrom( *featIt, TRUE ); dstFeature.SetFID(featIt->GetFID()); tmpLayers[counter].CreateFeature( dstFeature ); - counter++; - if (counter >= tmpLayers.size()) - counter = 0; + cptFeat++; + if (cptFeat > nbFeatThread) counter++; cptFeat=0; } inLayer.SetSpatialFilter(ITK_NULLPTR); diff --git a/Modules/Remote/otbGRM.remote.cmake b/Modules/Remote/otbGRM.remote.cmake index c6ac506a316a2b019656563ce6bcaaf728b478b1..383c97da56fe3de3a8ad53ba7fbbf2d7c4c60698 100644 --- a/Modules/Remote/otbGRM.remote.cmake +++ b/Modules/Remote/otbGRM.remote.cmake @@ -11,6 +11,6 @@ to see which format you must respect to add a new criterion. A more detailed description can be found on the project website: http://tully.ups-tlse.fr/lassallep/grm " - GIT_REPOSITORY http://tully.ups-tlse.fr/lassallep/grm.git - GIT_TAG a08d2309bc8d4f4ceaf1dba8bda33aa1e21fc4aa + GIT_REPOSITORY https://github.com/orfeotoolbox/GRM + GIT_TAG c53a61d12b895a85c3909130021988730c309cb7 ) diff --git a/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h b/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h index 7f574d738bd6ba392fc71c9223db745e16132dc9..0e58a1f5d8ee6f56b1477259b2276744685b0203 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h @@ -131,7 +131,7 @@ public: /** */ - void SetGrayscaleActivated( bool activated ); + void SetGrayscaleActivated( bool isGrayscale ); // // QwtPlotPicker methods. diff --git a/Modules/Visualization/MonteverdiGui/src/mvdHistogramPlotPicker.cxx b/Modules/Visualization/MonteverdiGui/src/mvdHistogramPlotPicker.cxx index 9f4bcca63df03bd8ac842f4e17619042bdc22af0..a7f9e3020ea16706dd30ebffc3ba9f1fa87a9b1c 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdHistogramPlotPicker.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdHistogramPlotPicker.cxx @@ -169,9 +169,9 @@ HistogramPlotPicker /*******************************************************************************/ void HistogramPlotPicker -::SetGrayscaleActivated( bool activated ) +::SetGrayscaleActivated( bool isGrayscale ) { - m_IsGrayscaleActivated = activated; + m_IsGrayscaleActivated = isGrayscale; } /*******************************************************************************/ diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 178a8d55608661aa4253607f272cd54b5bddb6ad..120365d510b1fd70784ebba3baa9939de06f4635 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -752,30 +752,31 @@ std::vector<std::string> Application::GetChoiceNames(std::string name) void Application::SetDefaultParameterInt(std::string parameter, int value) { Parameter* param = GetParameterByKey(parameter); + bool hasUserValue = param->HasUserValue(); if (dynamic_cast<RadiusParameter*>(param)) { RadiusParameter* paramRadius = dynamic_cast<RadiusParameter*>(param); paramRadius->SetDefaultValue(value); - paramRadius->SetValue(value); + if (!hasUserValue) paramRadius->SetValue(value); } else if (dynamic_cast<IntParameter*>(param)) { IntParameter* paramInt = dynamic_cast<IntParameter*>(param); paramInt->SetDefaultValue(value); - paramInt->SetValue(value); + if (!hasUserValue) paramInt->SetValue(value); } else if (dynamic_cast<FloatParameter*>(param)) { FloatParameter* paramFloat = dynamic_cast<FloatParameter*>(param); paramFloat->SetDefaultValue(static_cast<float>(value)); - paramFloat->SetValue(static_cast<float>(value)); + if (!hasUserValue) paramFloat->SetValue(static_cast<float>(value)); } else if (dynamic_cast<RAMParameter*>(param)) { RAMParameter* paramRAM = dynamic_cast<RAMParameter*>(param); paramRAM->SetDefaultValue(static_cast<unsigned int>(value)); - paramRAM->SetValue(static_cast<unsigned int>(value)); + if (!hasUserValue) paramRAM->SetValue(static_cast<unsigned int>(value)); } } @@ -787,7 +788,7 @@ void Application::SetDefaultParameterFloat(std::string parameter, float value) { FloatParameter* paramFloat = dynamic_cast<FloatParameter*>(param); paramFloat->SetDefaultValue(value); - paramFloat->SetValue(value); + if (!param->HasUserValue()) paramFloat->SetValue(value); } } diff --git a/Packaging/CMakeLists.txt b/Packaging/CMakeLists.txt index 55dee29e7d807e4ddffe3e60d5a5a85bcdeba706..c7f84df71f56992b37adc50a57eafbc1a7a4997d 100644 --- a/Packaging/CMakeLists.txt +++ b/Packaging/CMakeLists.txt @@ -198,8 +198,7 @@ prepare_search_dirs(PKG_SEARCHDIRS) set(PKG_PEFILES) prepare_file_list(PKG_PEFILES) foreach(pfile ${PKG_PEFILES}) - get_filename_component(pfile_name ${pfile} NAME) - process_file_recurse(${pfile_name}) + process_file_recurse(${pfile}) endforeach() install_include_dirs() diff --git a/Packaging/Files/linux_pkgsetup.in b/Packaging/Files/linux_pkgsetup.in index 6c56a3b976e7a54cb041a244b4f917ff073ef125..198b112a3dab30cf3c2e1639962d7efe09a691f9 100644 --- a/Packaging/Files/linux_pkgsetup.in +++ b/Packaging/Files/linux_pkgsetup.in @@ -32,12 +32,12 @@ PATCH_ELF_EXE="$OUT_DIR/patchelf" #do not move below block. it must be before "unset LD_LIBRARY_PATH" code #check if we have any python bindings -set OTB_PYTHON_LIB_PATH= +OTB_PYTHON_LIB_PATH= if [ -f "$OUT_DIR/lib/python/_otbApplication.so" ] ; then sed -i "s,OUT_DIR,$OUT_DIR,g" "$OUT_DIR/setup_python.sh" chmod +x $OUT_DIR/setup_python.sh . ./setup_python.sh - set OTB_PYTHON_LIB_PATH=$OUT_DIR/lib/python + OTB_PYTHON_LIB_PATH=$OUT_DIR/lib/python fi # No no interference with LD_LIBRARY_PATH diff --git a/Packaging/prepare_file_list.cmake b/Packaging/prepare_file_list.cmake index 4d83bc601da079a89f57d98bda00e54a00b08501..8ba085b74570773bfd99c5a7c067c72b978f63f4 100644 --- a/Packaging/prepare_file_list.cmake +++ b/Packaging/prepare_file_list.cmake @@ -29,22 +29,23 @@ function(prepare_file_list file_list_result) return() endif() - set(file_list "${otbapp_launcher}") - - if(HAVE_QT4) - list(APPEND file_list "otbApplicationLauncherQt${EXE_EXT}") - endif() + # find OTB targets + set(_otb_targets_path + "${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB-${PKG_OTB_VERSION_MAJOR}.${PKG_OTB_VERSION_MINOR}") + file(GLOB _targets_config_files "${_otb_targets_path}/OTBTargets-*.cmake") + set(_IMPORT_PREFIX ${SUPERBUILD_INSTALL_DIR}) + foreach(f ${_targets_config_files}) + file(STRINGS ${f} _f_content REGEX " IMPORTED_LOCATION_[A-Z]+ ") + string(REGEX REPLACE " +IMPORTED_LOCATION_[A-Z]+ \"([^\"]+)\"" "\\1;" _filtered ${_f_content}) + string(CONFIGURE "${_filtered}" _configured) + list(APPEND file_list "${_configured}") + endforeach() - if(HAVE_MVD) - list(APPEND file_list "monteverdi${EXE_EXT}") - list(APPEND file_list "mapla${EXE_EXT}") - endif() - if(HAVE_PYTHON) list(APPEND file_list "_otbApplication${PYMODULE_EXT}") endif() - foreach(exe_file "iceViewer" "otbTestDriver" "SharkVersion") + foreach(exe_file "SharkVersion") if(EXISTS "${SUPERBUILD_INSTALL_DIR}/bin/${exe_file}${EXE_EXT}") list(APPEND file_list "${exe_file}${EXE_EXT}") else() @@ -88,12 +89,7 @@ function(prepare_file_list file_list_result) if(MSVC) list(APPEND file_list "ucrtbase.dll") list(APPEND file_list "proj.dll") - endif() - - set(otb_applications_dir "${SUPERBUILD_INSTALL_DIR}/lib/otb/applications") - file(GLOB OTB_APPS_LIST "${otb_applications_dir}/otbapp_*${LIB_EXT}") # /lib/otb - list(APPEND file_list ${OTB_APPS_LIST}) - + endif() set(${file_list_result} ${file_list} PARENT_SCOPE) endfunction() diff --git a/Packaging/process_file_recurse.cmake b/Packaging/process_file_recurse.cmake index b83616ad864c070e3d3b390b809d20dca00303df..b8f31b4ededfb3faa10d848c5a2e0bbc9f4f7155 100644 --- a/Packaging/process_file_recurse.cmake +++ b/Packaging/process_file_recurse.cmake @@ -19,7 +19,14 @@ # function(process_file_recurse input_file) set(input_file_full_path) - search_library(${input_file} PKG_SEARCHDIRS input_file_full_path) + if(IS_ABSOLUTE "${input_file}" AND EXISTS "${input_file}") + set(input_file_full_path ${input_file}) + if(PKG_DEBUG) + message("Found '${input_file}' (return)") + endif() + else() + search_library(${input_file} PKG_SEARCHDIRS input_file_full_path) + endif() if(NOT input_file_full_path) if(LINUX) setif_value_in_list(is_gtk_lib "${input_file}" ALLOWED_SYSTEM_DLLS) diff --git a/SuperBuild/CMake/External_otb.cmake b/SuperBuild/CMake/External_otb.cmake index 465683a9b48222947d20f7fdf5354dc4d8f6c0ce..6890d46d7163864f57a6934ab2cf438e8074a903 100644 --- a/SuperBuild/CMake/External_otb.cmake +++ b/SuperBuild/CMake/External_otb.cmake @@ -131,7 +131,7 @@ ADD_SUPERBUILD_CMAKE_VAR(OTB Boost_LIBRARY_DIR) set(OTB_MODULES_CONFIG) if(WITH_REMOTE_MODULES) - foreach(remote_module SertitObject Mosaic otbGRM) + foreach(remote_module SertitObject Mosaic otbGRM OTBFFSforGMM) list(APPEND OTB_MODULES_CONFIG -DModule_${remote_module}:BOOL=ON) endforeach() else() diff --git a/SuperBuild/CMake/External_qwt.cmake b/SuperBuild/CMake/External_qwt.cmake index 8c2077615c8667d11a070299b376907263c2909a..3755e3958fa62f91385adf87acfe8a1547faa133 100644 --- a/SuperBuild/CMake/External_qwt.cmake +++ b/SuperBuild/CMake/External_qwt.cmake @@ -62,21 +62,13 @@ ExternalProject_Add(QWT INSTALL_DIR ${SB_INSTALL_PREFIX} DOWNLOAD_DIR ${DOWNLOAD_LOCATION} DEPENDS ${QWT_DEPENDENCIES} -PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/QWT/qwtconfig.pri ${QWT_SB_SRC} - CONFIGURE_COMMAND -${QWT_SB_CONFIGURE_PROGRAM} ${QWT_SB_SRC}/qwt.pro + PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/qwtconfig.pri ${QWT_SB_SRC} + CONFIGURE_COMMAND ${QWT_SB_CONFIGURE_PROGRAM} ${QWT_SB_SRC}/qwt.pro BUILD_COMMAND ${QWT_SB_MAKE_PROGRAM} - INSTALL_COMMAND ${QWT_SB_MAKE_PROGRAM} install INSTALL_ROOT=${SB_INSTALL_PREFIX} + INSTALL_COMMAND ${QWT_SB_MAKE_PROGRAM} install LOG_CONFIGURE 0 LOG_BUILD 0 LOG_INSTALL 0 ) -#SUPERBUILD_PATCH_SOURCE(QWT) - -# set(_SB_QWT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include) -# if(WIN32) -# set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/qwt5.lib) -# elseif(UNIX) -# set(_SB_QWT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libqwt${CMAKE_SHARED_LIBRARY_SUFFIX}) -# endif() +SUPERBUILD_PATCH_SOURCE(QWT) diff --git a/SuperBuild/patches/QWT/qwt-1-releaseBuild-all.diff b/SuperBuild/patches/QWT/qwt-1-releaseBuild-all.diff new file mode 100644 index 0000000000000000000000000000000000000000..3d4f6a55954d6fbeeb3a69ba3d66ac4faa7fd9c5 --- /dev/null +++ b/SuperBuild/patches/QWT/qwt-1-releaseBuild-all.diff @@ -0,0 +1,19 @@ +diff -burN qwt-6.1.3-orig/qwtbuild.pri qwt-6.1.3/qwtbuild.pri +--- qwt-6.1.3-orig/qwtbuild.pri 2017-09-07 15:00:11.755801441 +0200 ++++ qwt-6.1.3/qwtbuild.pri 2017-09-07 15:00:55.812189641 +0200 +@@ -21,14 +21,8 @@ + ###################################################################### + + win32 { +- # On Windows you can't mix release and debug libraries. +- # The designer is built in release mode. If you like to use it +- # you need a release version. For your own application development you +- # might need a debug version. +- # Enable debug_and_release + build_all if you want to build both. + +- CONFIG += debug_and_release +- CONFIG += build_all ++ CONFIG += release + } + else { + diff --git a/SuperBuild/patches/QWT/qwtconfig.pri b/SuperBuild/patches/QWT/qwtconfig.pri index 42035eb5b2604189188f1d7b6a35ccc433ee9c93..576a27cdacf5d37260b3a03f04c65816755d6daf 100644 --- a/SuperBuild/patches/QWT/qwtconfig.pri +++ b/SuperBuild/patches/QWT/qwtconfig.pri @@ -16,18 +16,7 @@ QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT} # Install paths ###################################################################### -#QWT_INSTALL_PREFIX = . - -unix { - #QWT_INSTALL_PREFIX = @SB_INSTALL_PREFIX@ - # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION -} - -win32 { - # QWT_INSTALL_PREFIX = @SB_INSTALL_PREFIX@ - # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION -} - +QWT_INSTALL_PREFIX = @SB_INSTALL_PREFIX@ QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib @@ -93,7 +82,7 @@ QWT_CONFIG += QwtWidgets # export a plot to a SVG document ###################################################################### -QWT_CONFIG += QwtSvg +#QWT_CONFIG += QwtSvg ###################################################################### # If you want to use a OpenGL plot canvas @@ -118,7 +107,7 @@ QWT_CONFIG += QwtOpenGL # Otherwise you have to build it from the designer directory. ###################################################################### -QWT_CONFIG += QwtDesigner +#QWT_CONFIG += QwtDesigner ###################################################################### # Compile all Qwt classes into the designer plugin instead @@ -161,7 +150,7 @@ win32 { macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { - QWT_CONFIG += QwtFramework +# QWT_CONFIG += QwtFramework } ######################################################################