[otb] 01/05: Imported Upstream version 5.10.1+dfsg
Bas Couwenberg
sebastic at debian.org
Wed Mar 8 19:40:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository otb.
commit c9d6b89eb9c831d24a2d487b9186cc10a085bc70
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Wed Mar 8 18:16:55 2017 +0100
Imported Upstream version 5.10.1+dfsg
---
CMakeLists.txt | 2 +-
.../AppDomainTransform/app/otbDomainTransform.cxx | 8 ++
Modules/IO/TestKernel/include/otbTestMain.h | 1 +
Modules/MPI/MPIConfig/include/otbMPIConfig.h | 5 +
Modules/MPI/MPIConfig/src/otbMPIConfig.cxx | 106 ++++++++++++---------
Modules/Remote/SertitObject.remote.cmake | 2 +-
.../src/otbWrapperApplication.cxx | 29 ++++++
.../src/otbApplicationLauncherCommandLine.cxx | 18 ++--
RELEASE_NOTES.txt | 15 +++
9 files changed, 125 insertions(+), 61 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb6ce64..8646a22 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,7 +87,7 @@ set(main_project_name ${_OTBModuleMacros_DEFAULT_LABEL})
# OTB version number.
set(OTB_VERSION_MAJOR "5")
set(OTB_VERSION_MINOR "10")
-set(OTB_VERSION_PATCH "0")
+set(OTB_VERSION_PATCH "1")
set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
# Monteverdi version number (follows OTB)
diff --git a/Modules/Applications/AppDomainTransform/app/otbDomainTransform.cxx b/Modules/Applications/AppDomainTransform/app/otbDomainTransform.cxx
index 417861f..b7dc4cb 100644
--- a/Modules/Applications/AppDomainTransform/app/otbDomainTransform.cxx
+++ b/Modules/Applications/AppDomainTransform/app/otbDomainTransform.cxx
@@ -27,6 +27,7 @@
#include <itkInverseFFTImageFilter.h>
#include <itkUnaryFunctorImageFilter.h>
#include <itkFFTShiftImageFilter.h>
+#include <itkFFTWGlobalConfiguration.h>
#include "otbComplexToVectorImageCastFilter.h"
@@ -79,6 +80,10 @@ private:
~DomainTransform() ITK_OVERRIDE
{
+ }
+
+ void CleanupFFTWThreads()
+ {
// This is a trick to make sure fftw will cleanup its threads when application
// shared lib is released.
#if defined(ITK_USE_FFTWF)
@@ -364,6 +369,9 @@ private:
SetParameterOutputImage<TOutputImage>("out", invFilter->GetOutput());
}
}
+
+ // at the end, cleanup FFTW Threads
+ CleanupFFTWThreads();
}
template<otb::Wavelet::Wavelet TWaveletOperator>
diff --git a/Modules/IO/TestKernel/include/otbTestMain.h b/Modules/IO/TestKernel/include/otbTestMain.h
index 42f7e89..c30763f 100644
--- a/Modules/IO/TestKernel/include/otbTestMain.h
+++ b/Modules/IO/TestKernel/include/otbTestMain.h
@@ -424,6 +424,7 @@ int main(int ac, char* av[])
std::cout << "------------- End control baseline tests -------------" << std::endl;
#ifdef OTB_USE_MPI
+ otb::MPIConfig::Instance()->terminate();
}
#endif
return result;
diff --git a/Modules/MPI/MPIConfig/include/otbMPIConfig.h b/Modules/MPI/MPIConfig/include/otbMPIConfig.h
index 3b53299..c5bd1ab 100644
--- a/Modules/MPI/MPIConfig/include/otbMPIConfig.h
+++ b/Modules/MPI/MPIConfig/include/otbMPIConfig.h
@@ -53,6 +53,9 @@ public:
/** Initialize MPI Processus */
void Init(int& argc, char** &argv, bool abortOnException = true);
+ /** Shuts down the MPI environment. */
+ void terminate();
+
/** Abort all MPI processus. */
void abort(int errCode);
@@ -85,6 +88,8 @@ private:
bool m_abortOnException;
// Boolean to test if the MPI environment is initialized
bool m_initialized;
+ // Boolean to test if the MPI environment is terminated
+ bool m_terminated;
static Pointer m_Singleton;
};
diff --git a/Modules/MPI/MPIConfig/src/otbMPIConfig.cxx b/Modules/MPI/MPIConfig/src/otbMPIConfig.cxx
index c582dc3..ca967eb 100644
--- a/Modules/MPI/MPIConfig/src/otbMPIConfig.cxx
+++ b/Modules/MPI/MPIConfig/src/otbMPIConfig.cxx
@@ -77,71 +77,83 @@ MPIConfig::Pointer MPIConfig::Instance()
/** CreateInitialize MPI environment */
MPIConfig::MPIConfig()
- : m_MyRank(-1),
+ : m_MyRank(0),
m_NbProcs(0),
m_abortOnException(true),
- m_initialized(false)
+ m_initialized(false),
+ m_terminated(false)
{
}
/** Shuts down the MPI environment. */
MPIConfig::~MPIConfig()
{
- if (m_initialized)
- {
- if (std::uncaught_exception() && m_abortOnException)
- {
- abort(EXIT_FAILURE);
- }
- else
- {
- int finalized;
- OTB_MPI_CHECK_RESULT(MPI_Finalized,(&finalized));
- if (!finalized)
- {
- OTB_MPI_CHECK_RESULT(MPI_Finalize,());
- }
- }
- }
+ terminate();
}
/** Initialize MPI environment */
-void MPIConfig::Init(int& argc, char** &argv, bool abortOnException) {
- // Abort on exception
- m_abortOnException = abortOnException;
- // Initialize
- int initialized;
- OTB_MPI_CHECK_RESULT(MPI_Initialized,(&initialized));
- m_initialized = (initialized == 1);
- if (!m_initialized) {
- OTB_MPI_CHECK_RESULT(MPI_Init, (&argc, &argv));
- m_initialized = true;
- }
- // Get MPI rank
- int irank = 0;
- OTB_MPI_CHECK_RESULT(MPI_Comm_rank, (MPI_COMM_WORLD , &irank));
+void MPIConfig::Init(int &argc, char **&argv, bool abortOnException) {
+ if( !m_terminated )
+ {
+ // Abort on exception
+ m_abortOnException = abortOnException;
+ // Initialize
+ int initialized;
+ OTB_MPI_CHECK_RESULT( MPI_Initialized, ( &initialized ));
+ m_initialized = ( initialized == 1 );
+ if( !m_initialized )
+ {
+ OTB_MPI_CHECK_RESULT( MPI_Init, ( &argc, &argv ));
+ m_initialized = true;
+ }
+ // Get MPI rank
+ int irank = 0;
+ OTB_MPI_CHECK_RESULT( MPI_Comm_rank, ( MPI_COMM_WORLD, &irank ));
- if(irank<0)
- {
- logError("Negative MPI rank");
- abort(EXIT_FAILURE);
- }
+ if( irank < 0 )
+ {
+ logError( "Negative MPI rank" );
+ abort( EXIT_FAILURE );
+ }
- m_MyRank = static_cast<unsigned int>(irank);
+ m_MyRank = static_cast<unsigned int>(irank);
- // Get MPI NbProocs
+ // Get MPI NbProocs
- int inbprocs=0;
+ int inbprocs = 0;
- OTB_MPI_CHECK_RESULT(MPI_Comm_size, (MPI_COMM_WORLD , &inbprocs));
+ OTB_MPI_CHECK_RESULT( MPI_Comm_size, ( MPI_COMM_WORLD, &inbprocs ));
- if(inbprocs<1)
- {
- logError("Negative or null number of processes");
- abort(EXIT_FAILURE);
- }
+ if( inbprocs < 1 )
+ {
+ logError( "Negative or null number of processes" );
+ abort( EXIT_FAILURE );
+ }
- m_NbProcs = static_cast<unsigned int>(inbprocs);
+ m_NbProcs = static_cast<unsigned int>(inbprocs);
+ }
+}
+
+/** Shuts down the MPI environment. */
+void MPIConfig::terminate()
+{
+ if( m_initialized && !m_terminated )
+ {
+ if( std::uncaught_exception() && m_abortOnException )
+ {
+ abort( EXIT_FAILURE );
+ }
+ else
+ {
+ int finalized;
+ OTB_MPI_CHECK_RESULT( MPI_Finalized, ( &finalized ));
+ if( !finalized )
+ {
+ OTB_MPI_CHECK_RESULT( MPI_Finalize, ( ));
+ }
+ }
+ m_terminated = true;
+ }
}
void MPIConfig::abort(int errCode)
diff --git a/Modules/Remote/SertitObject.remote.cmake b/Modules/Remote/SertitObject.remote.cmake
index a859a3d..5d4e9bd 100644
--- a/Modules/Remote/SertitObject.remote.cmake
+++ b/Modules/Remote/SertitObject.remote.cmake
@@ -26,5 +26,5 @@ median, variance, kurtosis, skewness. The result could be use to perform further
object-oriented image analysis.
"
GIT_REPOSITORY https://github.com/sertit/SertitObject.git
- GIT_TAG d228e0d65de58496e2410ae8944e715b3970760a
+ GIT_TAG 933963e90bf4b1054b80e099b74b0e41b803ef94
)
diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
index 6a8a879..b563ac4 100644
--- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
+++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx
@@ -378,6 +378,35 @@ int Application::Execute()
this->DoExecute();
+ // Update output information on every output image parameter
+ for (std::vector<std::string>::const_iterator it = paramList.begin();
+ it != paramList.end();
+ ++it)
+ {
+ std::string key = *it;
+ if (GetParameterType(key) == ParameterType_OutputImage
+ && IsParameterEnabled(key) )
+ {
+ Parameter* param = GetParameterByKey(key);
+ OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param);
+
+ if(outputParam!=ITK_NULLPTR)
+ {
+ outputParam->GetImage()->UpdateOutputInformation();
+ }
+ }
+ else if (GetParameterType(key) == ParameterType_ComplexOutputImage
+ && IsParameterEnabled(key))
+ {
+ Parameter* param = GetParameterByKey(key);
+ ComplexOutputImageParameter* outputParam = dynamic_cast<ComplexOutputImageParameter*>(param);
+
+ if(outputParam!=ITK_NULLPTR)
+ {
+ outputParam->GetImage()->UpdateOutputInformation();
+ }
+ }
+ }
return 0;
}
diff --git a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
index 05d439d..3d66679 100644
--- a/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
+++ b/Modules/Wrappers/CommandLine/src/otbApplicationLauncherCommandLine.cxx
@@ -303,19 +303,13 @@ int main(int argc, char* argv[])
LauncherType::Pointer launcher = LauncherType::New();
//if (launcher->Load(exp) == true)
- if (launcher->Load(vexp) == true)
- {
- if (launcher->ExecuteAndWriteOutput() == false)
- {
- return EXIT_FAILURE;
- }
- }
- else
- {
- return EXIT_FAILURE;
- }
+ bool sucess = launcher->Load(vexp) && launcher->ExecuteAndWriteOutput();
- return EXIT_SUCCESS;
+ // shutdown MPI after application finished
+ #ifdef OTB_USE_MPI
+ otb::MPIConfig::Instance()->terminate();
+ #endif
+ return sucess ? EXIT_SUCCESS : EXIT_FAILURE;
}
const std::string GetChildNodeTextOf(TiXmlElement *parentElement, std::string key)
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index bd8070c..1ed8fd7 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,3 +1,18 @@
+OTB-v.5.10.1 - Changes since version 5.10.0 (March 8th, 2017)
+---------------------------------------------------------------
+
+* Packaging :
+ * Upgrade to GDAL 2.1.3, compatible with new format of Sentinel 2 products
+ * Upgrade of SertitObject external module with bugfixes
+
+* Bugfixes :
+
+ * Orfeo Toolbox (OTB)
+ * 0001364: Crash of Mapla.app v5.10.0 on MacOSX El Captain 10.11.5
+ * 0001365: Python wrapper OTB-5.8.0: @rpath problem on MacOSX El Captain 10.11
+ * 0001367: Monteverdi from the OTB standalone package for Mac OS X fails to run
+ * 0001366: OTB 5.10 : can't use extract ROI using bindings python
+
OTB-v.5.10.0 - Changes since version 5.8.0 (February 14th, 2017)
---------------------------------------------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/otb.git
More information about the Pkg-grass-devel
mailing list