Commit 42cf85d6 authored by Julien Michel's avatar Julien Michel

Merge branch 'develop' into colormap-shader

parents 82c76e2e 00036b35
......@@ -6,10 +6,10 @@ dist: trusty
compiler:
- clang
addons:
apt:
packages:
- libboost-all-dev
# addons:
# apt:
# packages:
# - libboost-all-dev
cache: ccache
......
......@@ -49,6 +49,18 @@ The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize your environment
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.
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
Notes:
- You must use monteverdi and mapla through ``mapla.sh`` and ``monteverdi.sh`` helper scripts in extracted directory.
......
......@@ -25,6 +25,17 @@ Contents of OTB-|release|-Darwin64 is briefly listed below:
- ``share`` : A folder containing common resources and copyright
mentions.
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
Notes:
- If you want to use the otbcli and otbgui launchers, you must access
......
......@@ -22,6 +22,17 @@ The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize a command prompt
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
Notes:
~~~~~~
- You must have "Visual C++ Redistributable for Visual Studio 2015" installed for using this package.
......
......@@ -31,7 +31,7 @@ entry points. The framework can be extended, but Orfeo Toolbox ships with the fo
QGIS.
The OTB Applications are now rich of more than 90 tools, which are
listed in the the applications reference documentation, presented in
listed in the applications reference documentation, presented in
chapter [chap:apprefdoc], page.
Running the applications
......@@ -40,7 +40,7 @@ Running the applications
Common framework
~~~~~~~~~~~~~~~~
All standard applications shared the same implementation and expose
All standard applications share the same implementation and expose
automatically generated interfaces.
Thus, the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For instance, calling ``otbcli_Convert`` will launch the
......@@ -149,8 +149,6 @@ The graphical interface for the applications provides a useful
interactive user interface to set the parameters, choose files, and
monitor the execution progress.
This interface can be activated through the CMake option .
This launcher needs the same two arguments as the command line launcher
:
......@@ -194,12 +192,12 @@ Using the Python interface
~~~~~~~~~~~~~~~~~~~~~~~~~~
The applications can also be accessed from Python, through a module
named ``otbApplication``
named ``otbApplication``.
On Unix systems it is typically available in the ``/usr/lib/otb/python``
directory. You may need to configure the environment variable
``PYTHONPATH`` to include this directory so that the module becomes
available from an Python shell.
On Unix systems, it is typically available in the ``/usr/lib/otb/python``
directory. Depending on how you installed OTB, you may need to configure the
environment variable ``PYTHONPATH`` to include this directory so that the module
becomes available from Python.
On Windows, you can install the ``otb-python`` package, and the module
will be available from an OSGeo4W shell automatically.
......
......@@ -1178,6 +1178,7 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
typename FilterType::Pointer overSampledLowPass = FilterType::New();
overSampledLowPass->SetInput(cropedLowPass);
overSampledLowPass->SetSubsampleFactor(delta);
overSampledLowPass->SetNumberOfThreads(1);
overSampledLowPass->Update();
InputImagePointerType cropedHighPass = InputImageType::New();
......@@ -1196,6 +1197,7 @@ WaveletFilterBank<TInputImage, TOutputImage, TWaveletOperator, Wavelet::INVERSE>
typename FilterType::Pointer overSampledHighPass = FilterType::New();
overSampledHighPass->SetInput(cropedHighPass);
overSampledHighPass->SetSubsampleFactor(delta);
overSampledHighPass->SetNumberOfThreads(1);
overSampledHighPass->Update();
InnerProductType innerProduct;
......
......@@ -260,8 +260,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage>
typename TargetListSampleType::ConstIterator labIt = labels->Begin();
maskIt.GoToBegin();
for (outIt.GoToBegin(); labIt!=labels->End() && !outIt.IsAtEnd();
++outIt)
for (outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt)
{
double confidenceIndex = 0.0;
TargetValueType labelValue(m_DefaultLabel);
......@@ -270,7 +269,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage>
validPoint = maskIt.Get() > 0;
++maskIt;
}
if (validPoint)
if (validPoint && labIt!=labels->End())
{
labelValue = labIt.GetMeasurementVector()[0];
......
#Contact: Adrien Lagrange <adrien.lagrange@irit.fr>
otb_fetch_module(OTBFastFeaturesSelection
otb_fetch_module(OTBFFSforGMM
"This module implements a method to perform a fast forward feature selection using a Gaussian Mixture Model.
A more detailed description can be found on the project website:
https://github.com/Laadr/otbFFSforGMM
......
......@@ -92,24 +92,10 @@ public:
std::vector<int> GetSelectedItems()
{
if( m_SelectedNames.size() != 0 )
{
this->SetSelectedItemsByNames();
}
else if( m_SelectedKeys.size() != 0 )
{
this->SetSelectedItemsByKeys();
}
return m_SelectedItems;
}
void SetSelectedNames(std::vector<std::string> selectedNames)
{
m_SelectedNames = selectedNames;
m_SelectedItems.clear();
m_SelectedKeys.clear();
}
void SetSelectedNames(std::vector<std::string> selectedNames);
std::vector<std::string> GetSelectedNames()
{
......@@ -117,22 +103,21 @@ public:
}
void SetSelectedKeys(std::vector<std::string> selectedKeys)
{
m_SelectedKeys = selectedKeys;
m_SelectedItems.clear();
m_SelectedNames.clear();
}
void SetSelectedKeys(std::vector<std::string> selectedKeys);
std::vector<std::string> GetSelectedKeys()
{
return m_SelectedKeys;
}
/** Set selected items using a lit of selected keys. */
void SetSelectedItemsByKeys();
/** Set selected items using a lit of selected names. */
void SetSelectedItemsByNames();
/** Set selected items using a lit of selected keys.
* OBSOLETE : this method is not needed anymore and does nothing. */
void SetSelectedItemsByKeys(){}
/** Set selected items using a lit of selected names.
* OBSOLETE : this method is not needed anymore and does nothing. */
void SetSelectedItemsByNames(){}
void SetSelectedItems(std::vector<std::string> selectedItems)
{
std::vector<int> items;
......@@ -140,14 +125,22 @@ public:
{
items.push_back( atoi( selectedItems[i].c_str() ) );
}
m_SelectedItems = items;
m_SelectedNames.clear();
m_SelectedKeys.clear();
this->SetSelectedItems(items);
}
void SetSelectedItems(std::vector<int> selectedItems)
{
m_SelectedItems = selectedItems;
m_SelectedNames.clear();
m_SelectedKeys.clear();
// update selected names and keys
std::vector<std::string> names = this->GetChoiceNames();
std::vector<std::string> keys = this->GetChoiceKeys();
for (unsigned int i=0 ; i<m_SelectedItems.size() ; i++)
{
m_SelectedNames.push_back(names[m_SelectedItems[i]]);
m_SelectedKeys.push_back(keys[m_SelectedItems[i]]);
}
}
protected:
......
......@@ -172,7 +172,10 @@ ChoiceParameter::SetValue(std::string choiceKey)
++i;
}
itkExceptionMacro(<< "Cannot find " << choiceKey);
itkExceptionMacro(<< "Invalid parameter value '"
<< choiceKey << "'"
<< " given for parameter '-"
<< this->GetKey() << "'");
}
unsigned int
......
......@@ -210,8 +210,8 @@ ComplexOutputImageParameter::GetWriter()
// 0 : image
// 1 : VectorImage
if ( dynamic_cast<FloatVectorImageType*>( m_Image.GetPointer()) ||
dynamic_cast<DoubleVectorImageType*>(m_Image.GetPointer()))
if ( dynamic_cast<ComplexFloatVectorImageType*>( m_Image.GetPointer()) ||
dynamic_cast<ComplexDoubleVectorImageType*>(m_Image.GetPointer()))
{
type = 1;
}
......
......@@ -145,14 +145,15 @@ ListViewParameter::ClearChoices()
m_ChoiceList.clear();
}
void
ListViewParameter::SetSelectedItemsByNames()
ListViewParameter::SetSelectedNames(std::vector<std::string> selectedNames)
{
std::vector<int> selectedItems;
std::vector<std::string> names = this->GetChoiceNames();
for(unsigned int i=0; i<m_SelectedNames.size(); i++)
for(unsigned int i=0; i<selectedNames.size(); i++)
{
const std::string selectedName = m_SelectedNames[i];
const std::string selectedName = selectedNames[i];
unsigned int j(0);
for(; j<names.size(); j++)
{
......@@ -182,13 +183,13 @@ ListViewParameter::SetSelectedItemsByNames()
void
ListViewParameter::SetSelectedItemsByKeys()
ListViewParameter::SetSelectedKeys(std::vector<std::string> selectedKeys)
{
std::vector<int> selectedItems;
std::vector<std::string> keys = this->GetChoiceKeys();
for(unsigned int i=0; i<m_SelectedKeys.size(); i++)
for(unsigned int i=0; i<selectedKeys.size(); i++)
{
const std::string selectedKey = m_SelectedKeys[i];
const std::string selectedKey = selectedKeys[i];
unsigned int j(0);
std::ostringstream oss;
for(; j<keys.size(); j++)
......
......@@ -97,6 +97,10 @@ void QtWidgetListViewParameter::SelectedItems()
}
}
m_ListViewParam->SetSelectedItems(m_SelectedItems);
// make sure parameter is enabled
m_ListViewParam->SetActive(true);
m_ListViewParam->SetUserValue(true);
}
}
......
......@@ -14,8 +14,8 @@ PATCH_ELF_EXE="$OUT_DIR/patchelf"
LD_LIBRARY_PATH=
echo "Configuring..."
#BINARY_FILES="@VAR_IN_PKGSETUP_CONFIGURE@"
BINARY_FILES=$(find $OUT_DIR/lib $OUT_DIR/lib/otb/applications $OUT_DIR/bin -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
#see next call below for otb applications
BINARY_FILES=$(find $OUT_DIR/lib $OUT_DIR/bin -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
# run patchelf
for bin_file in $BINARY_FILES; do
......@@ -33,6 +33,15 @@ if [ "$I_AM_XDK" = true ] ; then
sed -i "s,@DEPENDENCIES_INSTALL_DIR@,$OUT_DIR,g" lib/cmake/ITK-@PKG_ITK_SB_VERSION@/ITKTargets-release.cmake
else
OTB_APP_FILES=$(find $OUT_DIR/lib/otb/applications -maxdepth 1 -type f -exec file {} \; | grep -i elf|cut -f1 -d':')
# run patchelf
for app_file in $OTB_APP_FILES; do
#echo "adding rpath to $app_file"
if [ -f "$app_file" ]; then
"$PATCH_ELF_EXE" "--set-rpath" "$OUT_DIR/lib" "$app_file"
fi
done
cat > "$OUT_DIR/monteverdi.sh" << EOF
#!/bin/sh
......
......@@ -74,8 +74,8 @@ function(func_install_xdk_files)
#file(GLOB ITK_EXTRA_DLL_FILES_1 "${DEPENDENCIES_INSTALL_DIR}/bin/libITK*.dll")
#install(FILES ${ITK_EXTRA_DLL_FILES_1} DESTINATION ${PKG_STAGE_DIR}/bin)
#file(GLOB ITK_EXTRA_DLL_FILES_2 "${DEPENDENCIES_INSTALL_DIR}/bin/libitk*.dll")
#install(FILES ${ITK_EXTRA_DLL_FILES_2} DESTINATION ${PKG_STAGE_DIR}/bin)
file(GLOB ITK_EXTRA_DLL_FILES_2 "${DEPENDENCIES_INSTALL_DIR}/bin/itk*.dll")
install(FILES ${ITK_EXTRA_DLL_FILES_2} DESTINATION ${PKG_STAGE_DIR}/bin)
#file(GLOB OPENCV_EXTRA_DLL_FILES "${DEPENDENCIES_INSTALL_DIR}/bin/libopencv*.dll")
#install(FILES ${OPENCV_EXTRA_DLL_FILES} DESTINATION ${PKG_STAGE_DIR}/bin)
......
......@@ -307,7 +307,6 @@ function(func_prepare_package)
endfunction() #func_prepare_package
function(func_process_deps input_file)
search_library(${input_file} PKG_SEARCHDIRS input_file_full_path)
if(NOT input_file_full_path)
message(FATAL_ERROR "${input_file} not found. searched in ${PKG_SEARCHDIRS}")
......@@ -455,9 +454,11 @@ function(pkg_install_rule src_file)
message(FATAL_ERROR "unreachable code")
endif()
set(SKIP_INSTALL FALSE)
setif_value_in_list(is_gtk_lib "${src_file_NAME}" ALLOWED_SYSTEM_DLLS)
if(is_gtk_lib)
set(output_dir "lib/gtk")
set(SKIP_INSTALL TRUE)
endif()
#special case
......@@ -465,19 +466,18 @@ function(pkg_install_rule src_file)
set(output_dir "lib/otb/applications")
set(file_type PROGRAMS)
endif()
set(SKIP_INSTALL FALSE)
if(PKG_GENERATE_XDK)
if ("${src_file_NAME}"
MATCHES
"libOTB|libotb|otbApp|otbapp_|otbTest|libMonteverdi|monteverdi|mapla|iceViewer"
"([Oo][Tt][Bb])|([Mm]onteverdi)|mapla|iceViewer"
)
set(SKIP_INSTALL TRUE)
message("SKIP_INSTALL for ${src_file_NAME}")
endif()
if(is_gtk_lib)
set(SKIP_INSTALL TRUE)
endif()
endif()
......
......@@ -75,12 +75,32 @@ function(search_library input_file pkg_searchdirs result)
endfunction()
macro(add_to_symlink_list src_file target_file)
#TODO: avoid code duplication here and later in install_rule
set(SKIP_INSTALL FALSE)
if(PKG_GENERATE_XDK)
get_filename_component(src_file_NAME ${src_file} NAME)
setif_value_in_list(is_gtk_lib "${src_file_NAME}" ALLOWED_SYSTEM_DLLS)
if ("${src_file_NAME}"
MATCHES
"libOTB|libotb|otbApp|otbapp_|otbTest|libMonteverdi|monteverdi|mapla|iceViewer"
)
set(SKIP_INSTALL TRUE)
endif()
if(is_gtk_lib)
set(SKIP_INSTALL TRUE)
endif()
endif(PKG_GENERATE_XDK)
# NOTE: $OUT_DIR is set actually in pkgsetup.in. So don't try
# any pre-mature optimization on that variable names
if(NOT SKIP_INSTALL)
file(APPEND
${CMAKE_BINARY_DIR}/make_symlinks_temp
"ln -sf $OUT_DIR/lib/${src_file} $OUT_DIR/lib/${target_file}\n"
)
"if [ -f \"\$OUT_DIR/lib/${src_file}\" ]; then \n ln -sf \"$OUT_DIR/lib/${src_file}\" \"$OUT_DIR/lib/${target_file}\" \n fi;\n"
)
endif()
endmacro()
function(check_for_gtk_libs input_file result)
......
diff -burN InsightToolkit-4.10.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt InsightToolkit-4.10.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2016-12-06 16:03:06.000000000 +0100
+++ InsightToolkit-4.10.0/Modules/ThirdParty/VNL/src/vxl/core/CMakeLists.txt 2016-12-06 16:03:44.000000000 +0100
@@ -131,8 +131,10 @@
set(CORE_VIDEO_FOUND OFF CACHE INTERNAL "VXL core video libraries built")
endif ()
+if(BUILD_TESTING)
# common test executable
add_subdirectory(testlib)
+endif()
# Tests that check and output the vxl configuration
# NOTE: some external projects remove the tests directory (aka ITK)
Description: Fix build failure with GCC 6: no match for 'operator<<'.
Author: Rashad M <rashadkm@gmail.com>
Origin: https://trac.osgeo.org/ossim/attachment/ticket/2354/fix-ossim-trac-2354.diff
Bug-Debian: https://bugs.debian.org/811851
Bug: https://trac.osgeo.org/ossim/ticket/2354
--- a/ossim/src/ossim/elevation/ossimElevManager.cpp
+++ b/ossim/src/ossim/elevation/ossimElevManager.cpp
@@ -643,14 +643,26 @@ std::ostream& ossimElevManager::print(os
<< "\nm_useGeoidIfNullFlag = "<<m_useGeoidIfNullFlag
<< "\nm_currentDatabaseIdx = "<<m_currentDatabaseIdx
<< "\nm_dbRoundRobin.size = "<<m_dbRoundRobin.size();
+
for (ossim_uint32 i=0; i<m_dbRoundRobin.size(); ++i)
{
out<<"\nm_dbRoundRobin["<<i<<"].size = "<<m_dbRoundRobin[i].size()<<endl;
for (ossim_uint32 j=0; j<m_dbRoundRobin[i].size(); ++j)
- out<<"m_dbRoundRobin["<<i<<"]["<<j<<"] = "<<m_dbRoundRobin[i][j]->print(out)<<endl;
+ {
+ out<<"m_dbRoundRobin["<<i<<"]["<<j<<"] = ";
+ // GP: We have to separate this line. On MS it will not compile
+ // otherwise
+ m_dbRoundRobin[i][j]->print(out);
+
+ }
+ out<<endl;
}
- cout<<"\n"<<ossimElevSource::print(cout);
+ out<<"\n";
+ ossimElevSource::print(out);
return out;
+
+
+
}
--- a/ossim/src/ossim/elevation/ossimElevSource.cpp
+++ b/ossim/src/ossim/elevation/ossimElevSource.cpp
@@ -269,8 +269,9 @@ std::ostream& ossimElevSource::print(std
<< "\ntheMaxHeightAboveMSL = "<<theMaxHeightAboveMSL
<< "\ntheNullHeightValue = "<<theNullHeightValue
<< "\ntheSeaLevelValue = "<<theSeaLevelValue
- << "\ntheGroundRect = "<<theGroundRect
- << ossimSource::print(out);
+ << "\ntheGroundRect = "<<theGroundRect;
+ // GP: need this by itself. MS errors out
+ ossimSource::print(out);
return out;
}
diff -burN qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/linux.conf qt-everywhere-opensource-src-4.8.7/mkspecs/common/linux.conf
--- qt-everywhere-opensource-src-4.8.7.orig/mkspecs/common/linux.conf 2016-12-07 11:19:59.964124979 +0100
+++ qt-everywhere-opensource-src-4.8.7/mkspecs/common/linux.conf 2016-12-07 11:22:29.116132748 +0100
@@ -1,7 +1,7 @@
#
# qmake configuration for common linux
#
-
+QMAKE_CXXFLAGS += -w -std=c++98
QMAKE_CFLAGS_THREAD += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD
......@@ -63,11 +63,11 @@ QT_INSTALL_TRANSLATIONS:PATH=${XDK_INSTALL_DIR}/translations
QT_MOC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/moc
QT_UIC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/uic
QT_RCC_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/rcc
QT_LRELEASE_EXECUTABLE:FILEPATH=${XDK_INSTALL_DIR}/bin/lrelease
QT_INSTALL_PLUGINS:PATH=${XDK_INSTALL_DIR}/plugins
QT_INSTALL_HEADERS:PATH=${XDK_INSTALL_DIR}/include
QMAKE_MKSPECS:PATH=${XDK_INSTALL_DIR}/mkspecs
"
)
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${INITIAL_CACHE})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment