diff --git a/CMakeLists.txt b/CMakeLists.txt index 98cc929f95986c562fc737e0ae2ef6ab3e3b1f03..c5e1130921996b6eae49b4e01b1304fa4edda13a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,19 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +# Check compiler versions +set(OTB_MIN_GNU_VER 5) +set(OTB_MIN_MSVC_VER 19) +set(OTB_MIN_Clang_VER 3.4) +if(DEFINED OTB_MIN_${CMAKE_CXX_COMPILER_ID}_VER) + if(CMAKE_CXX_COMPILER_VERSION AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${OTB_MIN_${CMAKE_CXX_COMPILER_ID}_VER}) + message(STATUS "WARNING: the version of your ${CMAKE_CXX_COMPILER_ID} " + "compiler is not supported by Orfeo ToolBox (C++14 support might be " + "incomplete). Please consider updating your compiler to version " + "${OTB_MIN_${CMAKE_CXX_COMPILER_ID}_VER} or later.") + endif() +endif() + include(CMakeDependentOption) # # use ExternalProject diff --git a/Documentation/Cookbook/Art/contrast1.png b/Documentation/Cookbook/Art/contrast1.png new file mode 100644 index 0000000000000000000000000000000000000000..614c9f00c9e6c905ccbe6995464a4e6531863b8c Binary files /dev/null and b/Documentation/Cookbook/Art/contrast1.png differ diff --git a/Documentation/Cookbook/Art/contrast2.png b/Documentation/Cookbook/Art/contrast2.png new file mode 100644 index 0000000000000000000000000000000000000000..39deef978d7fb2f1faa2452c2d9c5e1077a999a6 Binary files /dev/null and b/Documentation/Cookbook/Art/contrast2.png differ diff --git a/Documentation/Cookbook/Art/contrast4.png b/Documentation/Cookbook/Art/contrast4.png new file mode 100644 index 0000000000000000000000000000000000000000..93eb1b67af7b2e1e040343d72e4cd8dd17961a17 Binary files /dev/null and b/Documentation/Cookbook/Art/contrast4.png differ diff --git a/Documentation/Cookbook/Art/contrast_orig.jpg b/Documentation/Cookbook/Art/contrast_orig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5fd20d82a36edc8a715ff2d8ca3ad5c2486c9a20 Binary files /dev/null and b/Documentation/Cookbook/Art/contrast_orig.jpg differ diff --git a/Documentation/Cookbook/Art/contrast_result.jpg b/Documentation/Cookbook/Art/contrast_result.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f22ab522064b7942551949aa85993a3a21fd9f69 Binary files /dev/null and b/Documentation/Cookbook/Art/contrast_result.jpg differ diff --git a/Documentation/Cookbook/rst/FAQ.rst b/Documentation/Cookbook/rst/FAQ.rst index 511ccd67ef36011373598f79be95882782a6738a..39a2287c3ad8a033cea4a7bfa46f9b4d7c8fd36f 100644 --- a/Documentation/Cookbook/rst/FAQ.rst +++ b/Documentation/Cookbook/rst/FAQ.rst @@ -290,6 +290,22 @@ how the file is streamed on the disk and will try to minimize the memory consumption along the pipeline. More information can be found into the documentation of the class. +Problems using OTB python wrapping along with other software +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you use OTB standalone binaries, there should not be any dependency conflict +with other libraries installed on your system. OTB will always try to grab +supplied libraries in the standalone package. + +However, when using Python wrappings, there can be conflicts if you import +*otbApplications* along with other software that share common dependencies with +OTB. For instance, if you want to use OTB Applications and Fiona in a Python +script, they both rely on GDAL library. As the libraries loaded by Python must +be unique, the first library *SomeLib* loaded will be used by any other binary +depending on it. Thus, the order of the imports has an effect. In some cases, +symbol problems have been observed in libcrypto, and the solution was to import +OTB Applications before importing Fiona. + Getting help ------------ diff --git a/Documentation/Cookbook/rst/Recipes.rst b/Documentation/Cookbook/rst/Recipes.rst index fa9478d5abf7698b4abbdcf806d625a0ab220cba..18cab29de9d970df06441d440b7972d980b9e37e 100644 --- a/Documentation/Cookbook/rst/Recipes.rst +++ b/Documentation/Cookbook/rst/Recipes.rst @@ -13,7 +13,9 @@ and demonstrate how the can be applied. recipes/sarprocessing.rst recipes/residual_registration.rst recipes/improc.rst + recipes/bandmathx.rst + recipes/contrast_enhancement.rst recipes/pbclassif.rst recipes/featextract.rst recipes/stereo.rst - recipes/bandmathx.rst + diff --git a/Documentation/Cookbook/rst/recipes/contrast_enhancement.rst b/Documentation/Cookbook/rst/recipes/contrast_enhancement.rst new file mode 100644 index 0000000000000000000000000000000000000000..79273a1b8dad1225cf2e6628664cae3250c5bcd2 --- /dev/null +++ b/Documentation/Cookbook/rst/recipes/contrast_enhancement.rst @@ -0,0 +1,101 @@ +Enhance local contrast +====================== + +Principles +~~~~~~~~~~ + +Sensor images have often a wide dynamic range. Whereas it is helpful to have +high precision to do complex processing, it is pretty hard to display high +dynamic images, even on modern screen as the dynamic range for basic screen is +of 8 bits while images can be encoded on 12 or 16 bits (or even more!). + +.. _Figure1: + +|image5| |image6| + +The *ContrastEnhancement* application aims to reduce the image dynamic by +reorganizing it in a smarter way than just linear compression and improve the +local contrast and enhance the definitions of edges. + +.. _Figure2: + +|image1| |image2| + +The equalization of histogram creates a look up table in order to maximize the +dynamic. The target histogram is perfectly flat. The gain applied on each pixel +comes from the computation of the transfer function :math:`T` such that : + +.. math:: \forall i \quad \int_{min}^{i*T(i)}h_{istogram}(j)dj = + \int_{min}^{i}h_{target}(j)dj + +where :math:`h_{target}` is the corresponding flat histogram with the constraint +that white and black are still white and black after equalization : + +.. math:: T(min) = T(max) = 1 + +You can apply this transformation with the *ContrastEnhancement* application: + +:: + + otbcli_ContrastEnhancement -in input_image.tif + -out output_image.tif + -spatial global + +It allows to compress the dynamic without loosing details and contrast. + +Advanced parameters +~~~~~~~~~~~~~~~~~~~ + +The *ContrastEnhancement* provides different options to configure the contrast +enhancement method. Let us see what there are for. + +First what you want to equalize. Two modes are available: + +* **luminance:** on 3 bands image, the equalization will be done on a single + band which will be a composition of the original bands. The computed gain will + then be applied on the different bands. The classical use of this method is to + conserve ratio between the different color, conserve the hue. +* **channel:** each bands are equalized independently. + +The other option is the local equalization. You can choose a window size that +will be use to split the image in tiles and histograms will be computed over +those tiles. Gain will be interpolated between the adjacent tiles in order to +give a smooth result. + +:: + + otbcli_ContrastEnhancement -in input_image.tif + -out output_image.tif spatial.local.h 500 + -spatial.local.w 500 + -mode lum + +The *ContrastEnhancement* application also offers a way to limit contrast by +adjusting original histogram with the **hfact** parameter. The limitation factor +represents the limit height that can have any bucket of the histogram; the +application computes the height of the flat histogram and the maximal height is +the limitation factor time this "flat height". + +.. _Figure3: + +|image4| + +Finally, you can ignore a particular value with the **nodata** parameter, and +also set manually your minimum and maximum value. Any value out of bound will be +ignored. + + +.. |image1| image:: ../Art/contrast1.png + :scale: 30% + +.. |image2| image:: ../Art/contrast2.png + :scale: 30% + +.. |image4| image:: ../Art/contrast4.png + +.. |image5| image:: ../Art/contrast_orig.jpg + :scale: 30% + :alt: original + +.. |image6| image:: ../Art/contrast_result.jpg + :scale: 30% + :alt: result diff --git a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx index 977d4e75a469f86c3d611ab3f7343487df7f6054..16e518a278b56373e958ed974aab6dd2508103c1 100644 --- a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx +++ b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx @@ -68,7 +68,7 @@ public: } // end operator () - void SetRgb( std::vector<int> rgb) + void SetRgb( std::vector<unsigned int> rgb) { m_Rgb = rgb; } @@ -82,7 +82,7 @@ public: return m_LumCoef; } private: - std::vector<int> m_Rgb; + std::vector<unsigned int> m_Rgb; std::vector<float> m_LumCoef; }; // end of functor class MultiplyOperator @@ -383,10 +383,17 @@ private: } else if ( m_EqMode == "lum") { - std::vector<int> rgb( 3 , 0 ); + std::vector< unsigned int > rgb( 3 , 0 ); rgb[0] = GetParameterInt("mode.lum.red.ch"); rgb[1] = GetParameterInt("mode.lum.green.ch"); rgb[2] = GetParameterInt("mode.lum.blue.ch"); + if ( !( nbChannel > std::max( rgb[0] , std::max( rgb[1] , rgb[2] ) ) ) ) + { + std::ostringstream oss; + oss<<"One of the selected channel needed for luminance computation " + "exceed the number of component of the image."; + otbAppLogFATAL( << oss.str() ) + } ComputeLuminance( inImage , rgb ); LuminanceEqualization( inputImageList , rgb , outputImageList ); } @@ -695,7 +702,7 @@ private: // Compute the luminance with user parameters void ComputeLuminance( const FloatVectorImageType::Pointer inImage , - std::vector < int > rgb ) + std::vector < unsigned int > rgb ) { // Retreive coeffs for each channel std::vector < float > lumCoef( 3 , 0.0 ); @@ -719,7 +726,7 @@ private: // Equalize the luminance and apply the corresponding gain on each channel // used to compute this luminance void LuminanceEqualization( const ImageListType::Pointer inputImageList , - const std::vector < int > rgb , + const std::vector < unsigned int > rgb , ImageListType::Pointer outputImageList ) { m_GainLutFilter.resize( 1 , GainLutFilterType::New() ); diff --git a/Modules/Core/Common/src/otbStopwatch.cxx b/Modules/Core/Common/src/otbStopwatch.cxx index ba3a8174afef3a53a010bd810fce4755f4703980..5c45c48335170e07bcd14bd328d95724a5a73040 100644 --- a/Modules/Core/Common/src/otbStopwatch.cxx +++ b/Modules/Core/Common/src/otbStopwatch.cxx @@ -27,7 +27,7 @@ namespace otb Stopwatch ::Stopwatch() - : m_ElapsedMilliseconds(), m_IsRunning() + : m_StartTime(), m_ElapsedMilliseconds(), m_IsRunning() { } diff --git a/Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx b/Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx index 1d9bf6e7bcd05972ab8e469aa02f28995db3cb77..211bf8f3a3fead4df4cf1eaa6683d6af6a68866b 100644 --- a/Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx +++ b/Modules/Core/Transform/include/otbStreamingWarpImageFilter.txx @@ -303,7 +303,13 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDisplacementField> // second pass on the thread region to mask pixels outside the displacement grid const PixelType paddingValue = this->GetEdgePaddingValue(); OutputImagePointerType outputPtr = this->GetOutput(); - DisplacementFieldPointerType fieldPtr = this->GetDisplacementField(); + + // ITK 4.13 fix const correctness of GetDisplacementField. + // Related commit in ITK: https://github.com/InsightSoftwareConsortium/ITK/commit/0070848b91baf69f04893bc3ce85bcf110c3c63a + + // DisplacementFieldPointerType fieldPtr = this->GetDisplacementField(); + const DisplacementFieldType * fieldPtr = this->GetDisplacementField(); + DisplacementFieldRegionType defRegion = fieldPtr->GetLargestPossibleRegion(); diff --git a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx index c988cc5a6e5b970b733842e447b5fccc7116c89a..ee3d3e72e8f4f28cc8a674ab7537cd90fff07553 100644 --- a/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALOverviewsBuilder.cxx @@ -100,7 +100,32 @@ GDALOverviewsBuilder io->SetFileName( filename ); - return !io->GetSubDatasetInfo( names, descs ); + // no overview for containers + if(io->GetSubDatasetInfo( names, descs )) + return false; + + // no overview for VSI datasets + if (filename.size()>8 && filename.compare(0, 4, "/vsi") == 0) + { + size_t pos = filename.find('/',4); + if (pos != std::string::npos) + { + bool isVSI = true; + for (unsigned int i=4; i<pos ; i++) + { + int c = filename[i]; + if ( !(std::islower(c) || std::isdigit(c) || c == '_' ) ) + { + isVSI = false; + break; + } + } + if (isVSI) + return false; + } + } + + return true; } /***************************************************************************/ diff --git a/Modules/Visualization/Mapla/src/CMakeLists.txt b/Modules/Visualization/Mapla/src/CMakeLists.txt index ee5df87066a6c86895071a2a19abd337db2f5d16..491e26857b7958a9a9447c7bfcf1fac7d8213ad1 100644 --- a/Modules/Visualization/Mapla/src/CMakeLists.txt +++ b/Modules/Visualization/Mapla/src/CMakeLists.txt @@ -63,7 +63,7 @@ endif() ############################################################################# qt4_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} ) qt4_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} ) -qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} ) +qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} OPTIONS "-no-compress") ############################################################################# add_to_qt4_i18n_sources( ${OTBMapla_SRCS} ) diff --git a/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.qrc b/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.qrc index 83448295fd5269759b62626ff57593c636a2debd..8bfc273128ddaaa7037891424970cdff23893b6c 100644 --- a/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.qrc +++ b/Modules/Visualization/Mapla/src/mvdMaplaMainWindow.qrc @@ -12,6 +12,8 @@ <file alias="action_ZoomOut_Icon">../../../../Utilities/Data/Icons/action-zoomout_24x24.png</file> <file alias="action_ZoomFull_Icon">../../../../Utilities/Data/Icons/action-zoomtolayer_24x24.png</file> <file alias="action_Open_Icon">../../../../Utilities/Data/Icons/document-open_32x32.png</file> + <file alias="done">../../../../Utilities/Data/Icons/check_24x24.png</file> + <file alias="failed">../../../../Utilities/Data/Icons/forbidden-24x24.png</file> </qresource> <qresource prefix="/images"> <file alias="application_icon">../../../../Utilities/Data/Icons/monteverdi-128x128.png</file> diff --git a/Modules/Visualization/Monteverdi/src/CMakeLists.txt b/Modules/Visualization/Monteverdi/src/CMakeLists.txt index 6b450c10668d04441bb597f73dab8f83e50e3793..87a9ffe6d36c1ae7a33b4d9be183603bcb8cd494 100644 --- a/Modules/Visualization/Monteverdi/src/CMakeLists.txt +++ b/Modules/Visualization/Monteverdi/src/CMakeLists.txt @@ -46,7 +46,7 @@ set( OTBMonteverdi_RESOURCES ############################################################################# qt4_wrap_cpp( OTBMonteverdi_SRC_MOC ${OTBMonteverdi_HEADERS_MOC} ) qt4_wrap_ui( OTBMonteverdi_FORMS_HEADERS ${OTBMonteverdi_FORMS} ) -qt4_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} ) +qt4_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} OPTIONS "-no-compress") ############################################################################# add_to_qt4_i18n_sources( ${OTBMonteverdi_SRCS} ) diff --git a/Modules/Visualization/Monteverdi/src/mvdMainWindow.qrc b/Modules/Visualization/Monteverdi/src/mvdMainWindow.qrc index dfd8f7d2866727451fc5998de9f6515725cd9362..aa3845538e82ce857c06bee37f5b4326b656e8f3 100644 --- a/Modules/Visualization/Monteverdi/src/mvdMainWindow.qrc +++ b/Modules/Visualization/Monteverdi/src/mvdMainWindow.qrc @@ -22,6 +22,8 @@ <file alias="action_ZoomOut_Icon">../../../../Utilities/Data/Icons/action-zoomout_24x24.png</file> <file alias="action_ZoomLayer_Icon">../../../../Utilities/Data/Icons/action-zoomtolayer_24x24.png</file> <file alias="action_Open_Icon">../../../../Utilities/Data/Icons/document-open_32x32.png</file> + <file alias="done">../../../../Utilities/Data/Icons/check_24x24.png</file> + <file alias="failed">../../../../Utilities/Data/Icons/forbidden-24x24.png</file> </qresource> <qresource prefix="/images"> <file alias="application_icon">../../../../Utilities/Data/Icons/monteverdi-128x128.png</file> diff --git a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui index c715d1eb560445763ca9cf4fd63fc23860e596d3..ca04e6c9d5f364d47624c2e5dd069094afb443c9 100644 --- a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui +++ b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui @@ -121,7 +121,7 @@ </sizepolicy> </property> <property name="toolTip"> - <string>When the image width or height is lower than this minimum, overview generation is not proposed</string> + <string>When the image width or height is lower than twice this minimum, overview generation is not proposed</string> </property> <property name="text"> <string>Minimum size:</string> @@ -131,7 +131,7 @@ <item row="1" column="2"> <widget class="QSpinBox" name="overviewsSpinBox"> <property name="toolTip"> - <string>When the image width or height is lower than this minimum, overview generation is not proposed</string> + <string>When the image width or height is lower than twice this minimum, overview generation is not proposed</string> </property> <property name="maximum"> <number>999999999</number> diff --git a/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx b/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx index 9fa885798dab63ad33362059ea6c8a0401bd035b..d3f07349734b4d4548a67fa7d4d9f6bfc313ef83 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx @@ -161,7 +161,7 @@ OverviewBuilder emit ProgressTextChanged( QString( - tr( "Generting overviews for file %1/%2 '%3'." ) + tr( "Generating overviews for file %1/%2 '%3'." ) ) .arg( m_Index + 1 ) .arg( m_Count ) diff --git a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetParameterInitializers.h b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetParameterInitializers.h index 8ad2bfc76d0f4b08239b8c0524ec1c59cb6607a3..8af787eb78f9dcf415b1b916f2cb4fe0557302e6 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetParameterInitializers.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetParameterInitializers.h @@ -756,18 +756,21 @@ SetupOutputFilename( W* widget, const QString& prefix, const QString& extension ) { - QString id( QUuid::createUuid().toString() ); + if(widget->isEnabled()) + { + QString id( QUuid::createUuid().toString() ); - id.replace( QRegExp( "[\\{|\\}]" ), "" ); + id.replace( QRegExp( "[\\{|\\}]" ), "" ); - if( prefix!=NULL ) - id.prepend( "_" ); + if( prefix!=NULL ) + id.prepend( "_" ); - widget->SetFileName( - dir.absoluteFilePath( prefix + id + extension ) - ); + widget->SetFileName( + dir.absoluteFilePath( prefix + id + extension ) + ); - widget->UpdateGUI(); + widget->UpdateGUI(); + } } /*****************************************************************************/ @@ -776,9 +779,12 @@ void SetupOutputFilename( W * widget, const QDir & dir ) { - widget->SetFileName( dir.path() ); + if(widget->isEnabled()) + { + widget->SetFileName( dir.path() ); - widget->UpdateGUI(); + widget->UpdateGUI(); + } } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h index ed2aab0a7f908859a284318869787717ed16994d..9aba72c53accbe28e01941eeb81872f56f9a8633 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h @@ -220,6 +220,8 @@ private slots: void UpdateMessageAfterApplicationReady(bool val); + void UpdateMessageAfterExecution(int status); + /** */ void OnExecButtonClicked(); diff --git a/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.ui b/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.ui index 5121277dfde152c4d05696b5381e468286ec5dec..bc95dd74053e246b3a655e546237932c72dda149 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.ui +++ b/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.ui @@ -48,7 +48,7 @@ </attribute> <column> <property name="text"> - <string notr="true">Name</string> + <string>Name</string> </property> </column> <column> diff --git a/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx b/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx index b11becb03201e8a5714c86285a706d1a364fdd0f..3c33015a5bde59b586340e7fc5155ed3166c4c84 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx @@ -187,36 +187,43 @@ QtWidgetView // Create a VBoxLayout with the header, the input widgets, and the footer QVBoxLayout *mainLayout = new QVBoxLayout(); QTabWidget *tab = new QTabWidget(); - tab->addTab(CreateInputWidgets(), "Parameters"); + tab->addTab(CreateInputWidgets(), tr("Parameters")); - //otb::Wrapper::QtWidgetProgressReport* prog = new otb::Wrapper::QtWidgetProgressReport(m_Model); //prog->SetApplication(m_Application); //tab->addTab(prog, "Progress"); - tab->addTab(CreateDoc(), "Documentation"); + tab->addTab(CreateDoc(), tr("Documentation")); mainLayout->addWidget(tab); QTextEdit *log = new QTextEdit(); connect( m_Model->GetLogOutput(), SIGNAL(NewContentLog(QString)), log, SLOT(append(QString) ) ); - tab->addTab(log, "Logs"); + tab->addTab(log, tr("Logs")); - m_Message = new QLabel("<center><font color=\"#FF0000\">Select parameters</font></center>"); + m_Message = new QLabel("<center><font color=\"#FF0000\">"+tr("Select parameters")+"</font></center>"); connect( m_Model, SIGNAL( SetApplicationReady( bool ) ), this, SLOT( UpdateMessageAfterApplicationReady( bool ) ) ); + connect( + m_Model, + SIGNAL(SetProgressReportDone(int)), + this, SLOT(UpdateMessageAfterExecution(int)) ); mainLayout->addWidget(m_Message); otb::Wrapper::QtWidgetSimpleProgressReport* progressReport = new otb::Wrapper::QtWidgetSimpleProgressReport(m_Model); progressReport->SetApplication(m_Application); + + QWidget* footer = CreateFooter(); QHBoxLayout *footLayout = new QHBoxLayout; footLayout->addWidget(progressReport); - footLayout->addWidget(CreateFooter()); + footLayout->addWidget(footer); mainLayout->addLayout(footLayout); + footLayout->setAlignment(footer, Qt::AlignBottom); + QGroupBox *mainGroup = new QGroupBox(); mainGroup->setLayout(mainLayout); @@ -611,9 +618,28 @@ QtWidgetView } */ - m_Message->setText("<center><font color=\"#FF0000\">Running</font></center>"); - emit ExecuteAndWriteOutput(); + + m_Message->setText("<center><font color=\"#FF0000\">"+tr("Running")+"</font></center>"); +} + +/******************************************************************************/ +void +QtWidgetView +::UpdateMessageAfterExecution(int status) +{ + if (status >= 0) + { + m_Message->setText("<center>" + "<img src=\":/icons/done\" width=\"16\" height=\"16\" />" + "<font color=\"#00A000\">"+tr("Done")+"</font></center>"); + } + else + { + m_Message->setText("<center>" + "<img src=\":/icons/failed\" width=\"16\" height=\"16\" />" + "<font color=\"#FF0000\">"+tr("Failed")+"</font></center>"); + } } /*******************************************************************************/ @@ -622,9 +648,9 @@ QtWidgetView ::UpdateMessageAfterApplicationReady( bool val ) { if(val == true) - m_Message->setText("<center><font color=\"#00FF00\">Ready to run</font></center>"); + m_Message->setText("<center><font color=\"#00A000\">"+tr("Ready to run")+"</font></center>"); else - m_Message->setText("<center><font color=\"#FF0000\">Select parameters</font></center>"); + m_Message->setText("<center><font color=\"#FF0000\">"+tr("Select parameters")+"</font></center>"); } /*******************************************************************************/ diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx index cb595ebe557b0fc49ef0b80db56780860c08a014..c8347b23d981365c4bde9dedb798dfde1f9561d7 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx @@ -45,7 +45,9 @@ QtWidgetSimpleProgressReport::QtWidgetSimpleProgressReport(QtWidgetModel * model m_AddProcessCommand->SetCallbackFunction( this, &QtWidgetSimpleProgressReport::ProcessEvent ); m_Bar = new itk::QtProgressBar(this); + m_Label = new QLabel("No process"); + m_Label->setWordWrap(true); connect( m_Bar, SIGNAL(SetValueChanged(int)), m_Bar, SLOT(setValue(int)) ); connect( m_Model, SIGNAL(SetProgressReportDone()), m_Bar, SLOT(reset()) ); diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetView.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetView.cxx index 9cc7c4af44e33e7520c0034551b48b1805dd0762..39c9d80bd4f84283c9878a6c985404ad9e37dfaa 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetView.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetView.cxx @@ -97,11 +97,11 @@ void QtWidgetView::UpdateMessageAfterExecution(int status) { if (status >= 0) { - m_Message->setText("<center><font color=\"#00A000\">DONE</font></center>"); + m_Message->setText("<center><font color=\"#00A000\">Done</font></center>"); } else { - m_Message->setText("<center><font color=\"#FF0000\">FAILED !</font></center>"); + m_Message->setText("<center><font color=\"#FF0000\">Failed</font></center>"); } } diff --git a/Packaging/Files/mapla.bat b/Packaging/Files/mapla.bat index 1823697e43c9035a7fc7ccc80ae58da9f25bbc6b..9b1a3a1d8721b67b3831ea1cb21b4c7c38999540 100644 --- a/Packaging/Files/mapla.bat +++ b/Packaging/Files/mapla.bat @@ -23,16 +23,13 @@ @echo off setlocal -:: Get the directory of the current script -set CURRENT_SCRIPT_DIR=%~dp0 - :: Setup environment -call "%CURRENT_SCRIPT_DIR%otbenv.bat" +call "%~dp0%otbenv.bat" :: Set current dir to HOME dir because Monteverdi generates temporary files and need write access cd %HOMEDRIVE%%HOMEPATH% :: Start Monteverdi -start "Monteverdi Application Launcher" /B "%CURRENT_SCRIPT_DIR%bin\mapla.exe" %* +start "Monteverdi Application Launcher" /MIN "CMD.EXE" /C mapla.exe %* endlocal diff --git a/Packaging/Files/monteverdi.bat b/Packaging/Files/monteverdi.bat index 4ffe60380efeae6730c5da3398c3b4bec8fbbbff..382c30bb64801604e02a47d75ca1702d7777273a 100644 --- a/Packaging/Files/monteverdi.bat +++ b/Packaging/Files/monteverdi.bat @@ -23,16 +23,13 @@ @echo off setlocal -:: Get the directory of the current script -set CURRENT_SCRIPT_DIR=%~dp0 - :: Setup environment -call "%CURRENT_SCRIPT_DIR%otbenv.bat" +call "%~dp0%otbenv.bat" :: Set current dir to HOME dir because Monteverdi generates temporary files and need write access cd %HOMEDRIVE%%HOMEPATH% :: Start Monteverdi -start "Monteverdi Viewer" /B "%CURRENT_SCRIPT_DIR%bin\monteverdi.exe" %* +start "Monteverdi Viewer" /MIN "CMD.EXE" /C monteverdi.exe %* endlocal diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index 35d30a5c83c37c1f5ea066636da0d0822dc8278f..19234b73adac3e617b6c5a053179fa70ee1ae632 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -34,6 +34,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + message(WARNING "The support of debug build in SuperBuild is incomplete, some dependencies such as NetCDF don't support it.") +endif() + include(ExternalProject) # Not needed as OTB Superbuild requires c++14 since version 6.2 diff --git a/Utilities/Data/Icons/forbidden-24x24.png b/Utilities/Data/Icons/forbidden-24x24.png new file mode 100644 index 0000000000000000000000000000000000000000..c910740e6d2030667faefeeb7445bf07e61703c8 Binary files /dev/null and b/Utilities/Data/Icons/forbidden-24x24.png differ diff --git a/i18n/fr_FR.ts b/i18n/fr_FR.ts index e9ea1fe258c00eb93564b84ab05b5827bdb86122..67a6aa2bdfebed7571dffb53edff50c50a904c56 100644 --- a/i18n/fr_FR.ts +++ b/i18n/fr_FR.ts @@ -279,7 +279,7 @@ Veuillez, s'il vous plait, supprimer votre répertoire de cache Monteverdi. </message> <message> <source><html><head/><body><p>Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)</p><p>Monteverdi is part of Orfeo Toolbox</p><p><a href="https://www.orfeo-toolbox.org/"><span style=" text-decoration: underline; color:#0000ff;">https://www.orfeo-toolbox.org/</span></a></p><p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with<br/>the License. You may obtain a copy of the License at:</p><p><a href="http://www.apache.org/licenses/LICENSE-2.0"><span style=" text-decoration: underline; color:#0000ff;">http://www.apache.org/licenses/LICENSE-2.0</span></a></p><p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an <br/>&quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License<br/>for the specific language governing permissions and limitations under the License.</p></body></html></source> - <translation type="unfinished"></translation> + <translation></translation> </message> </context> <context> @@ -457,6 +457,10 @@ Veuillez, s'il vous plait, supprimer votre répertoire de cache Monteverdi. <source>Title</source> <translation>Titre</translation> </message> + <message> + <source>Name</source> + <translation>Nom</translation> + </message> </context> <context> <name>mvd::ApplicationsToolBoxController</name> @@ -4597,7 +4601,7 @@ Merci d'en sélectionner un autre.</translation> </message> <message> <source>GDAL Overviews</source> - <translation>Overviews GDAL</translation> + <translation>Aperçus GDAL</translation> </message> <message> <source>Generate</source> @@ -4612,8 +4616,8 @@ Merci d'en sélectionner un autre.</translation> <translation>pixel(s)</translation> </message> <message> - <source>When the image width or height is lower than this minimum, overview generation is not proposed</source> - <translation>Lorsque la hauteur ou la largeur d'une image est inférieure à ce minimum, la génération des aperçus n'est pas proposée</translation> + <source>When the image width or height is lower than twice this minimum, overview generation is not proposed</source> + <translation>Lorsque la hauteur ou la largeur d'une image est inférieure à deux fois ce minimum, la génération des aperçus n'est pas proposée</translation> </message> </context> <context> @@ -5106,5 +5110,37 @@ Le(s) résultat(s) vont être importés en tant que jeu de données.</translatio <source>Following files are being viewed in </source> <translation>Les fichiers suivants sont en cours de visualisation dans </translation> </message> + <message> + <source>Running</source> + <translation>En cours</translation> + </message> + <message> + <source>Done</source> + <translation>Terminé</translation> + </message> + <message> + <source>Failed</source> + <translation>Echec</translation> + </message> + <message> + <source>Ready to run</source> + <translation>Prêt à démarrer</translation> + </message> + <message> + <source>Select parameters</source> + <translation>Choix des paramètres</translation> + </message> + <message> + <source>Parameters</source> + <translation>Paramètres</translation> + </message> + <message> + <source>Documentation</source> + <translation>Documentation</translation> + </message> + <message> + <source>Logs</source> + <translation>Logs</translation> + </message> </context> </TS>