Commit 77d91841 authored by Julien Michel's avatar Julien Michel

Merge branch 'develop' into gdal_derived_sds_support

parents 5f20cd05 b5627f5a
......@@ -58,6 +58,9 @@ macro(otb_module_check otb-module _needed_by stack)
foreach(dep IN LISTS OTB_MODULE_${otb-module}_DEPENDS)
otb_module_check(${dep} ${otb-module} "${otb-module};${stack}")
endforeach()
foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
otb_module_check(${dep} ${otb-module} "${otb-module};${stack}")
endforeach()
set(check_finished_${otb-module} 1)
endif()
endmacro()
......
......@@ -37,7 +37,7 @@ bool
Spot6ImageMetadataInterface::CanRead() const
{
std::string sensorID = GetSensorID();
if (sensorID.find("SPOT 6") != std::string::npos)
if (sensorID.find("SPOT 6") != std::string::npos || sensorID.find("SPOT 7") != std::string::npos)
return true;
else
return false;
......@@ -789,7 +789,7 @@ Spot6ImageMetadataInterface
if (nbBands == 1)
{
//if (sensorId.find("PHR") != std::string::npos)
if (sensorId == "SPOT 6") // todo
if (sensorId == "SPOT 6" || sensorId == "SPOT 7") // todo: updated values for Spot7
{
const float pan[601] =
{
......@@ -1406,7 +1406,7 @@ Spot6ImageMetadataInterface
}
else if (nbBands > 1 && nbBands < 5)
{
if (sensorId == "SPOT 6") // todo
if (sensorId == "SPOT 6" || sensorId == "SPOT 7") // todo: updated values for Spot7
{
//band B0 (blue band)
const float b0[601] =
......
......@@ -226,12 +226,6 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
// support progress methods/callbacks
itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
input1Ptr->SetRequestedRegion(outputRegionForThread);
input2Ptr->SetRequestedRegion(outputRegionForThread);
input1Ptr->PropagateRequestedRegion();
input1Ptr->UpdateOutputData();
input2Ptr->PropagateRequestedRegion();
input2Ptr->UpdateOutputData();
itk::ImageRegionConstIterator<TInputImage> it1(input1Ptr, outputRegionForThread);
itk::ImageRegionConstIterator<TInputImage2> it2(input2Ptr, outputRegionForThread);
......
......@@ -173,7 +173,7 @@ private :
std::vector< adhocStruct > m_VAllowedVarNameAddedByUser;
std::vector< adhocStruct > m_VFinalAllowedVarName; // m_VFinalAllowedVarName = m_VAllowedVarNameAuto + m_VAllowedVarNameAddedByUser
std::vector< adhocStruct > m_VNotAllowedVarName;
std::vector< int > m_outputsDimensions;
std::vector< unsigned int > m_outputsDimensions;
unsigned int m_SizeNeighbourhood;
......
......@@ -1693,7 +1693,10 @@ namespace ossimplugins
ossimString metadataProfile;
if ( (nodeValue != "S6_SENSOR")
&& (nodeValue != "S6_ORTHO")
&& (nodeValue != "S6_MOSAIC") )
&& (nodeValue != "S6_MOSAIC")
&& (nodeValue != "S7_SENSOR")
&& (nodeValue != "S7_ORTHO")
&& (nodeValue != "S7_MOSAIC") )
{
if (traceDebug())
{
......@@ -1717,7 +1720,7 @@ namespace ossimplugins
if ((nodeValue == "PRODUCT"))
theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_PRODUCT;
else if ( (nodeValue == "RPC") && (metadataProfile == "S6_SENSOR") )
else if ( (nodeValue == "RPC") && ((metadataProfile == "S6_SENSOR") || (metadataProfile == "S7_SENSOR")) )
theMetadataSubProfile = OSSIM_Spot6_METADATA_SUBPROFILE_RPC;
else
{
......@@ -2156,7 +2159,9 @@ namespace ossimplugins
}
if (nodeValue == "6")
theSensorID = "SPOT 6";
theSensorID = "SPOT 6";
else if (nodeValue == "7")
theSensorID = "SPOT 7";
else
{
setErrorStatus();
......
# -*- coding: utf-8 -*-
#
# Example on the use of the Rescale
# Example on the use of the Rescale
#
from sys import argv
import otbApplication as otb
import os
import sys
if os.name == 'posix':
orig_dlopen_flags = sys.getdlopenflags()
try:
import dl
except ImportError:
try:
import DLFCN as dl
except ImportError:
dl = None
if dl:
sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
# now load the module !
import otbApplication as otb
sys.setdlopenflags(orig_dlopen_flags)
del dl
del orig_dlopen_flags
else:
import otbApplication as otb
app = otb.Registry.CreateApplication("Rescale")
app.SetParameterString("in", argv[1])
app.SetParameterString("in", sys.argv[1])
app.SetParameterFloat("outmin", 1)
app.SetParameterFloat("outmax", 100)
app.SetParameterString("out", argv[2] + ".tif")
app.SetParameterString("out", sys.argv[2] + ".tif")
app.ExecuteAndWriteOutput()
\ No newline at end of file
app.ExecuteAndWriteOutput()
......@@ -162,10 +162,4 @@ ExternalProject_Add(ITK
set(ITK_DIFF_FILES ${CMAKE_SOURCE_DIR}/patches/ITK/itk-1-fftw-all.diff)
if(UNIX AND NOT APPLE)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.2)
set (ITK_DIFF_FILES "${ITK_DIFF_FILES} ${CMAKE_SOURCE_DIR}/patches/ITK/itk-2-dlopen_gcc41-linux.diff")
endif()
endif()
SUPERBUILD_PATCH_SOURCE(ITK "" ${ITK_DIFF_FILES})
#Purpose: loading application via python fails This was due to exporting symbols from shared library
#GCC FAQ says to add RTLD_GLOBAL flag when using dlopen apart from -Wl,-E linker flags
diff -burN InsightToolkit-4.10.0.orig/Modules/ThirdParty/KWSys/src/KWSys/DynamicLoader.cxx InsightToolkit-4.10.0/Modules/ThirdParty/KWSys/src/KWSys/DynamicLoader.cxx
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/KWSys/src/KWSys/DynamicLoader.cxx 2016-08-17 11:32:27.000000000 +0200
+++ InsightToolkit-4.10.0/Modules/ThirdParty/KWSys/src/KWSys/DynamicLoader.cxx 2016-08-17 11:33:16.000000000 +0200
@@ -491,7 +491,7 @@
//----------------------------------------------------------------------------
DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const std::string& libname )
{
- return dlopen(libname.c_str(), RTLD_LAZY);
+ return dlopen(libname.c_str(), RTLD_LAZY | RTLD_GLOBAL );
}
//----------------------------------------------------------------------------
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