Commit 675db684 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'develop' into develop_daniel

parents 73668e40 3e0c0de1
......@@ -287,7 +287,7 @@ int main(int argc, char* argv[])
{
writer->Update();
}
catch (itk::ExceptionObject e)
catch ( itk::ExceptionObject & e )
{
std::cerr << "Error: " << e << std::endl;
}
......
......@@ -114,6 +114,10 @@ private:
SetParameterDescription("numberbands", "Number of bands");
SetParameterRole("numberbands", Role_Output);
AddParameter(ParameterType_String,"datatype","Data type");
SetParameterDescription("datatype", "Data type");
SetParameterRole("datatype", Role_Output);
AddParameter(ParameterType_String,"sensor","Sensor id");
SetParameterDescription("sensor", "Sensor identifier");
SetParameterRole("sensor", Role_Output);
......@@ -267,6 +271,15 @@ private:
//Get number of bands
SetParameterInt("numberbands",inImage->GetNumberOfComponentsPerPixel());
ossOutput << "\tNumber of bands : " << GetParameterInt("numberbands") << std::endl;
// Get data type
ImageIOBase::IOComponentType typeInfo(ImageIOBase::UNKNOWNCOMPONENTTYPE);
itk::ExposeMetaData< ImageIOBase::IOComponentType >( inImage->GetMetaDataDictionary(),
MetaDataKey::DataType , typeInfo);
const std::string dataTypeAsString = ImageIOBase::GetComponentTypeAsString(typeInfo);
SetParameterString("datatype", dataTypeAsString);
ossOutput << "\tData type : " << GetParameterString("datatype") << std::endl;
std::vector<bool> noDataValueAvailable;
bool ret = itk::ExposeMetaData<std::vector<bool> >(inImage->GetMetaDataDictionary(),MetaDataKey::NoDataValueAvailable,noDataValueAvailable);
......@@ -299,7 +312,7 @@ private:
SetParameterInt("indexx",inImage->GetLargestPossibleRegion().GetIndex()[0]);
SetParameterInt("indexy",inImage->GetLargestPossibleRegion().GetIndex()[1]);
ossOutput << "\tStart index : [" << GetParameterInt("indexx") << "," << GetParameterInt("indexy") << "]" << std::endl;
ossOutput << "\tStart index : [" << GetParameterInt("indexx") << "," << GetParameterInt("indexy") << "]" << std::endl;
//Get image size
SetParameterInt("sizex",inImage->GetLargestPossibleRegion().GetSize()[0]);
......
......@@ -204,7 +204,7 @@ public:
/** Convenience method returns the IOComponentType as a string. This can be
* used for writing output files. */
std::string GetComponentTypeAsString(IOComponentType) const;
static std::string GetComponentTypeAsString(IOComponentType);
/** Convenience method returns the IOPixelType as a string. This can be
* used for writing output files. */
......
......@@ -739,7 +739,7 @@ std::string ImageIOBase::GetByteOrderAsString(ByteOrder t) const
}
}
std::string ImageIOBase::GetComponentTypeAsString(IOComponentType t) const
std::string ImageIOBase::GetComponentTypeAsString(IOComponentType t)
{
std::string s;
switch(t)
......
......@@ -30,7 +30,7 @@ int otbImageToEdgePathFilter(int itkNotUsed(argc), char * argv[])
{
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
const unsigned int foreground((const unsigned int) ::atoi(argv[3]));
const unsigned int foreground = atoi(argv[3]);
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
......
......@@ -119,7 +119,7 @@ void CoordinateToName::DoEvaluate()
m_Curl->RetrieveUrlInMemory(urlStream.str(), m_CurlOutput);
m_IsValid = true;
}
catch(itk::ExceptionObject)
catch( itk::ExceptionObject & )
{
m_IsValid = false;
}
......
......@@ -107,7 +107,7 @@ void PlaceNameToLonLat::RetrieveXML(const std::ostringstream& urlStream)
m_RequestSucceed = true;
m_Curl->RetrieveUrlInMemory(urlStream.str(), m_CurlOutput);
}
catch(itk::ExceptionObject)
catch( itk::ExceptionObject & )
{
m_RequestSucceed = false;
}
......
......@@ -57,7 +57,7 @@ int otbImageToOSMVectorDataGenerator(int argc, char * argv[])
{
parser->ParseCommandLine(argc, argv, parseResult);
}
catch ( itk::ExceptionObject )
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -65,7 +65,7 @@ int otbOSMToVectorDataGeneratorByName (int argc, char * argv[])
{
parser->ParseCommandLine(argc, argv, parseResult);
}
catch ( itk::ExceptionObject )
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -80,7 +80,7 @@ typename StandardDSCostFunction<TDSValidationFilter>
{
internalFunctionGT->SetDescriptorModels(descModel);
}
catch (itk::ExceptionObject /*& err*/)
catch ( itk::ExceptionObject & )
{
return 1;
}
......
......@@ -30,10 +30,11 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#pragma clang diagnostic ignored "-Wdivision-by-zero"
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
#include "otb_shark.h"
......
......@@ -29,9 +29,10 @@
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
#include "otb_shark.h"
......
......@@ -125,11 +125,11 @@ public:
* vector should be same as the number of component (or classes).
* Choose between SetInitialProportions, SetClassLabels or
* SetNumberOfComponents */
void SetInitialProportions(ProportionVectorType& propotion);
ProportionVectorType* GetInitialProportions();
void SetInitialProportions(ProportionVectorType& proportions);
itkGetConstReferenceMacro(InitialProportions,ProportionVectorType);
/** Gets the result proportion values */
ProportionVectorType* GetProportions();
itkGetConstReferenceMacro(Proportions,ProportionVectorType);
/** Set/Gets the initial segmentation. the size of the vector should be
* the same as the number of samples (length of MeasurementVector) */
......
......@@ -99,14 +99,6 @@ SEMClassifier<TInputImage, TOutputImage>
m_ExternalLabels = 0;
}
template<class TInputImage, class TOutputImage>
typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType*
SEMClassifier<TInputImage, TOutputImage>
::GetInitialProportions()
{
return m_InitialProportions;
}
template<class TInputImage, class TOutputImage>
void
SEMClassifier<TInputImage, TOutputImage>
......@@ -228,14 +220,6 @@ SEMClassifier<TInputImage, TOutputImage>
return m_ClassLabels;
}
template<class TInputImage, class TOutputImage>
typename SEMClassifier<TInputImage, TOutputImage>::ProportionVectorType*
SEMClassifier<TInputImage, TOutputImage>
::GetProportions()
{
return &m_Proportions;
}
template<class TInputImage, class TOutputImage>
void
SEMClassifier<TInputImage, TOutputImage>
......
......@@ -34,9 +34,10 @@
#pragma GCC diagnostic ignored "-Wcast-align"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
#include <shark/Models/Classifier.h>
......
......@@ -124,7 +124,7 @@ int otbConfusionMatrixCalculatorWrongSize(int argc, char* argv[])
{
calculator->Compute();
}
catch (itk::ExceptionObject)
catch ( itk::ExceptionObject & )
{
return EXIT_FAILURE;
}
......
......@@ -33,9 +33,10 @@
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wcast-align"
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wheader-guard"
#else
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#endif
......
......@@ -38,7 +38,7 @@ int otbAeronetExtractDataBadData(int itkNotUsed(argc), char * argv[])
{
reader->Update();
}
catch (itk::ExceptionObject e)
catch ( itk::ExceptionObject & )
{
return EXIT_SUCCESS;
}
......
......@@ -336,7 +336,14 @@ public:
virtual std::ostream& print(std::ostream& out) const override;
protected:
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
TYPE_DATA
#pragma clang diagnostic pop
#else
TYPE_DATA
#endif
/**
* Compute range and doppler frequency from an input point, sensor
......
......@@ -121,7 +121,7 @@ namespace ossimplugins
bool initImageSize(ossimIpt& imageSize) const;
virtual void imagingRay(ossimDpt const& image_point, ossimEcefRay& image_ray) const;
virtual void imagingRay(ossimDpt const& image_point, ossimEcefRay& image_ray) const override;
bool isSLC() const { return theSLC; }
bool isOCN() const { return theOCN; }
......@@ -141,8 +141,14 @@ namespace ossimplugins
theManifestDirectory = d;
}
protected:
TYPE_DATA;
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
TYPE_DATA
#pragma clang diagnostic pop
#else
TYPE_DATA
#endif
private:
bool read(ossimFilename const& annotationXml);
......
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