Commit ba8884b9 authored by Rashad Kanavath's avatar Rashad Kanavath

Merge remote-tracking branch 'origin/develop' into msvc_support

parents 6c02571f 2a7af90a
......@@ -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()
......
......@@ -28,5 +28,10 @@ export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
# Source GDAL_DATA, EPSG_CSV
if [ -f $CURRENT_SCRIPT_DIR/env_exports ]; then
. $CURRENT_SCRIPT_DIR/env_exports
fi
# start the application
$OTB_CLI_LAUNCHER "$@"
......@@ -28,5 +28,10 @@ export OTB_APPLICATION_PATH
# avoid numerical issues caused by locale
export LC_NUMERIC=C
# Source GDAL_DATA, EPSG_CSV
if [ -f $CURRENT_SCRIPT_DIR/env_exports ]; then
. $CURRENT_SCRIPT_DIR/env_exports
fi
# start the application
$OTB_GUI_LAUNCHER "$@"
......@@ -158,7 +158,9 @@ private:
filter->SetClassFieldName(this->GetParameterString("field"));
filter->SetOutputFieldPrefix(namePrefix);
filter->SetOutputFieldNames(nameList);
filter->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));
AddProcess(filter->GetStreamer(),"Extracting sample values...");
filter->Update();
output->SyncToDisk();
......
......@@ -264,6 +264,10 @@ private:
m_RateCalculator->ClearRates();
m_Periodic->GetFilter()->ClearOutputs();
m_Random->GetFilter()->ClearOutputs();
// Setup ram
m_Periodic->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));
m_Random->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));
m_ReaderStat->SetFileName(this->GetParameterString("instats"));
ClassCountMapType classCount = m_ReaderStat->GetStatisticMapByName<ClassCountMapType>("samplesPerClass");
......
......@@ -131,7 +131,7 @@ private:
SetParameterDescription("interpolator.bco", "Bicubic interpolation leads to very good image quality but is slow.");
AddParameter(ParameterType_Radius, "interpolator.bco.radius", "Radius for bicubic interpolation");
SetParameterDescription("interpolator.bco.radius","This parameter allows controling the size of the bicubic interpolation filter. If the target pixel size is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts.");
SetParameterDescription("interpolator.bco.radius","This parameter allows controlling the size of the bicubic interpolation filter. If the target pixel size is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts.");
SetDefaultParameterInt("interpolator.bco.radius", 2);
AddChoice("interpolator.nn", "Nearest Neighbor interpolation");
......
......@@ -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);
......
......@@ -166,14 +166,14 @@ private :
void OutputsDimensions();
std::vector<std::string> m_Expression;
std::vector<ParserType::Pointer> m_VParser;
std::vector< std::vector<ParserType::Pointer> > m_VParser;
std::vector< std::vector<adhocStruct> > m_AImage;
std::vector< adhocStruct > m_VVarName;
std::vector< adhocStruct > m_VAllowedVarNameAuto;
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;
......
......@@ -63,6 +63,7 @@ public:
/** Convenient type definitions */
typedef ParserX ParserXType;
typedef mup::Value ValueType;
typedef mup::IValue IValueType;
/** Set the expression to be parsed */
virtual void SetExpr(const std::string & Expression);
......@@ -70,6 +71,9 @@ public:
/** Trigger the parsing */
ValueType Eval();
/** Trigger the parsing but return a const ref */
const IValueType & EvalRef();
/** Define a variable */
void DefineVar(const std::string &sName, ValueType *fVar);
......
......@@ -40,6 +40,7 @@ public:
/** Convenient type definitions */
typedef mup::Value ValueType;
typedef mup::IValue IValueType;
typedef mup::ParserError ExceptionType;
/** Initialize user defined constants */
......@@ -117,6 +118,19 @@ public:
return result;
}
const IValueType & EvalRef()
{
try
{
return m_MuParserX.Eval();
}
catch(ExceptionType &e)
{
ExceptionHandler(e);
}
return m_NullValue;
}
/** Define a variable */
void DefineVar(const std::string &sName, ValueType *fVar)
......@@ -228,6 +242,7 @@ public:
protected:
ParserXImpl()
{
m_NullValue = ValueType(0.0);
InitFun();
InitConst();
}
......@@ -248,6 +263,8 @@ private:
mup::ParserX m_MuParserX;
ValueType m_NullValue;
}; // end class
......@@ -277,6 +294,11 @@ ParserX::ValueType ParserX::Eval()
return m_InternalParserX->Eval();
}
const ParserX::IValueType & ParserX::EvalRef()
{
return m_InternalParserX->EvalRef();
}
void ParserX::DefineVar(const std::string &sName, ValueType *fVar)
{
m_InternalParserX->DefineVar(sName, fVar);
......
......@@ -85,15 +85,26 @@ int otbBandMathXImageFilter( int itkNotUsed(argc), char* itkNotUsed(argv) [])
IteratorType it2(image2, region);
IteratorType it3(image3, region);
ImageType::PixelType val1, val2, val3;
val1.SetSize(D1);
val2.SetSize(D2);
val3.SetSize(D3);
for (it1.GoToBegin(), it2.GoToBegin(), it3.GoToBegin(); !it1.IsAtEnd(); ++it1, ++it2, ++it3)
{
ImageType::IndexType i1 = it1.GetIndex();
ImageType::IndexType i2 = it2.GetIndex();
ImageType::IndexType i3 = it3.GetIndex();
it1.Get()[0] = i1[0] + i1[1] -50; it1.Get()[1] = i1[0] * i1[1] -50; it1.Get()[2] = i1[0] / (i1[1]+1)+5;
it2.Get()[0] = i2[0] * i2[1];
it3.Get()[0] = i3[0] + i3[1] * i3[1];
val1[0] = i1[0] + i1[1] -50;
val1[1] = i1[0] * i1[1] -50;
val1[2] = i1[0] / (i1[1]+1)+5;
val2[0] = i2[0] * i2[1];
val3[0] = i3[0] + i3[1] * i3[1];
it1.Set(val1);
it2.Set(val2);
it3.Set(val3);
}
......@@ -118,8 +129,6 @@ int otbBandMathXImageFilter( int itkNotUsed(argc), char* itkNotUsed(argv) [])
std::cout << "\n--- Standard Use\n";
std::cout << "Parsed Expression : " << filter->GetExpression(0) << std::endl;
//Sub-test 1
IteratorType itoutput1(output1, region);
......
......@@ -113,7 +113,7 @@ bool RADImageIO::CanReadFile(const char* filename)
}
//Read header information
bool lResult = InternalReadHeaderInformation(lFileName, header_file, false);
bool lResult = InternalReadHeaderInformation(lFileName, header_file, true);
header_file.close();
return (lResult);
}
......
......@@ -73,7 +73,7 @@ public:
* It interfaces with an ImageIO class to read in the data and
* supports streaming (partial reading) if the source dataset does so.
*
* ImageFileReader supports extended filenames, which allow controling
* ImageFileReader supports extended filenames, which allow controlling
* how the source dataset is read. See
* http://wiki.orfeo-toolbox.org/index.php/ExtendedFileName for more
* information.
......@@ -179,6 +179,9 @@ private:
*/
bool GetGdalReadImageFileName(const std::string& filename, std::string& GdalFileName);
// Retrieve the real source file name if derived dataset */
std::string GetDerivedDatasetSourceFileName(const std::string& filename) const;
ImageFileReader(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
......
......@@ -24,6 +24,7 @@
#include "otbSystem.h"
#include <itksys/SystemTools.hxx>
#include <fstream>
#include <string>
#include "itkImageIOFactory.h"
#include "itkPixelTraits.h"
......@@ -40,6 +41,9 @@
namespace otb
{
static const char DerivedSubdatasetPrefix[] = "DERIVED_SUBDATASET:";
static const size_t DerivedSubdatasetPrefixLength = sizeof(DerivedSubdatasetPrefix);
template<class T>
bool PixelIsComplex(const std::complex<T>& /*dummy*/)
{
......@@ -258,8 +262,8 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
}
// Update FileName
this->m_FileName = lFileName;
std::string lFileNameOssimKeywordlist = this->m_FileName;
std::string lFileNameOssimKeywordlist = GetDerivedDatasetSourceFileName(m_FileName);
// Test if the file exists and if it can be opened.
// An exception will be thrown otherwise.
......@@ -524,6 +528,27 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
}
template <class TOutputImage, class ConvertPixelTraits>
std::string
ImageFileReader<TOutputImage, ConvertPixelTraits>
::GetDerivedDatasetSourceFileName(const std::string & filename) const
{
const size_t dsds_pos = filename.find(DerivedSubdatasetPrefix);
if(dsds_pos != std::string::npos)
{
// Derived subdataset from gdal
const size_t alg_pos = filename.find(":",dsds_pos+DerivedSubdatasetPrefixLength);
if (alg_pos != std::string::npos)
{
std::string sourceFilename = filename.substr(alg_pos+1,filename.size() - alg_pos);
return sourceFilename;
}
}
return filename;
}
template <class TOutputImage, class ConvertPixelTraits>
void
ImageFileReader<TOutputImage, ConvertPixelTraits>
......@@ -536,13 +561,15 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
return;
}
std::string fileToCheck = GetDerivedDatasetSourceFileName(m_FileName);
// Test if the file exists.
if (!itksys::SystemTools::FileExists(this->m_FileName.c_str()))
if (!itksys::SystemTools::FileExists(fileToCheck.c_str()))
{
otb::ImageFileReaderException e(__FILE__, __LINE__);
std::ostringstream msg;
msg << "The file doesn't exist. "
<< std::endl << "Filename = " << this->m_FileName
<< std::endl << "Filename = " << fileToCheck
<< std::endl;
e.SetDescription(msg.str().c_str());
throw e;
......@@ -551,16 +578,16 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
// Test if the file can be open for reading access.
//Only if m_FileName specify a filename (not a dirname)
if (itksys::SystemTools::FileExists(this->m_FileName.c_str(), true) == true)
if (itksys::SystemTools::FileExists(fileToCheck.c_str(), true))
{
std::ifstream readTester;
readTester.open(this->m_FileName.c_str());
readTester.open(fileToCheck.c_str());
if (readTester.fail())
{
readTester.close();
std::ostringstream msg;
msg << "The file couldn't be opened for reading. "
<< std::endl << "Filename: " << this->m_FileName
<< std::endl << "Filename: " << fileToCheck
<< std::endl;
otb::ImageFileReaderException e(__FILE__, __LINE__, msg.str().c_str(), ITK_LOCATION);
throw e;
......@@ -619,7 +646,6 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
//Supprime l'extension
GdalFileName = System::GetRootName(strFileName);
}
else
{
// Sinon le filename est le nom du fichier a ouvrir
......@@ -627,6 +653,7 @@ ImageFileReader<TOutputImage, ConvertPixelTraits>
}
fic_trouve = true;
}
otbMsgDevMacro(<< "lFileNameGdal : " << GdalFileName.c_str());
otbMsgDevMacro(<< "fic_trouve : " << fic_trouve);
return (fic_trouve);
......
......@@ -43,7 +43,7 @@ namespace otb
* ImageFileWriter will write directly the streaming buffer in the image file, so
* that the output image never needs to be completely allocated
*
* ImageFileWriter supports extended filenames, which allow controling
* ImageFileWriter supports extended filenames, which allow controlling
* some properties of the output file. See
* http://wiki.orfeo-toolbox.org/index.php/ExtendedFileName for more
* information.
......
......@@ -177,6 +177,16 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
// clean temporary inputs
this->m_InMemoryInputs.clear();
unsigned int numberOfThreads = this->GetNumberOfThreads();
unsigned int actualNumberOfThreads = numberOfThreads;
if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
{
actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
}
// gather temporary outputs and write to output
const otb::ogr::DataSource* vectors = this->GetOGRData();
itk::TimeProbe chrono;
......@@ -198,7 +208,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
for (unsigned int thread=0 ; thread < this->GetNumberOfThreads() ; thread++)
for (unsigned int thread=0 ; thread < actualNumberOfThreads ; thread++)
{
ogr::Layer inLayer = this->m_InMemoryOutputs[thread][count]->GetLayerChecked(0);
if (!inLayer)
......@@ -250,7 +260,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
TInputImage* outputImage = this->GetOutput();
RegionType requestedRegion = outputImage->GetRequestedRegion();
ogr::Layer layer = this->m_InMemoryInputs[threadid]->GetLayerChecked(0);
ogr::Layer layer = this->m_InMemoryInputs.at(threadid)->GetLayerChecked(0);
if (! layer)
{
return;
......@@ -292,14 +302,14 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
case wkbPoint25D:
{
OGRPoint* castPoint = dynamic_cast<OGRPoint*>(geom);
if (castPoint == NULL) break;
if (castPoint == ITK_NULLPTR) break;
imgPoint[0] = castPoint->getX();
imgPoint[1] = castPoint->getY();
const TInputImage* img = this->GetInput();
const TMaskImage* mask = this->GetMask();
img->TransformPhysicalPointToIndex(imgPoint,imgIndex);
if ((mask == NULL) || mask->GetPixel(imgIndex))
if ((mask == ITK_NULLPTR) || mask->GetPixel(imgIndex))
{
this->ProcessSample(feature, imgIndex, imgPoint, threadid);
}
......@@ -310,7 +320,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
{
OGRLineString* castLineString = dynamic_cast<OGRLineString*>(geom);
if (castLineString == NULL) break;
if (castLineString == ITK_NULLPTR) break;
this->ProcessLine(feature,castLineString,region,threadid);
break;
}
......@@ -318,7 +328,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
case wkbPolygon25D:
{
OGRPolygon* castPolygon = dynamic_cast<OGRPolygon*>(geom);
if (castPolygon == NULL) break;
if (castPolygon == ITK_NULLPTR) break;
this->ProcessPolygon(feature,castPolygon,region,threadid);
break;
}
......@@ -625,17 +635,24 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
unsigned int numberOfThreads = this->GetNumberOfThreads();
unsigned int actualNumberOfThreads = numberOfThreads;
if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
{
actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
}
// prepare temporary input : split input features between available threads
this->m_InMemoryInputs.clear();
std::string tmpLayerName("thread");
OGRSpatialReference * oSRS = NULL;
OGRSpatialReference * oSRS = ITK_NULLPTR;
if (inLayer.GetSpatialRef())
{
oSRS = inLayer.GetSpatialRef()->Clone();
}
OGRFeatureDefn &layerDefn = inLayer.GetLayerDefn();
std::vector<ogr::Layer> tmpLayers;
for (unsigned int i=0 ; i < numberOfThreads ; i++)
for (unsigned int i=0 ; i < actualNumberOfThreads ; i++)
{
ogr::DataSource::Pointer tmpOgrDS = ogr::DataSource::New();
ogr::Layer tmpLayer = tmpOgrDS->CreateLayer(
......@@ -655,7 +672,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
this->DispatchInputVectors(inLayer,tmpLayers);
inLayer.SetSpatialFilter(NULL);
inLayer.SetSpatialFilter(ITK_NULLPTR);
}
template<class TInputImage, class TMaskImage>
......@@ -685,9 +702,17 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
{
// Prepare in-memory outputs
unsigned int numberOfThreads = this->GetNumberOfThreads();
unsigned int actualNumberOfThreads = numberOfThreads;
if(numberOfThreads > this->GetOutput()->GetRequestedRegion().GetSize()[1])
{
actualNumberOfThreads = this->GetOutput()->GetRequestedRegion().GetSize()[1];
}
this->m_InMemoryOutputs.clear();
std::string tmpLayerName("threadOut");
for (unsigned int i=0 ; i < numberOfThreads ; i++)
for (unsigned int i=0 ; i < actualNumberOfThreads ; i++)
{
std::vector<OGRDataPointer> tmpContainer;
// iterate over outputs, only process ogr::DataSource
......@@ -700,7 +725,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
ogr::Layer realLayer = realOutput->GetLayersCount() == 1
? realOutput->GetLayer(0)
: realOutput->GetLayer(m_OutLayerName);
OGRSpatialReference * oSRS = NULL;
OGRSpatialReference * oSRS = ITK_NULLPTR;
if (realLayer.GetSpatialRef())
{
oSRS = realLayer.GetSpatialRef()->Clone();
......@@ -755,7 +780,7 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
{
std::string projectionRefWkt = this->GetInput()->GetProjectionRef();
bool projectionInformationAvailable = !projectionRefWkt.empty();
OGRSpatialReference * oSRS = NULL;
OGRSpatialReference * oSRS = ITK_NULLPTR;
if(projectionInformationAvailable)
{
oSRS = static_cast<OGRSpatialReference *>(OSRNewSpatialReference(projectionRefWkt.c_str()));
......
......@@ -98,9 +98,7 @@ SIXSTraits::ComputeAtmosphericParameters(
otb_6s_integer iinf =
static_cast<otb_6s_integer>((wlinf - (float) .25) / SIXSStepOfWavelengthSpectralBandValues + (float) 1.5);
otb_6s_integer cpt = iinf - 1;
otb_6s_doublereal * s(ITK_NULLPTR);
s = new otb_6s_doublereal[S_6S_SIZE];
memset(s, 0, S_6S_SIZE * sizeof(otb_6s_doublereal));
otb_6s_doublereal s[S_6S_SIZE];
const ValuesVectorType& FilterFunctionValues6S = WavelengthSpectralBand->GetFilterFunctionValues6S();
// Set the values of FilterFunctionValues6S in s between [iinf-1; isup]
for (unsigned int i = 0; i < FilterFunctionValues6S.size() && cpt < S_6S_SIZE; ++i)
......@@ -127,8 +125,6 @@ SIXSTraits::ComputeAtmosphericParameters(
&tdif_up_ray,
&tdif_up_aer);
otbMsgDevMacro(<< "Done call 6S main function!");
delete[] s;
s = ITK_NULLPTR;
}
catch (std::bad_alloc& err)
{
......
......@@ -241,7 +241,7 @@ OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateData()
{
std::vector<std::string> options;
std::vector<double> foreground(nbBands,m_ForegroundValue);
std::vector<double> foreground(nbBands*m_SrcDataSetLayers.size(),m_ForegroundValue);
if(m_BurnAttributeMode)
{
......
......@@ -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();
......
......@@ -5,12 +5,15 @@ otb_module_test()
#include_directories(${PROJECT_SOURCE_DIR}/Modules/ThirdParty/OssimPlugins/src/ossim ${OSSIM_INCLUDE_DIR})
#==== UT for utilities
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
add_executable(ossimStringUtilitiesTest ossimStringUtilitiesTest.cpp)
target_link_libraries(ossimStringUtilitiesTest
otbossimplugins
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
otb_module_target_label(ossimStringUtilitiesTest)
otb_add_test(NAME ossimStringUtilitiesTest COMMAND ossimStringUtilitiesTest )
#this test is failing on osx due to a bug in AppleClang stdc++ (Luc Hermitte)
if(NOT APPLE)
add_executable(ossimStringUtilitiesTest ossimStringUtilitiesTest.cpp)
target_link_libraries(ossimStringUtilitiesTest
otbossimplugins
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
otb_module_target_label(ossimStringUtilitiesTest)
otb_add_test(NAME ossimStringUtilitiesTest COMMAND ossimStringUtilitiesTest )
endif()
add_executable(ossimTimeUtilitiesTest ossimTimeUtilitiesTest.cpp)
target_link_libraries(ossimTimeUtilitiesTest
......
......@@ -26,6 +26,7 @@
#include <algorithm>
#include <sstream>
#include <iostream>
#include <vector>
#include "sptw.h"
......
......@@ -26,6 +26,7 @@
#include "itkLogger.h"
#include "otbWrapperMacros.h"
#include "otbWrapperInputImageParameter.h"
#include "otbWrapperInputImageListParameter.h"
#include "otbWrapperOutputImageParameter.h"
#include "otbWrapperComplexInputImageParameter.h"
#include "otbWrapperComplexOutputImageParameter.h"
......@@ -403,6 +404,93 @@ public:
*/
std::vector<std::string> GetParameterStringList(std::string parameter);
/**
* Set the input image parameter as an ImageBase * instead
* of filename. Useful to connect pipelines between different
* application instances.
* \in parameter The parameter key
* \in inputImage ImageBase pointer to use as input
* \throw itk::Exception if parameter is not found or not an
* InputImageParameter
*/
void SetParameterInputImage(std::string parameter, InputImageParameter::ImageBaseType * inputImage);
/**
* Get the output image parameter as an ImageBase * instead
* of writing to disk. Useful to connect pipelines between different
* application instances.
* \in parameter The parameter key
* \return The ImageBase * to the output image
* \throw itk::Exception if parameter is not found or not an
* OutputImageParameter
*/
OutputImageParameter::ImageBaseType * GetParameterOutputImage(std::string parameter);
/**
* Set the input complex image parameter as an ImageBase * instead
* of filename. Useful to connect pipelines between different
* application instances.