Commit 9bc715b6 authored by Guillaume Pasero's avatar Guillaume Pasero

MRG: Merge bugfixes from 'release-6.4' into develop

parents 430fc734 2e4016aa
......@@ -243,22 +243,21 @@ OFF the CMake variable OTB\_USE\_EXTERNAL\_ITK.
OTB compilation and Windows platform
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To build OTB on Windows, we highly recommend using OSGeo4W which
provides all the necessary dependencies.
Currently it is not possible to build OTB in Debug when using the
dependencies provided by OSGeo4W. If you want to build OTB in Debug for
Windows, you will need to build and install manually each dependency
needed by OTB. You should use the same compiler for all the
dependencies, as much as possible.
Therefore, we highly recommend you to use OSGeo4W shell environment to
build OTB. You can use the 32 or 64 bit installer, since OSGeo4W
provides all the necessary dependencies in the two cases. Please follow
carefully the procedure provided in the Software Guide.
Typically, when using the dependencies provided by OSGeo4W, compile OTB
in Release or RelWithDebInfo mode.
To build OTB on Windows, you should prepare an environment with the following
tools:
* Visual Studio 2015 or later
* CMake 3.1 or later
* OTB XDK : download a Windows binary package of OTB and use the supplied
uninstall script to remove OTB binaries and headers. Now, this package only
contains the dependencies needed to build OTB.
Then, you can download OTB sources (preferably, a version compatible with your
XDK), and compile them as a standard CMake project. More details are available
in the SoftwareGuide.
There is an other solution, using OSGeo4W distribution. However, the
dependencies may be outdated.
Using OTB
---------
......
......@@ -39,8 +39,8 @@ archive is extracted, the directory structure consists of:
- ``share``: A folder containing common resources and copyright
mentions.
- ``tool``: A folder containing usefull scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the depedencies.
- ``tool``: A folder containing useful scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the dependencies.
The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize your environment
......
......@@ -28,8 +28,8 @@ Contents of OTB-|release|-Darwin64 is briefly listed below:
- ``share``: A folder containing common resources and copyright
mentions.
- ``tool``: A folder containing usefull scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the depedencies.
- ``tool``: A folder containing useful scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the dependencies.
The applications can be launched from the Mapla launcher. If you want to
use the otbcli and otbgui launchers, you can initialize your environment
......@@ -90,6 +90,7 @@ A: You can get this error at startup running Monteverdi.app or Mapla.app. The
solution is to run in a terminal the following command:
::
xcode-select --install
And then try to restart Monteverdi or Mapla.
......@@ -21,8 +21,8 @@ and their launchers (both command line and graphical launchers are provided):
- ``include``: A folder containing all the necessary headers to compile OTB
based projects.
- ``tool``: A folder containing usefull scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the depedencies.
- ``tool``: A folder containing useful scripts to test the installation or
to uninstall OTB libraries and headers while keeping all the dependencies.
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
......
......@@ -41,7 +41,7 @@ You can apply this transformation with the *ContrastEnhancement* application:
-out output_image.tif
-spatial global
It allows to compress the dynamic without loosing details and contrast.
It allows to compress the dynamic without losing details and contrast.
Advanced parameters
~~~~~~~~~~~~~~~~~~~
......
......@@ -5,6 +5,7 @@ Alexis Huck (Magellium),
Amit Kulkarni,
Andreas Tile (Debian GIS),
Angelos Tzotsos,
Antoine Regimbeau (CS),
Antonio Valentino,
Aur\'elien Bricier (CS),
Caroline Ruffel (CS),
......
......@@ -324,7 +324,7 @@ directory, which in our case is \texttt{~/OTB/install/bin/}. For example:
will launch the command line version of the \textbf{ExtractROI} application,
while:
\begin{verbatim}
./OTB/install/bin/otbgui_ExtractROI
~/OTB/install/bin/otbgui_ExtractROI
\end{verbatim}
will launch the graphical version.
......@@ -420,7 +420,7 @@ $ make install
\hline
\textbf{OTB\_USE\_CURL} & OTBCurl & \\
\hline
\textbf{OTB\_USE\_MUPARSER} & OTBMuParser & OTBMathParser OTBDempsterShafer OTBAppClassification OTBAppMathParser OTBAppStereo OTBAppProjection OTBAppSegmentation OTBAppClassification OTBRoadExtraction OTBRCC8 OTBCCOBIA OTBAppSegmentation OTBMeanShift OTBAppSegmentation OTBMeanShift OTBAppSegmentation \\
\textbf{OTB\_USE\_MUPARSER} & OTBMuParser & OTBMathParser OTBDempsterShafer OTBAppClassification OTBAppMathParser OTBAppStereo OTBAppProjection OTBAppSegmentation OTBRoadExtraction OTBRCC8 OTBCCOBIA OTBMeanShift \\
\hline
\textbf{OTB\_USE\_MUPARSERX} & OTBMuParserX & OTBMathParserX OTBAppMathParserX \\
\hline
......
......@@ -151,7 +151,7 @@ private:
SetName("ContrastEnhancement");
SetDescription("This application is the implementation of the histogram "
"equalization algorithm. It can be used to enhance contrast in an image "
"or to reduce the dynamic of th image without loosing too much contrast. "
"or to reduce the dynamic of the image without losing too much contrast. "
"It offers several options as a no data value, "
"a contrast limitation factor, a local version of the algorithm and "
"also a mode to equalized the luminance of the image.");
......@@ -704,7 +704,7 @@ private:
void ComputeLuminance( const FloatVectorImageType::Pointer inImage ,
std::vector < unsigned int > rgb )
{
// Retreive coeffs for each channel
// Retrieve coeffs for each channel
std::vector < float > lumCoef( 3 , 0.0 );
lumCoef[0] = GetParameterFloat("mode.lum.red.coef");
lumCoef[1] = GetParameterFloat("mode.lum.green.coef");
......@@ -828,7 +828,7 @@ private:
}
}
// Threshold function that is normaly done in ComputeHistoFilter and here is
// Threshold function that is normally done in ComputeHistoFilter and here is
// used on the output of HistoPersistentFilterType.
void Threshold( HistoPersistentFilterType::HistogramListType * histoList ,
unsigned int nbBin )
......
......@@ -51,7 +51,7 @@ private:
{
SetName("VertexComponentAnalysis");
SetDescription("Given a set of mixed spectral vectors, estimate"
"reference subtances also known as endmembers using the Vertex"
"reference substances also known as endmembers using the Vertex"
"Component Analysis algorithm.");
// Documentation
......@@ -59,7 +59,7 @@ private:
SetDocLongDescription("Apply the Vertex Component Analysis [1] to"
"an hyperspectral image to extract endmembers. Given a set of mixed"
"spectral vectors (multispectral or hyperspectral), the application"
"estimates the spectral signature of reference subtances also known"
"estimates the spectral signature of reference substances also known"
"as endmembers.");
SetDocLimitations("None");
SetDocAuthors("OTB-Team");
......
......@@ -252,6 +252,7 @@ private:
if ( HasValue("in") )
{
ImageType* inImage = GetParameterImage("in");
inImage->UpdateOutputInformation();
ImageType::RegionType largestRegion = inImage->GetLargestPossibleRegion();
bool userExtent = !HasUserValue( "mode.extent.ulx" ) \
......@@ -385,7 +386,9 @@ private:
region.SetIndex(1, GetParameterInt("starty"));
if ( HasValue("in") )
{
if (region.Crop(GetParameterImage("in")->GetLargestPossibleRegion()))
ImageType* inImage = GetParameterImage("in");
inImage->UpdateOutputInformation();
if (region.Crop(inImage->GetLargestPossibleRegion()))
{
SetParameterInt("sizex",region.GetSize(0), HasUserValue("sizex"));
SetParameterInt("sizey",region.GetSize(1), HasUserValue("sizey"));
......@@ -426,19 +429,15 @@ private:
ImageType * inImage = GetParameterImage("in");
FloatVectorImageType::IndexType uli , lri;
bool startin = inImage->TransformPhysicalPointToIndex(ulp,uli);
bool sizein = inImage->TransformPhysicalPointToIndex(lrp,lri);
if ( startin )
{
SetParameterInt( "startx", uli[0] , true );
SetParameterInt( "starty", uli[1] , true );
}
if( startin && sizein )
{
SetParameterInt( "sizex", lri[0] - uli[0] + 1, true );
SetParameterInt( "sizey", lri[1] - uli[1] + 1, true );
}
inImage->TransformPhysicalPointToIndex(ulp,uli);
inImage->TransformPhysicalPointToIndex(lrp,lri);
SetParameterInt( "startx", uli[0] , true );
SetParameterInt( "starty", uli[1] , true );
SetParameterInt( "sizex", lri[0] - uli[0] + 1, true );
SetParameterInt( "sizey", lri[1] - uli[1] + 1, true );
}
else if( GetParameterString( "mode.extent.unit" ) == "lonlat" )
{
......@@ -456,21 +455,16 @@ private:
lrp_out = rsTransform->TransformPoint(lrp_in);
FloatVectorImageType::IndexType uli_out , lri_out;
bool startin = inImage->TransformPhysicalPointToIndex(ulp_out,uli_out);
bool sizein = inImage->TransformPhysicalPointToIndex(lrp_out,lri_out);
inImage->TransformPhysicalPointToIndex(ulp_out,uli_out);
inImage->TransformPhysicalPointToIndex(lrp_out,lri_out);
if ( startin )
{
SetParameterInt( "startx", uli_out[0] , true );
SetParameterInt( "starty", uli_out[1] , true );
}
if( startin && sizein )
{
SetParameterInt( "sizex", lri_out[0] - uli_out[0] + 1, true );
SetParameterInt( "sizey", lri_out[1] - uli_out[1] + 1, true );
}
}
SetParameterInt( "startx", uli_out[0] , true );
SetParameterInt( "starty", uli_out[1] , true );
SetParameterInt( "sizex", lri_out[0] - uli_out[0] + 1, true );
SetParameterInt( "sizey", lri_out[1] - uli_out[1] + 1, true );
}
this->CropRegionOfInterest();
}
void
......@@ -685,10 +679,10 @@ private:
ImageType* inImage = GetParameterImage("in");
inImage->UpdateOutputInformation();
if ( HasValue( "mode.fit.vect" ) && GetParameterString("mode") == "fit" )
if ( HasValue( "mode.fit.vect" ) && GetParameterString("mode") == "fit")
{
otb::ogr::DataSource::Pointer ogrDS;
ogrDS = otb::ogr::DataSource::New(GetParameterString("in") ,
ogrDS = otb::ogr::DataSource::New(GetParameterString("mode.fit.vect") ,
otb::ogr::DataSource::Modes::Read);
double ulx, uly, lrx, lry;
bool extentAvailable = true;
......@@ -724,40 +718,50 @@ private:
if (extentAvailable)
{
RSTransformType::Pointer rsTransform = RSTransformType::New();
rsTransform->SetInputProjectionRef(inputProjectionRef);
rsTransform->SetInputProjectionRef( inputProjectionRef );
rsTransform->SetOutputKeywordList( inImage->GetImageKeywordlist() );
rsTransform->SetOutputProjectionRef( inImage->GetProjectionRef() );
rsTransform->InstantiateTransform();
itk::Point<float, 2> ulp_in, lrp_in , ulp_out , lrp_out;
itk::Point<float, 2> ulp_in , urp_in , llp_in , lrp_in ,
ulp_out , urp_out , llp_out , lrp_out;
ulp_in[ 0 ] = ulx ;
ulp_in[ 1 ] = uly ;
urp_in[ 0 ] = ulx ;
urp_in[ 1 ] = lry ;
llp_in[ 0 ] = lrx ;
llp_in[ 1 ] = ulx ;
lrp_in[ 0 ] = lrx ;
lrp_in[ 1 ] = lry ;
ulp_out = rsTransform->TransformPoint(ulp_in);
urp_out = rsTransform->TransformPoint(urp_in);
llp_out = rsTransform->TransformPoint(llp_in);
lrp_out = rsTransform->TransformPoint(lrp_in);
FloatVectorImageType::IndexType uli_out , uri_out , lli_out , lri_out;
FloatVectorImageType::IndexType uli_out , lri_out;
bool startin , sizein ;
startin = inImage->TransformPhysicalPointToIndex(ulp_out,uli_out);
sizein = inImage->TransformPhysicalPointToIndex(lrp_out,lri_out);
if ( startin )
{
SetParameterInt( "startx", uli_out[0] , false );
SetParameterInt( "starty", uli_out[1] , false );
}
if( startin && sizein )
{
SetParameterInt( "sizey", lri_out[1] - uli_out[1] + 1 , false );
SetParameterInt( "sizex", lri_out[0] - uli_out[0] + 1 , false );
}
}
inImage->TransformPhysicalPointToIndex(ulp_out,uli_out);
inImage->TransformPhysicalPointToIndex(urp_out,uri_out);
inImage->TransformPhysicalPointToIndex(llp_out,lli_out);
inImage->TransformPhysicalPointToIndex(lrp_out,lri_out);
FloatVectorImageType::IndexType uli, lri;
uli[0] = std::min( std::min( uli_out[0] , uri_out[0] ) ,
std::min( lli_out[0] , lri_out[0] ) );
uli[1] = std::min( std::min( uli_out[1] , uri_out[1] ) ,
std::min( lli_out[1] , lri_out[1] ) );
lri[0] = std::max( std::max( uli_out[0] , uri_out[0] ) ,
std::max( lli_out[0] , lri_out[0] ) );
lri[1] = std::max( std::max( uli_out[1] , uri_out[1] ) ,
std::max( lli_out[1] , lri_out[1] ) );
SetParameterInt( "startx", uli[0] , false );
SetParameterInt( "starty", uli[1] , false );
SetParameterInt( "sizex", lri[0] - uli[0] , false );
SetParameterInt( "sizey", lri[1] - uli[1] , false );
}
}
if( HasValue( "mode.fit.im" ) && GetParameterString( "mode" ) == "fit" )
else if( HasValue( "mode.fit.im" ) && GetParameterString( "mode" ) == "fit" )
{
// Setup the DEM Handler
otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
......@@ -820,9 +824,9 @@ private:
SetParameterInt("sizex",lri[0]-uli[0]);
SetParameterInt("sizey",lri[1]-uli[1]);
this->CropRegionOfInterest();
}
this->CropRegionOfInterest();
m_ExtractROIFilter = ExtractROIFilterType::New();
m_ExtractROIFilter->SetInput(inImage);
......
......@@ -91,7 +91,7 @@ private:
{
SetName("OrthoRectification");
std::ostringstream oss;
oss << "This application allows to ortho-rectify optical and radar images from supported sensors." << std::endl;
oss << "This application allows ortho-rectifying optical and radar images from supported sensors." << std::endl;
SetDescription(oss.str());
// Documentation
SetDocName("Ortho-rectification");
......
......@@ -115,7 +115,7 @@ private:
" geometry.\n\n"
"There are several ways to set the elevation source:\n"
" * An arbitrary constant elevation\n"
" * A DEM directoy\n"
" * A DEM directory\n"
" * Compute an average elevation from a DEM\n\n"
"If needed, the application can compute inverse resampling grids (from "
"epipolar to original sensor geometry). Don't forget to check the other "
......
......@@ -89,7 +89,7 @@ private:
AddParameter(ParameterType_InputImage, "in", "Support image");
SetParameterDescription("in","Image defining the reference coordinate "
"system in which the tranform is applied. Both projected and sensor "
"system in which the transform is applied. Both projected and sensor "
"images are supported.");
// Transform Group
......
......@@ -107,7 +107,7 @@ private:
HistoType & targetHisto ) ;
//TODO Give the opportunity to choose the histogram target
/** Check whether the input histogram has enought pixel to be meaningful */
/** Check whether the input histogram has enough pixel to be meaningful */
bool IsValid(const HistoType & inputHisto ) ;
double m_Min;
......
......@@ -109,7 +109,7 @@ MachineLearningModel<TInputValue,TOutputValue,TConfidenceValue>
nb_threads = omp_get_num_threads();
threadId = omp_get_thread_num();
nb_batches = std::min(nb_threads,(unsigned int)input->Size());
// Ensure that we do not spawn unncessary threads
// Ensure that we do not spawn unnecessary threads
if(threadId<nb_batches)
{
unsigned int batch_size = ((unsigned int)input->Size()/nb_batches);
......
......@@ -139,6 +139,9 @@ protected:
*/
void DispatchInputVectors(void) ITK_OVERRIDE;
/** Fill the output vectors with a special ordering (class partition) */
void FillOneOutput(unsigned int outIdx, ogr::DataSource* outDS, bool update) ITK_OVERRIDE;
private:
PersistentOGRDataToSamplePositionFilter(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
......
......@@ -308,6 +308,55 @@ PersistentOGRDataToSamplePositionFilter<TInputImage,TMaskImage,TSampler>
}
}
template<class TInputImage, class TMaskImage, class TSampler>
void
PersistentOGRDataToSamplePositionFilter<TInputImage,TMaskImage,TSampler>
::FillOneOutput(unsigned int outIdx, ogr::DataSource* outDS, bool update)
{
ogr::Layer outLayer = outDS->GetLayersCount() == 1
? outDS->GetLayer(0)
: outDS->GetLayer(this->GetOutLayerName());
OGRErr err = outLayer.ogr().StartTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
// output vectors sorted by class
for (auto& label : m_ClassPartition)
{
ogr::Layer inLayer = this->GetInMemoryOutput(label.second,outIdx);
if (!inLayer)
{
continue;
}
// This test only uses 1 input, not compatible with multiple OGRData inputs
for(auto tmpIt = inLayer.begin(); tmpIt!=inLayer.end(); ++tmpIt)
{
if( label.first.compare(tmpIt->ogr().GetFieldAsString(this->GetFieldIndex())) != 0 )
continue;
if(update)
{
outLayer.SetFeature( *tmpIt );
}
else
{
ogr::Feature dstFeature(outLayer.GetLayerDefn());
dstFeature.SetFrom( *tmpIt, TRUE );
outLayer.CreateFeature( dstFeature );
}
}
}
err = outLayer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
}
// -------------- otb::OGRDataToSamplePositionFilter --------------------------
template<class TInputImage, class TMaskImage, class TSampler>
......
......@@ -165,6 +165,9 @@ protected:
/** Gather the content of in-memory output layer into the filter outputs */
virtual void GatherOutputVectors(void);
/** Fill output vectors for a particular output */
virtual void FillOneOutput(unsigned int outIdx, ogr::DataSource* outDS, bool update);
/** Utility method to add new fields on an output layer */
virtual void InitializeOutputDataSource(ogr::DataSource* inputDS, ogr::DataSource* outputDS);
......
......@@ -275,8 +275,6 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
// clean temporary inputs
this->m_InMemoryInputs.clear();
unsigned int numberOfThreads = this->GetNumberOfThreads();
// gather temporary outputs and write to output
const otb::ogr::DataSource* vectors = this->GetOGRData();
otb::Stopwatch chrono = otb::Stopwatch::StartNew();
......@@ -287,58 +285,67 @@ PersistentSamplingFilterBase<TInputImage,TMaskImage>
this->itk::ProcessObject::GetOutput(k));
if (realOutput)
{
ogr::Layer outLayer = realOutput->GetLayersCount() == 1
? realOutput->GetLayer(0)
: realOutput->GetLayer(m_OutLayerName);
this->FillOneOutput(count, realOutput, bool(vectors == realOutput));
count++;
}
}
OGRErr err = outLayer.ogr().StartTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
chrono.Stop();
otbMsgDebugMacro(<< "Writing OGR points took " << chrono.GetElapsedMilliseconds() << " ms");
this->m_InMemoryOutputs.clear();
}
for (unsigned int thread=0 ; thread < numberOfThreads ; thread++)
{
ogr::Layer inLayer = this->m_InMemoryOutputs[thread][count]->GetLayerChecked(0);
if (!inLayer)
{
continue;
}
template <class TInputImage, class TMaskImage>
void
PersistentSamplingFilterBase<TInputImage,TMaskImage>
::FillOneOutput(unsigned int outIdx, ogr::DataSource* outDS, bool update)
{
ogr::Layer outLayer = outDS->GetLayersCount() == 1
? outDS->GetLayer(0)
: outDS->GetLayer(m_OutLayerName);
ogr::Layer::const_iterator tmpIt = inLayer.begin();
// This test only uses 1 input, not compatible with multiple OGRData inputs
if (vectors == realOutput)
{
// Update mode
for(; tmpIt!=inLayer.end(); ++tmpIt)
{
outLayer.SetFeature( *tmpIt );
}
}
else
{
// Copy mode
for(; tmpIt!=inLayer.end(); ++tmpIt)
{
ogr::Feature dstFeature(outLayer.GetLayerDefn());
dstFeature.SetFrom( *tmpIt, TRUE );
outLayer.CreateFeature( dstFeature );
}
}
}
OGRErr err = outLayer.ogr().StartTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to start transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
err = outLayer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
unsigned int numberOfThreads = this->GetNumberOfThreads();
for (unsigned int thread=0 ; thread < numberOfThreads ; thread++)
{
ogr::Layer inLayer = this->m_InMemoryOutputs[thread][outIdx]->GetLayerChecked(0);
if (!inLayer)
{
continue;
}
ogr::Layer::const_iterator tmpIt = inLayer.begin();
// This test only uses 1 input, not compatible with multiple OGRData inputs
if (update)
{
// Update mode
for(; tmpIt!=inLayer.end(); ++tmpIt)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << outLayer.ogr().GetName() << ".");
outLayer.SetFeature( *tmpIt );
}
}
else
{
// Copy mode
for(; tmpIt!=inLayer.end(); ++tmpIt)
{
ogr::Feature dstFeature(outLayer.GetLayerDefn());
dstFeature.SetFrom( *tmpIt, TRUE );
outLayer.CreateFeature( dstFeature );
}
count++;
}
}
chrono.Stop();
otbMsgDebugMacro(<< "Writing OGR points took " << chrono.GetElapsedMilliseconds() << " ms");
this->m_InMemoryOutputs.clear();
err = outLayer.ogr().CommitTransaction();
if (err != OGRERR_NONE)
{
itkExceptionMacro(<< "Unable to commit transaction for OGR layer " << outLayer.ogr().GetName() << ".");
}
}
template <class TInputImage, class TMaskImage>
......
......@@ -554,21 +554,39 @@ SimpleParallelTiffWriter<TInputImage>
geotransform[5] = inputPtr->GetSignedSpacing()[1];
// Call SPTW routine that creates the output raster
SPTW_ERROR sperr = create_generic_raster(m_FileName,
inputPtr->GetLargestPossibleRegion().GetSize()[0],
inputPtr->GetLargestPossibleRegion().GetSize()[1],
nBands,
dataType,
geotransform,
inputPtr->GetProjectionRef(),
block_size_x,
m_TiffTiledMode);
if (sperr != sptw::SP_None)
if(!m_TiffTiledMode)
{
itkExceptionMacro(<<"Error creating raster");
otb::MPIConfig::Instance()->abort(EXIT_FAILURE);
SPTW_ERROR sperr = sptw::create_raster(m_FileName,
inputPtr->GetLargestPossibleRegion().GetSize()[0],
inputPtr->GetLargestPossibleRegion().GetSize()[1],
nBands,
dataType,
geotransform,
inputPtr->GetProjectionRef());
if (sperr != sptw::SP_None)
{
itkExceptionMacro(<<"Error creating raster");
otb::MPIConfig::Instance()->abort(EXIT_FAILURE);
}
}
else
{
SPTW_ERROR sperr = sptw::create_tiled_raster(m_FileName,
inputPtr->GetLargestPossibleRegion().GetSize()[0],
inputPtr->GetLargestPossibleRegion().GetSize()[1],
nBands,
dataType,
geotransform,
inputPtr->GetProjectionRef(),
block_size_x);
if (sperr != sptw::SP_None)
{
itkExceptionMacro(<<"Error creating raster");
otb::MPIConfig::Instance()->abort(EXIT_FAILURE);
}
}
}
// Wait for rank 0 to finish creating the output raster
......
......@@ -40,7 +40,23 @@ int otbSarDeburstFilterTest(int itkNotUsed(argc), char * argv[])
writer->SetInput(filter->GetOutput());
writer->SetFileName(argv[2]);
writer->Update();
// check that there is now a single burst in data
reader = ReaderType::New();
reader->SetFileName(argv[2]);
reader->UpdateOutputInformation();
unsigned int nb_bursts = atoi(reader->GetOutput()->GetImageKeywordlist().GetMetadataByKey("support_data.geom.bursts.number").c_str());
if(nb_bursts != 1)
{
std::cerr<<"Error: more than 1 burst ("<<nb_bursts<<" bursts) found in output metadata."<<std::endl;
}
else
{
std::cout<<"Metadata have a single burst as expected."<<std::endl;
}
return EXIT_SUCCESS;
}
......@@ -25,6 +25,8 @@ attributes are for each band of the input image : mean, standard-deviation,
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 master
GIT_REPOSITORY https://github.com/gpo-geo/SertitObject
GIT_TAG 4e6c46b239760b206d4cee379c0e90ee33abf613
)
# use a temporary fork because pull request #8 not merged yet
......@@ -25,5 +25,5 @@ A more detailed description can be found on the project website:
https://github.com/Laadr/otbFFSforGMM
"
GIT_REPOSITORY https://github.com/Laadr/otbFFSforGMM.git
GIT_TAG master
GIT_TAG f9aa7988fc399d8713f9e28fac15e637a783be6e
)
......@@ -12,5 +12,5 @@ A more detailed description can be found on the project website:
http://tully.ups-tlse.fr/lassallep/grm
"
GIT_REPOSITORY https://github.com/orfeotoolbox/GRM
GIT_TAG develop
GIT_TAG c53a61d12b895a85c3909130021988730c309cb7
)
......@@ -215,7 +215,7 @@ LabelImageToOGRDataSourceFilter<TInputImage>
//Call GDALPolygonize()
char ** options;
options = ITK_NULLPTR;
char * option[1];
char * option[2]= { nullptr , nullptr } ;
if (m_Use8Connected == true)