diff --git a/.mailmap b/.mailmap index 646d37da8900afc1a51623aca02a5ae49b2a3ba0..457ea78798706975877fe2a5ec69e1b4017264ba 100644 --- a/.mailmap +++ b/.mailmap @@ -48,6 +48,7 @@ Jonathan Guinet Jordi Inglada Jordi Inglada Jordi Inglada Jordi Inglada Jordi Inglada +Julie Brossard Julien Malik Julien Malik Julien Malik Julien Malik Julien Malik @@ -57,7 +58,9 @@ Julien Michel Julien Michel Julien Osman Laurențiu Nicola Laurentiu Nicola Laurențiu Nicola Laurențiu Nicola -Luc Hermitte Luc Hermitte +Luc Hermitte +Luc Hermitte Luc Hermitte +Luc Hermitte Luc Hermitte Ludovic Hussonnois Manuel Grizonnet Manuel Grizonnet Grizonnet Manuel diff --git a/CMake/GetVersionFromGitTag.cmake b/CMake/GetVersionFromGitTag.cmake new file mode 100644 index 0000000000000000000000000000000000000000..331635c2bdacd5c0661082a7e23ace31371c9db0 --- /dev/null +++ b/CMake/GetVersionFromGitTag.cmake @@ -0,0 +1,106 @@ +# +# This cmake module sets the project version and partial version +# variables by analysing the git tag and commit history. It expects git +# tags defined with semantic versioning 2.0.0 (http://semver.org/). +# +# The module expects the PROJECT_NAME variable to be set, and recognizes +# the GIT_FOUND, GIT_EXECUTABLE and VERSION_UPDATE_FROM_GIT variables. +# If Git is found and VERSION_UPDATE_FROM_GIT is set to boolean TRUE, +# the project version will be updated using information fetched from the +# most recent git tag and commit. Otherwise, the module will try to read +# a VERSION file containing the full and partial versions. The module +# will update this file each time the project version is updated. +# +# Once done, this module will define the following variables: +# +# ${PROJECT_NAME}_VERSION_STRING - Version string without metadata +# such as "v2.0.0" or "v1.2.41-beta.1". This should correspond to the +# most recent git tag. +# ${PROJECT_NAME}_VERSION_STRING_FULL - Version string with metadata +# such as "v2.0.0+3.a23fbc" or "v1.3.1-alpha.2+4.9c4fd1" +# ${PROJECT_NAME}_VERSION - Same as ${PROJECT_NAME}_VERSION_STRING, +# without the preceding 'v', e.g. "2.0.0" or "1.2.41-beta.1" +# ${PROJECT_NAME}_VERSION_MAJOR - Major version integer (e.g. 2 in v2.3.1-RC.2+21.ef12c8) +# ${PROJECT_NAME}_VERSION_MINOR - Minor version integer (e.g. 3 in v2.3.1-RC.2+21.ef12c8) +# ${PROJECT_NAME}_VERSION_PATCH - Patch version integer (e.g. 1 in v2.3.1-RC.2+21.ef12c8) +# ${PROJECT_NAME}_VERSION_TWEAK - Tweak version string (e.g. "RC.2" in v2.3.1-RC.2+21.ef12c8) +# ${PROJECT_NAME}_VERSION_AHEAD - How many commits ahead of last tag (e.g. 21 in v2.3.1-RC.2+21.ef12c8) +# ${PROJECT_NAME}_VERSION_GIT_SHA - The git sha1 of the most recent commit (e.g. the "ef12c8" in v2.3.1-RC.2+21.ef12c8) +# +# This module is public domain, use it as it fits you best. +# +# Author: Nuno Fachada + + +function(get_package_name root_repo_dir project_version_string) + + if(EXISTS "${root_repo_dir}/.git") + find_package(Git) + if(NOT GIT_FOUND) + message(ERROR "git not found. Make sure git can be found in your PATH") + return() + endif() + + message(STATUS "PROJECT_NAME: ${PROJECT_NAME}") + message(STATUS "VERSION MINOR: ${${PROJECT_NAME}_VERSION_MAJOR}") + message(STATUS "VERSION MAJOR: ${${PROJECT_NAME}_VERSION_MINOR}") + message(STATUS "VERSION PATCH: ${${PROJECT_NAME}_VERSION_PATCH}") + + + if(DEFINED ENV{CI_COMMIT_REF_NAME}) + set(branch_name "$ENV{CI_COMMIT_REF_NAME}") + else() + execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q HEAD + WORKING_DIRECTORY ${root_repo_dir} + OUTPUT_VARIABLE git_symbolic_ref_output + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + + set(branch_name) + if(git_symbolic_ref_output) + get_filename_component(branch_name ${git_symbolic_ref_output} NAME) + endif() + endif() + + message(STATUS "branch_name: ${branch_name}") + + if("${branch_name}" MATCHES "^release-[0-9]+\\.[0-9]+\$") + + set(${project_version_string} "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}" PARENT_SCOPE) + + else() + if(DEFINED ENV{CI_COMMIT_SHORT_SHA}) + set(${project_version_string} "${branch_name}-$ENV{CI_COMMIT_SHORT_SHA}" PARENT_SCOPE) + else() + execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE ${PROJECT_NAME}_COMMIT_SHA_STRING + OUTPUT_STRIP_TRAILING_WHITESPACE) + set(${project_version_string} "${branch_name}-${${PROJECT_NAME}_COMMIT_SHA_STRING}" PARENT_SCOPE) + endif() + + endif() + + else() + + # Standalone source directory, get version from RELEASE_NOTE file + file(STRINGS ${root_repo_dir}/RELEASE_NOTES.txt RN_FIRSTLINE LIMIT_COUNT 1) + message(STATUS "${RN_FIRSTLINE}") + string(REPLACE " " ";" RN_FIRSTLINE_LIST ${RN_FIRSTLINE}) + list(GET RN_FIRSTLINE_LIST 1 PROJECT_VERSION_STRING) + message(STATUS ${PROJECT_VERSION_STRING}) + + # Get partial versions into a list + string(REGEX MATCHALL "-.*$|[0-9]+" PARTIAL_VERSION_LIST + ${PROJECT_VERSION_STRING}) + + list(GET PARTIAL_VERSION_LIST 0 _VERSION_MAJOR) + list(GET PARTIAL_VERSION_LIST 1 _VERSION_MINOR) + list(GET PARTIAL_VERSION_LIST 2 _VERSION_PATCH) + + message(STATUS "M: ${_VERSION_MAJOR}, m: ${_VERSION_MINOR}, p: ${_VERSION_PATCH}") + + set(${project_version_string} "${PROJECT_VERSION_STRING}" PARENT_SCOPE) + + endif() + +endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt index 570bee7cfffc4d9d0b8912002f60c5864ee7934a..6f22f7521826131ddb2ccef8f109908c971e6eb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ mark_as_advanced(OTB_APPLICATIONS_NAME_LIST) set(OTB_CMAKE_DIR ${OTB_SOURCE_DIR}/CMake) set(CMAKE_MODULE_PATH ${OTB_CMAKE_DIR} ${CMAKE_MODULE_PATH}) include(SourceStatus) +include(GetVersionFromGitTag) include(PreventInSourceBuilds) include(PreventInBuildInstalls) include(OTBModuleMacros) @@ -132,10 +133,15 @@ set(main_project_name ${_OTBModuleMacros_DEFAULT_LABEL}) #----------------------------------------------------------------------------- # OTB version number. set(OTB_VERSION_MAJOR "7") -set(OTB_VERSION_MINOR "1") +set(OTB_VERSION_MINOR "2") set(OTB_VERSION_PATCH "0") set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}") +get_package_name(${OTB_SOURCE_DIR} OTB_VERSION_STRING2) + +message(STATUS "## ${OTB_VERSION_STRING2} ##") + + # Monteverdi version number (follows OTB) set( Monteverdi_VERSION_MAJOR ${OTB_VERSION_MAJOR} ) set( Monteverdi_VERSION_MINOR ${OTB_VERSION_MINOR} ) diff --git a/Documentation/Cookbook/CMakeLists.txt b/Documentation/Cookbook/CMakeLists.txt index edfb6a76fdd03b69532421fe5c0153b35314dd71..ae504c79938f74817bf2e1925dfd44f15ce37f53 100644 --- a/Documentation/Cookbook/CMakeLists.txt +++ b/Documentation/Cookbook/CMakeLists.txt @@ -151,7 +151,7 @@ add_custom_target(CookBookArchive ALL COMMAND ${TAR_COMMAND} --transform "s/^html/CookBook-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}/" - -czf ${CMAKE_BINARY_DIR}/CookBook-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}-html.tar.gz html + -czf ${CMAKE_BINARY_DIR}/CookBook-${OTB_VERSION_STRING2}-html.tar.gz html WORKING_DIRECTORY ${RST_BUILD_DIR} DEPENDS CookBookHTML COMMENT "Creating archive for html CookBook") diff --git a/Documentation/Cookbook/rst/Monteverdi.rst b/Documentation/Cookbook/rst/Monteverdi.rst index ac362cc2822f7925b3a21159cd8c43958cc194f7..f2ca1637aadf30fc481bcbcd5c33d53bd5ad5cf5 100644 --- a/Documentation/Cookbook/rst/Monteverdi.rst +++ b/Documentation/Cookbook/rst/Monteverdi.rst @@ -124,12 +124,19 @@ The dock on the right side is divided into four tabs: will be shortcut before being rescaled to 0-255: either by setting the extremal values, or by setting the extremal quantiles. -Each tab is represented by the figures below ( [fig:quickhisto] - [fig:colorsetdyn]). +Each tab is represented by the figures below ( [:numref:`quickhisto`] + [:numref:`colsetdyn`]). +.. _quickhisto: .. figure:: Art/MonteverdiImages/quickhisto.png + +:numref:`quickhisto`: The quicklook and histogram tabs. + +.. _colsetdyn: .. figure:: Art/MonteverdiImages/colsetdyn.png +:numref:`colsetdyn`: The color Setup and color dynamics tabs. + Layer stack ~~~~~~~~~~~ @@ -161,24 +168,30 @@ Concerning the six icons, from left to right: - 6th: applies all display settings (color-setup, color-dynamics, shader and so forth) of selected layer to all other layers -The layer stack is represented in the figure below ( [fig:layerstack]): +The layer stack is represented in the figure [:numref:`layerstack`] below: +.. _layerstack: .. figure:: Art/MonteverdiImages/layerstack.png +:numref:`layerstack`: The layer stack. + Examples -------- With , it is also possible to interactively load otb-applications and use them to process images. For that purpose, the user just has to load -otb-applications by clicking on the Main menu, File/Load -OTB-Applications (or by simply using the shortcut CTRL+A). The figure -below ( [fig:applications]) represents the otb-applications loading +otb-applications by clicking on the Main menu, View/OTB-Applications browser +(or by simply using the shortcut CTRL+A). The figure +[:numref:`applications`] represents the otb-applications browser window. The applications are arranged in thematic functionalities; the user can also quickly find the wanted application by typing its name in -the dedicated field at the top of the loading window. +the dedicated field at the top of the browser window. +.. _applications: .. figure:: Art/MonteverdiImages/applications.png +:numref:`applications`: The OTB6Applications browser panel. + Optical calibration ~~~~~~~~~~~~~~~~~~~ @@ -196,12 +209,15 @@ the documentation of the application). the image to be calibrated, then some of the fields will be automatically filled in. -In the figure below ( [fig:OC]), by taking a look at the layer stack, +In the figure [:numref:`OC`] below, by taking a look at the layer stack, one can notice that the values of the calibrated image are now expressed in spectral radiance. +.. _OC: .. figure:: Art/MonteverdiImages/OC.png +:numref:`OC`: The layer stack with values expressed in spectral radiance. + BandMath ~~~~~~~~ @@ -210,48 +226,60 @@ 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 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 +figure [:numref:`BM`] below, 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 approximately 1000 times further away (the cursors aren’t placed exactly at the same position in the screenshots). +.. _BM: .. figure:: Art/MonteverdiImages/BM.png +:numref:`BM`: Comparision of histograms before and after applying BandMath. + Segmentation ~~~~~~~~~~~~ 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 +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 -following figure ( [fig:seg12]) shows the original image and the labels +figure [:numref:`seg12`] shows the original image and the labels image. +.. _seg12: .. figure:: Art/MonteverdiImages/seg1-2.png +:numref:`seg12`: The original image and the corresponding segmented image. + Gray colors aren’t very convenient for visualizing a segmentation. That’s why we are going to use another application, the ColorMapping one (launch it with the shortcut CTRL+A as usual). There are many ways to use this application (see the documentation for more details). We wish we could colour the segmentation so that color difference between adjacent regions is maximized. For this purpose, we can use the method -optimal (set the value of this option to optimal). The figure below -( [fig:seg3]) shows the result of such colorization. +optimal (set the value of this option to optimal). The figure [:numref:`seg3`] +shows the result of such colorization. +.. _seg3: .. figure:: Art/MonteverdiImages/seg3.png +:numref:`seg3`: Colorized segmentation. + Now it should be nice to superimpose this colorization with the original -image to assess the quality of the segmentation. provides the user a -very simple way to do it. Once the two images are loaded in and that the -original image is placed on the top of the stack, the user just has to -select the translucency layer effect and set the size of the exploration -circle to convenience. The figure below ( [fig:seg4]) shows the result +image to assess the quality of the segmentation. The local transparence effect +provides the user a very simple way to do it. Once the two images are loaded in +and that the original image is placed on the top of the stack, the user just has +to select the translucency layer effect and set the size of the exploration +circle to convenience. The figure [:numref:`seg4`] shows the result of such colorization. We encourage the reader to test the other layer effects. +.. _seg4: .. figure:: Art/MonteverdiImages/seg4.png +:numref:`seg4`: Superimposition of the original image with the colorized label image. + Polarimetry ~~~~~~~~~~~ @@ -285,38 +313,53 @@ In this example, we are going to use three applications: H ranges from 0 to 1. Generally speaking, the histogram of can also be used for this purpose). -In the figure below ( [fig:pol1]), we show the obtained result, with the +In the figure [:numref:`pol1`], we show the obtained result, with the local contrast layer effect. +.. _pol1: .. figure:: Art/MonteverdiImages/pol1.png +:numref:`pol1`: Result of the SARDecompositions > SplitImage > ColorMapping pipeline. + Pansharpening ~~~~~~~~~~~~~ Finally, let’s try a last example with the Pansharpening application (launch it with shortcut CTRL+A). The fields are quite easy to fill in: this application needs a panchromatic image, a XS image, and an output -image. These images are represented in the figures below ( [fig:ps12] -and  [fig:ps3]): +image. These images are represented in the figures [:numref:`ps12`] +and [:numref:`ps3`]: +.. _ps12: .. figure:: Art/MonteverdiImages/ps1-2.png +:numref:`ps12`: Original panchromatic and XS images. + +.. _ps3: .. figure:: Art/MonteverdiImages/ps3.png +:numref:`ps3`: Result of the pansharpening. + Now, in order to inspect the result properly, these three images are loaded in . The pansharpened image is placed to the top of the stack layer, and different layer effects are applied to it: -- in figure  [fig:ps4]: chessboard effect, to compare the result with +- in the figure [:numref:`ps4`]: chessboard effect, to compare the result with the XS image. -- in figure  [fig:ps5]: translucency effect, to compare the result +- in the figure [:numref:`ps5`]: translucency effect, to compare the result with the panchromatic image. +.. _ps4: .. figure:: Art/MonteverdiImages/ps4.png +:numref:`ps4`: Chessboard effect. + +.. _ps5: .. figure:: Art/MonteverdiImages/ps5.png +:numref:`ps5`: Translucency effect. + Conclusion ~~~~~~~~~~ diff --git a/Documentation/Cookbook/rst/conf.py.in b/Documentation/Cookbook/rst/conf.py.in index 01086619f20ea6ed59616ccffd4919553a3e5dce..a72cbb47c5154be2c64d23b3c5c7e1013b3dff3d 100644 --- a/Documentation/Cookbook/rst/conf.py.in +++ b/Documentation/Cookbook/rst/conf.py.in @@ -204,7 +204,8 @@ html_show_copyright = True # Output file base name for HTML help builder. htmlhelp_basename = 'OTBCookBookdoc' - +# Activate numbering figures +numfig = True # -- Options for manual page output --------------------------------------- diff --git a/Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h b/Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h index e170b7d92cc43dfcdb721d3371505da1a1574176..6fa3d81f69b390ad2bfc5ab35a1dd3a5ffb54524 100644 --- a/Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h +++ b/Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h @@ -158,7 +158,7 @@ private: void operator=(const ImageRegionAdaptativeSplitter&) = delete; // This reflects the input image tiling - SizeType m_TileHint; + SizeType m_TileHint{0,0}; // This contains the ImageRegion that is currently being split RegionType m_ImageRegion; diff --git a/Modules/Core/Transform/include/otbImageToGenericRSOutputParameters.h b/Modules/Core/Transform/include/otbImageToGenericRSOutputParameters.h index e1d73b7311b6eacabb19c77e4ddd6ee0d1797b1c..9a8ea947b0a7dca09aefa2bd2afa649ca3ee9d17 100644 --- a/Modules/Core/Transform/include/otbImageToGenericRSOutputParameters.h +++ b/Modules/Core/Transform/include/otbImageToGenericRSOutputParameters.h @@ -180,9 +180,9 @@ private: void EstimateOutputOrigin(); typename ImageType::ConstPointer m_Input; - PointType m_OutputOrigin; - SpacingType m_OutputSpacing; - SizeType m_OutputSize; + PointType m_OutputOrigin{0.0}; + SpacingType m_OutputSpacing{0.0}; + SizeType m_OutputSize{0,0}; OutputImageExtentType m_OutputExtent; GenericRSTransformPointerType m_Transform; diff --git a/Modules/Filtering/Contrast/include/otbApplyGainFilter.h b/Modules/Filtering/Contrast/include/otbApplyGainFilter.h index d50896bd2a3773d1c551a3989726e68ca1a80ae2..3f47473c721730c739a3b8d0701c7fe712e54c1f 100644 --- a/Modules/Filtering/Contrast/include/otbApplyGainFilter.h +++ b/Modules/Filtering/Contrast/include/otbApplyGainFilter.h @@ -127,8 +127,8 @@ private: bool m_NoDataFlag; bool m_ThumbSizeFromSpacing; double m_Step; - typename LutType::SizeType m_LutSize; - typename InputImageType::SizeType m_ThumbSize; + typename LutType::SizeType m_LutSize{0,0}; + typename InputImageType::SizeType m_ThumbSize{0,0}; }; } // End namespace otb diff --git a/Modules/Filtering/Contrast/include/otbCLHistogramEqualizationFilter.h b/Modules/Filtering/Contrast/include/otbCLHistogramEqualizationFilter.h index 828881b42fd643fbc841aa447b7d283235b09cce..de693340f5e882097fb0c76a9a48ca92c48c4510 100644 --- a/Modules/Filtering/Contrast/include/otbCLHistogramEqualizationFilter.h +++ b/Modules/Filtering/Contrast/include/otbCLHistogramEqualizationFilter.h @@ -167,7 +167,7 @@ private: typename BufferFilter::Pointer m_BufferFilter; InputPixelType m_Min, m_Max, m_NoData; unsigned long m_NbBin; - typename InputImageType::SizeType m_ThumbSize; + typename InputImageType::SizeType m_ThumbSize{0,0}; double m_Threshold; bool m_NoDataFlag; }; diff --git a/Modules/Filtering/Contrast/include/otbComputeHistoFilter.h b/Modules/Filtering/Contrast/include/otbComputeHistoFilter.h index bf871878134927e6f0b051f40317ce802809f476..2aad4da50c343edec48571b3c0dbd4c5ba7ff1c0 100644 --- a/Modules/Filtering/Contrast/include/otbComputeHistoFilter.h +++ b/Modules/Filtering/Contrast/include/otbComputeHistoFilter.h @@ -135,7 +135,7 @@ private: InputPixelType m_Min; InputPixelType m_Max; InputPixelType m_NoData; - SizeType m_ThumbSize; + SizeType m_ThumbSize{0,0}; bool m_NoDataFlag; double m_Step; float m_Threshold; diff --git a/Modules/Filtering/DEM/include/otbDEMToImageGenerator.h b/Modules/Filtering/DEM/include/otbDEMToImageGenerator.h index 695e25f14e6983bd15353f70bfa6590e0affa172..bf77133120454dbbe3d51723fa68fdcf3b2c2980 100644 --- a/Modules/Filtering/DEM/include/otbDEMToImageGenerator.h +++ b/Modules/Filtering/DEM/include/otbDEMToImageGenerator.h @@ -186,9 +186,9 @@ protected: void GenerateOutputInformation() override; DEMHandlerType::Pointer m_DEMHandler; - PointType m_OutputOrigin; - SpacingType m_OutputSpacing; - SizeType m_OutputSize; + PointType m_OutputOrigin{0.0}; + SpacingType m_OutputSpacing{0.0}; + SizeType m_OutputSize{0,0}; PixelType m_DefaultUnknownValue; bool m_AboveEllipsoid; diff --git a/Modules/Filtering/Smoothing/include/otbFastNLMeansImageFilter.h b/Modules/Filtering/Smoothing/include/otbFastNLMeansImageFilter.h index 09d5d1c2f8e503edfb94e65bac885e9245b81e1e..60b161d6f883aeff81078fb129643c7e5bde507d 100644 --- a/Modules/Filtering/Smoothing/include/otbFastNLMeansImageFilter.h +++ b/Modules/Filtering/Smoothing/include/otbFastNLMeansImageFilter.h @@ -146,8 +146,8 @@ private: ) const; // Define class attributes - InSizeType m_HalfSearchSize; - InSizeType m_HalfPatchSize; + InSizeType m_HalfSearchSize{0,0}; + InSizeType m_HalfPatchSize{0,0}; float m_Var; float m_CutoffDistance; float m_NormalizeDistance; // cutoff**2 * windowSize**2 diff --git a/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.h b/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.h index 7b388dbcdd44f9bf4bcd08514e310ab3404f728c..2d7adf2b06546f15b5fff18406e05d02eba07df4 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.h +++ b/Modules/Filtering/Statistics/include/otbListSampleToHistogramListGenerator.h @@ -158,7 +158,7 @@ protected: private: // ListSampleConstPointerType m_List; - HistogramSizeType m_Size; + HistogramSizeType m_Size{0,0}; float m_MarginalScale; MeasurementVectorType m_HistogramMin; MeasurementVectorType m_HistogramMax; diff --git a/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.h b/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.h index 7707e3dfdec0f78eaa2f213bc1cafa0ed26776c1..77c9d1f1885177b4cfe2ec141c4d1f4b180d7c36 100644 --- a/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.h +++ b/Modules/Filtering/Statistics/include/otbListSampleToVariableDimensionHistogramGenerator.h @@ -120,7 +120,7 @@ protected: using Superclass::MakeOutput; private: - HistogramSizeType m_Sizes; + HistogramSizeType m_Sizes{0,0}; float m_MarginalScale; MeasurementVectorType m_HistogramMin; MeasurementVectorType m_HistogramMax; diff --git a/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h b/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h index 27d430829af8858160addfbbf6e078a64c468c59..86e7ed2ac2e628f4e6a90abf55fae7bf85e78359 100644 --- a/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h +++ b/Modules/Learning/DimensionalityReductionLearning/include/otbSOMModel.h @@ -112,7 +112,7 @@ private: virtual TargetSampleType DoPredict(const InputSampleType& input, ConfidenceValueType* quality = nullptr, ProbaSampleType* proba = nullptr) const override; /** Map size (width, height) */ - SizeType m_MapSize; + SizeType m_MapSize{0,0}; /** Number of iterations */ unsigned int m_NumberOfIterations; /** Initial learning coefficient */ @@ -120,7 +120,7 @@ private: /** Final learning coefficient */ double m_BetaEnd; /** Initial neighborhood size */ - SizeType m_NeighborhoodSizeInit; + SizeType m_NeighborhoodSizeInit{0,0}; /** Minimum initial neuron weights */ InputValueType m_MinWeight; /** Maximum initial neuron weights */ diff --git a/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.h b/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.h index fda4b4fb3834ed24c9f310772e2d59cad6b1819f..20844dfdcd6a5ba656221819ba272aa4d1ecbc86 100644 --- a/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.h +++ b/Modules/Registration/Stereo/include/otbMulti3DMapToDEMFilter.h @@ -296,10 +296,10 @@ private: double m_ElevationMax; - SizeType m_OutputSize; + SizeType m_OutputSize{0,0}; IndexType m_OutputStartIndex; - SpacingType m_OutputSpacing; - OriginType m_OutputOrigin; + SpacingType m_OutputSpacing{0.0}; + OriginType m_OutputOrigin{0.0}; SizeType m_Margin; diff --git a/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRDataFilter.h b/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRDataFilter.h index 88d79d6d2e2684e3f3483f9342d6195503b460bd..9f5dc502694fbeca1035f5ad5e56d4a9fa4f4613 100644 --- a/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRDataFilter.h +++ b/Modules/Segmentation/Conversion/include/otbPersistentImageToOGRDataFilter.h @@ -152,7 +152,7 @@ private: std::string m_FieldName; std::string m_LayerName; OGRwkbGeometryType m_GeometryType; - SizeType m_StreamSize; + SizeType m_StreamSize{0,0}; std::vector m_OGRLayerCreationOptions; OGRFieldType m_FieldType; diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h index 2622b0d0e36aed8da92c9d05abd61ce912e31b57..1306c6102fdb4d88b2ccc46522b1f377570e59a9 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelImageFilter.h @@ -185,9 +185,9 @@ private: // Output params std::string m_OutputProjectionRef; - OutputSpacingType m_OutputSpacing; - OutputOriginType m_OutputOrigin; - OutputSizeType m_OutputSize; + OutputSpacingType m_OutputSpacing{0.0}; + OutputOriginType m_OutputOrigin{0.0}; + OutputSizeType m_OutputSize{0,0}; OutputIndexType m_OutputStartIndex; }; // end of class VectorDataToLabelImageFilter diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapFilter.h b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapFilter.h index 2562896ad3d17be3715444a96df3d4d5d2cf22f2..7834cd8f09a83517cb915d8b8424474527eeb213 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapFilter.h +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapFilter.h @@ -195,9 +195,9 @@ private: LabelType m_lab; // TODO donc need this attribute now compute with VectorDataProperties - SpacingType m_Spacing; - OriginType m_Origin; - SizeType m_Size; + SpacingType m_Spacing{0.0}; + OriginType m_Origin{0.0}; + SizeType m_Size{0,0}; IndexType m_StartIndex; DirectionType m_Direction; diff --git a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.h b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.h index 4f1a0d5ca49e4b977d074f5ba3be04d98ebcb79d..7b73c4a091ba723b2d0f10b7e92e07a08a527a74 100644 --- a/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.h +++ b/Modules/Segmentation/Conversion/include/otbVectorDataToLabelMapWithAttributesFilter.h @@ -228,9 +228,9 @@ private: // TODO don't need this attributes now compute with VectorDataProperties - SpacingType m_Spacing; - OriginType m_Origin; - SizeType m_Size; + SpacingType m_Spacing{0.0}; + OriginType m_Origin{0.0}; + SizeType m_Size{0,0}; IndexType m_StartIndex; DirectionType m_Direction; diff --git a/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.h b/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.h index 94e190241ff1d036fe8c4d6014e0cd83bb59f158..3ee702b7920d220b0728e76d2b30e92e7c0ebbdb 100644 --- a/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.h +++ b/Modules/Segmentation/OGRProcessing/include/otbOGRLayerStreamStitchingFilter.h @@ -145,7 +145,7 @@ private: OGRLayerStreamStitchingFilter(const Self&) = delete; void operator=(const Self&) = delete; - SizeType m_StreamSize; + SizeType m_StreamSize{0,0}; unsigned int m_Radius; OGRLayerType m_OGRLayer; }; diff --git a/PSC.md b/PSC.md index 8e8d4d516bc722ebc91f9033742d26ddf9cff3bf..12a8b7f3c0b06c2506dfac0009a70ea607fdc27c 100644 --- a/PSC.md +++ b/PSC.md @@ -210,16 +210,16 @@ In March 2015, CNES nominated 3 persons deeply involved in OTB as initial PSC members. They are responsible for defining PSC rules and establishing a fully functioning PSC. PSC has now 4 members. -**Name** | **Affiliation** | **Email** | **Role** | -----------------------------|------------------|----------------------------------|--------------------------------------------| -Agustin Lobo | ICTJA-CSIC | Agustin DOT Lobo AT ictja.csic.es| User perspective, documentation | -Julien Radoux | UCLouvain | jradoux AT hotmail DOT com | User perpsective, documentation | -Rémi Cresson | IRSTEA | cresson.r AT gmail DOT com | Release Manager for release 5.2 | -Guillaume Pasero | CS-SI | guillaume.pasero AT c-s DOT fr | release planner | -Julien Michel | CNES | julien.michel AT cnes DOT fr | Communication, contributions | -Victor Poughon | CNES | victor.poughon AT cnes DOT fr | User support and documentation, roadmaps | -Jordi Inglada (resigned) | CNES/CESBIO | jordi.inglada AT cesbio DOT eu | | -Manuel Grizonnet (resigned) | CNES | manuel.grizonnet AT cnes DOT fr | Infrastructure, legal issues | +**Name** | **Affiliation** | **Email** | **Role** | +----------------------------|-------------------|------------------------------------|--------------------------------------------| +Agustin Lobo | ICTJA-CSIC | Agustin DOT Lobo AT ictja.csic.es | User perspective, documentation | +Julien Radoux | UCLouvain | jradoux AT hotmail DOT com | User perpsective, documentation | +Rémi Cresson | INRAE | cresson.r AT gmail DOT com | Release Manager for release 5.2 | +Guillaume Pasero | CS GROUP - France | guillaume.pasero AT csgroup DOT eu | release planner | +Julien Michel | CNES/CESBIO | julien.michel AT cnes DOT fr | Communication, contributions | +Victor Poughon (resigned) | CNES | victor.poughon AT cnes DOT fr | User support and documentation, roadmaps | +Jordi Inglada (resigned) | CNES/CESBIO | jordi.inglada AT cesbio DOT eu | | +Manuel Grizonnet (resigned) | CNES | manuel.grizonnet AT cnes DOT fr | Infrastructure, legal issues | ## Release manager diff --git a/Packaging/CMakeLists.txt b/Packaging/CMakeLists.txt index cd18967e062c41bd7c9e4c8bfda22ff92bff91fe..4a92a0d123aa2bac513e92b2a96308cf8d75563b 100644 --- a/Packaging/CMakeLists.txt +++ b/Packaging/CMakeLists.txt @@ -106,9 +106,15 @@ if(OTB_TARGET_SYSTEM_ARCH_IS_X64) set(PACKAGE_ARCH "64") endif() + +include(${PACKAGE_OTB_SRC_DIR}/CMake/GetVersionFromGitTag.cmake) +get_package_name(${PACKAGE_OTB_SRC_DIR} OTB_VERSION_STRING2) +message(STATUS "OTB_VERSION_STRING2 : ${OTB_VERSION_STRING2}") + + # This directory is important. # We stage/keep files that goes into final package in this directory -set(PKG_STAGE_DIR ${PACKAGE_NAME}-${PKG_OTB_VERSION_STRING}-${PACKAGE_PLATFORM_NAME}${PACKAGE_ARCH}${NAME_SUFFIX}) +set(PKG_STAGE_DIR ${PACKAGE_NAME}-${OTB_VERSION_STRING2}-${PACKAGE_PLATFORM_NAME}${PACKAGE_ARCH}${NAME_SUFFIX}) set(PATCHELF_PROGRAM "${CMAKE_BINARY_DIR}/PATCHELF/src/patchelf/src/patchelf") include(External_patchelf) diff --git a/Packaging/README.md b/Packaging/README.md index df83d58b21e469b8a3723b04c7efc6702ae7c32c..64c292a96373c2f62cff91674544cffe916d2594 100644 --- a/Packaging/README.md +++ b/Packaging/README.md @@ -1 +1,21 @@ -OTB recipes to build standalone binary packages for Windows/Linux/Mac OS X +OTB recipes to build standalone binary packages for Windows/Linux/Mac OS X. + + + +##### Create a binary package + +After compiling you can generate a standalone binary package for OTB-Applications using this command in the Packaging folder: + +``` +cmake -DSUPERBUILD_BINARY_DIR= \ + -DSUPERBUILD_INSTALL_DIR= \ + -DCMAKE_INSTALL_PREFIX=`pwd`/../../install + +make +make install + +``` + +This will create the package OTB-*.run inside the *pwd`/../../install* folder. + + diff --git a/SuperBuild/CMake/External_openssl.cmake b/SuperBuild/CMake/External_openssl.cmake index 6f27644f0a396a31769097eb201c23a9709ebe58..e33bb5d1e22ed8d355337ac511ba9ada20e3d0fd 100644 --- a/SuperBuild/CMake/External_openssl.cmake +++ b/SuperBuild/CMake/External_openssl.cmake @@ -77,6 +77,7 @@ else(UNIX) ${SB_ENV_CONFIGURE_CMD} ${OPENSSL_SB_SRC}/config ${OPENSSL_BUILD_ARCH} "--prefix=${SB_INSTALL_PREFIX}" + "--libdir=lib" shared zlib zlib-dynamic diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 4cb046702a30e156afd15add4d875195a9990d07..79bfc9e3f1658cbdd6ff54db3e88c5d78c574ebc 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -176,7 +176,7 @@ if (BUILD_DOCUMENTATION) add_custom_target(Documentation COMMAND ${CMAKE_COMMAND} -E tar cjf - ${OTB_BINARY_DIR}/Documentation/Doxygen/OTB-Doxygen-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.tar.bz2 + ${OTB_BINARY_DIR}/Documentation/Doxygen/OTB-Doxygen-${OTB_VERSION_STRING2}.tar.bz2 ${OTB_BINARY_DIR}/Documentation/Doxygen/html DEPENDS Documentation-doxygen WORKING_DIRECTORY ${OTB_BINARY_DIR}/Documentation/Doxygen