Commit afb5b1d7 authored by Victor Poughon's avatar Victor Poughon

Merge branch 'develop' into widget_parents

Conflicts:
	Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetBoolParameter.h
parents 2aa793fb 9bdec1f7
---
Language: Cpp
BasedOnStyle: Mozilla
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 200
# ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: true
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 2
UseTab: Never
...
# http://EditorConfig.org
# top-most EditorConfig file
root = true
# Apply to all code files
[*]
# A newline ending every file
insert_final_newline = true
# Set default charset
charset = utf-8
# 4 space indentation
indent_style = space
indent_size = 2
# Various options
trim_trailing_whitespace = true
### Summary
#### Summary
Gives a short summary of the changes.
### Rationale
#### Rationale
Explain the rationale for the changes (possible link to a Request For Comments or to an issue).
### Implementation Details
#### Classes and files
#### Implementation Details
<!---
##### Classes and files
Give an overview of the implementation: main changes made to classes, files and modules. Do not paste complete diff, as it is available in the merge request already.
-->
#### Applications
<!---
##### Applications
Describe any changes made to existing applications, or new applications that have been added.
-->
#### Tests
<!---
##### Tests
Describe the testing strategy for new features.
-->
### Documentation
<!---
##### Documentation
List or link documentation modifications that were made (doxygen, example, Software Guide, application documentation, CookBook).
-->
#### Additional notes
### Additional notes
<!--- List remaining open issues if any, and additional notes. -->
List remaining open issues if any, and additional notes.
#### Copyright
### Copyright
The copyright owner is *COPYRIGHT OWNER (OR OWNER'S AGENT)* and has signed the ORFEO ToolBox Contributor License Agreement.
The copyright owner is *COPYRIGHT OWNER (OR OWNER'S AGENT)* and has signed the ORFEO ToolBox Contributor License Agreement
<hr>
***Check before merging:***
- All discussions are resolved
- At least 2 :thumbsup: votes from core developers, no :thumbsdown: vote.
- The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
\ No newline at end of file
......@@ -11,11 +11,29 @@ that they only affect default values, and that settings in extended
filenames, applications, monteverdi or custom C++ code might override
those values.
* ``OTB_DEM_DIRECTORY``: Default directory were DEM tiles are stored. It should only contain ```.hgt`` or or georeferenced ``.tif`` files. Empty if not set (no directory set)
* ``OTB_GEOID_FILE``: Default path to the geoid file that will be used to retrieve height of DEM above ellipsoid. Empty if not set (no geoid set)
* ``OTB_MAX_RAM_HINT``: Default maximum memory that OTB should use for processing, in MB. If not set, default value is 128 MB.
* ``OTB_LOGGER_LEVEL``: Default level of logging for OTB. Should be one of ``DEBUG``, ``INFO``, ``WARNING``, ``CRITICAL`` or ``FATAL``, by increasing order of priority. Only messages with a higher priority than the level of logging will be displayed. If not set, default level is ``INFO``.
* ``OTB_DEM_DIRECTORY``: Default directory were DEM tiles are
stored. It should only contain ```.hgt`` or or georeferenced
``.tif`` files. Empty if not set (no directory set)
* ``OTB_GEOID_FILE``: Default path to the geoid file that will be used
to retrieve height of DEM above ellipsoid. Empty if not set (no
geoid set)
* ``OTB_MAX_RAM_HINT``: Default maximum memory that OTB should use for
processing, in MB. If not set, default value is 128 MB.
* ``OTB_LOGGER_LEVEL``: Default level of logging for OTB. Should be
one of ``DEBUG``, ``INFO``, ``WARNING``, ``CRITICAL`` or ``FATAL``,
by increasing order of priority. Only messages with a higher
priority than the level of logging will be displayed. If not set,
default level is ``INFO``.
In addition to OTB specific environment variables, the following
environment variable are parsed by third party libraries and also
affect how OTB works:
* ``GDAL_CACHEMAX``: Gdal has an internal cache mechanism to avoid reading or decoding again image chunks. This environnement variable controls how much memory Gdal can use for caching. By default, Gdal can use up to 5 percents of available RAM on system, which may be a lot. Moreover, caching is only needed if the processing chain is likely to request the same chunk several times, which is not likely to happen for a standard pixel based OTB pipeline. Setting a lower value allows to allocate more memory to OTB itself (using applications ``-ram`` parameter or ``OTB_MAX_RAM_HINT`` environment variable). If value is small (less than 100 000, it is assumed to be in megabytes, otherwise, it is assumed to be in bytes.
* ``GDAL_NUM_THREADS``: Gdal can take advantage of multi-threading to decode some formats. This variable controls the number of threads Gdal is allowed to use.
* ``OPJ_NUM_THREADS``: OpenJpeg can take advantage of mutli-threading when decoding images. This variable controls the number of threads OpenJpeg is allowed to use.
* ``ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS``: This variable allows to control the number of threads used by ITK for processing.
.. _extended-filenames:
Extended filenames
......
......@@ -97,7 +97,7 @@ private:
// \code{DoInit()} method contains class information and description, parameter set up, and example values.
// Software Guide : EndLatex
void DoInit() ITK_OVERRIDE
void DoInit() override
{
// Software Guide : BeginLatex
......
......@@ -141,7 +141,7 @@ public:
protected:
MyChangeDetectorImageFilter() {}
~MyChangeDetectorImageFilter() ITK_OVERRIDE {}
~MyChangeDetectorImageFilter() override {}
private:
MyChangeDetectorImageFilter(const Self &); //purposely not implemented
......
......@@ -96,7 +96,7 @@ public:
itkTypeMacro(CompositeExampleImageFilter, itk::ImageToImageFilter);
/** Display */
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
void PrintSelf(std::ostream& os, itk::Indent indent) const override;
// Software Guide : BeginLatex
//
......@@ -135,7 +135,7 @@ protected:
RescalerType;
// Software Guide : EndCodeSnippet
void GenerateData() ITK_OVERRIDE;
void GenerateData() override;
private:
......
......@@ -65,7 +65,7 @@ private:
otb::ogr::UniqueGeometryPtr
ReprojectTransformationFunctor::operator()(OGRGeometry const* in) const
{
otb::ogr::UniqueGeometryPtr out(in ? in->clone() : ITK_NULLPTR);
otb::ogr::UniqueGeometryPtr out(in ? in->clone() : nullptr);
if (out)
{
const OGRErr err = out->transform(m_reprojector.get());
......@@ -102,11 +102,11 @@ protected:
/** Default constructor. */
MyReprojectionFilter(){ }
/** Destructor. */
~MyReprojectionFilter() ITK_OVERRIDE{ }
~MyReprojectionFilter() override{ }
private:
OGRSpatialReference* DoDefineNewLayerSpatialReference(otb::ogr::Layer const& itkNotUsed(source)) const ITK_OVERRIDE
OGRSpatialReference* DoDefineNewLayerSpatialReference(otb::ogr::Layer const& itkNotUsed(source)) const override
{
return m_osr.get();
}
......@@ -207,7 +207,7 @@ int main (int argc, char **argv)
otb::ogr::DataSource::Pointer output
= options.workingInplace ? input
: options.outputIsStdout ? ITK_NULLPTR
: options.outputIsStdout ? nullptr
: otb::ogr::DataSource::New( options.outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly);
std::cout << "input: " << otb::ogr::version_proxy::GetFileListAsStringVector(&input->ogr())[0] << " should be: " << options.inputFile << "\n";
if (output)
......@@ -234,7 +234,7 @@ int main (int argc, char **argv)
}
else
{
filter->UpdateOutputData(ITK_NULLPTR);
filter->UpdateOutputData(nullptr);
assert(filter->GetOutput() && "output not set");
filter->GetOutput()->Print(std::cout, 0);
}
......
......@@ -35,7 +35,7 @@ struct SwapXYFunctor
typedef OGRGeometry TransformedElementType;
otb::ogr::UniqueGeometryPtr operator()(OGRGeometry const* in) const
{
otb::ogr::UniqueGeometryPtr out(in ? in->clone() : ITK_NULLPTR);
otb::ogr::UniqueGeometryPtr out(in ? in->clone() : nullptr);
if (out)
{
#if GDAL_VERSION_NUM >= 1900
......@@ -74,7 +74,7 @@ int main (int argc, char **argv)
otb::ogr::DataSource::Pointer output
= workingInplace ? input
: outputIsStdout ? ITK_NULLPTR
: outputIsStdout ? nullptr
: otb::ogr::DataSource::New( outputFile, otb::ogr::DataSource::Modes::Update_LayerCreateOnly);
std::cout << "input: " << otb::ogr::version_proxy::GetFileListAsStringVector(&input->ogr())[0] << " should be: " << inputFile << "\n";
if (output)
......@@ -97,7 +97,7 @@ int main (int argc, char **argv)
}
else
{
filter->UpdateOutputData(ITK_NULLPTR);
filter->UpdateOutputData(nullptr);
assert(filter->GetOutput() && "output not set");
filter->GetOutput()->Print(std::cout, 0);
}
......
......@@ -109,7 +109,7 @@ int main(int argc, char * argv[])
otb::ogr::DataSource::Pointer destination = otb::ogr::DataSource::New(
argv[2], otb::ogr::DataSource::Modes::Update_LayerCreateOnly);
otb::ogr::Layer destLayer = destination->CreateLayer(
argv[2], ITK_NULLPTR, wkbMultiPolygon);
argv[2], nullptr, wkbMultiPolygon);
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......
......@@ -102,7 +102,7 @@ int main(int argc, char * argv[])
// Software Guide : EndCodeSnippet
char * fileNameIn = argv[1];
char * fileNameImgInit = ITK_NULLPTR;
char * fileNameImgInit = nullptr;
char * fileNameOut = argv[2];
int numberOfClasses = atoi(argv[3]);
int numberOfIteration = atoi(argv[4]);
......@@ -148,7 +148,7 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
if (fileNameImgInit != ITK_NULLPTR)
if (fileNameImgInit != nullptr)
{
typedef otb::ImageFileReader<OutputImageType> ImgInitReaderType;
ImgInitReaderType::Pointer segReader = ImgInitReaderType::New();
......
......@@ -408,7 +408,7 @@ int main(int itkNotUsed(argc), char* argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
if (actMapFileName != ITK_NULLPTR)
if (actMapFileName != nullptr)
{
ActivationWriterType::Pointer actWriter = ActivationWriterType::New();
actWriter->SetFileName(actMapFileName);
......
......@@ -155,8 +155,8 @@ int main(int argc, char* argv[])
orthoRectifFilter->SetDisplacementFieldSpacing(gridSpacing);
ImageType::PointType origin;
origin[0] = strtod(argv[5], ITK_NULLPTR);
origin[1] = strtod(argv[6], ITK_NULLPTR);
origin[0] = strtod(argv[5], nullptr);
origin[1] = strtod(argv[6], nullptr);
orthoRectifFilter->SetOutputOrigin(origin);
// Software Guide : EndCodeSnippet
......
......@@ -187,8 +187,8 @@ int main(int argc, char* argv[])
spacing[1] = -0.00001;
ImageType::PointType origin;
origin[0] = strtod(argv[3], ITK_NULLPTR); //longitude
origin[1] = strtod(argv[4], ITK_NULLPTR); //latitude
origin[0] = strtod(argv[3], nullptr); //longitude
origin[1] = strtod(argv[4], nullptr); //latitude
ImageType::RegionType region;
......
......@@ -81,12 +81,12 @@ public:
typedef itk::RegularStepGradientDescentOptimizer OptimizerType;
typedef const OptimizerType * OptimizerPointer;
void Execute(itk::Object *caller, const itk::EventObject& event) ITK_OVERRIDE
void Execute(itk::Object *caller, const itk::EventObject& event) override
{
Execute((const itk::Object *) caller, event);
}
void Execute(const itk::Object * object, const itk::EventObject& event) ITK_OVERRIDE
void Execute(const itk::Object * object, const itk::EventObject& event) override
{
OptimizerPointer optimizer =
dynamic_cast<OptimizerPointer>(object);
......
......@@ -100,12 +100,12 @@ public:
typedef itk::GradientDescentOptimizer OptimizerType;
typedef const OptimizerType * OptimizerPointer;
void Execute(itk::Object *caller, const itk::EventObject& event) ITK_OVERRIDE
void Execute(itk::Object *caller, const itk::EventObject& event) override
{
Execute((const itk::Object *) caller, event);
}
void Execute(const itk::Object * object, const itk::EventObject& event) ITK_OVERRIDE
void Execute(const itk::Object * object, const itk::EventObject& event) override
{
OptimizerPointer optimizer =
dynamic_cast<OptimizerPointer>(object);
......
......@@ -95,12 +95,12 @@ public:
typedef itk::RegularStepGradientDescentOptimizer OptimizerType;
typedef const OptimizerType * OptimizerPointer;
void Execute(itk::Object *caller, const itk::EventObject& event) ITK_OVERRIDE
void Execute(itk::Object *caller, const itk::EventObject& event) override
{
Execute((const itk::Object *) caller, event);
}
void Execute(const itk::Object * object, const itk::EventObject& event) ITK_OVERRIDE
void Execute(const itk::Object * object, const itk::EventObject& event) override
{
OptimizerPointer optimizer =
dynamic_cast<OptimizerPointer>(object);
......
......@@ -90,12 +90,12 @@ public:
typedef itk::RegularStepGradientDescentOptimizer OptimizerType;
typedef const OptimizerType * OptimizerPointer;
void Execute(itk::Object *caller, const itk::EventObject& event) ITK_OVERRIDE
void Execute(itk::Object *caller, const itk::EventObject& event) override
{
Execute((const itk::Object *) caller, event);
}
void Execute(const itk::Object * object, const itk::EventObject& event) ITK_OVERRIDE
void Execute(const itk::Object * object, const itk::EventObject& event) override
{
OptimizerPointer optimizer =
dynamic_cast<OptimizerPointer>(object);
......
......@@ -133,12 +133,12 @@ public:
protected:
ImageUniqueValuesCalculator()
{
m_Image = ITK_NULLPTR;
m_Image = nullptr;
}
~ImageUniqueValuesCalculator() ITK_OVERRIDE
~ImageUniqueValuesCalculator() override
{
}
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE
void PrintSelf(std::ostream& os, itk::Indent indent) const override
{
Superclass::PrintSelf(os, indent);
os << indent << "Image: " << m_Image.GetPointer() << std::endl;
......@@ -452,9 +452,9 @@ public:
protected:
TernaryFunctorImageFilterWithNBands() {}
~TernaryFunctorImageFilterWithNBands() ITK_OVERRIDE {}
~TernaryFunctorImageFilterWithNBands() override {}
void GenerateOutputInformation() ITK_OVERRIDE
void GenerateOutputInformation() override
{
Superclass::GenerateOutputInformation();
this->GetOutput()->SetNumberOfComponentsPerPixel( m_NumberOfOutputBands );
......@@ -472,7 +472,7 @@ private:
int main(int argc, char *argv[])
{
char *cmifname = ITK_NULLPTR;
char *cmifname = nullptr;
if (argc != 10)
{
if (argc == 11) // cloud mask filename optional parameter
......@@ -807,7 +807,7 @@ int main(int argc, char *argv[])
miReader->UpdateOutputInformation();
MaskImageType::Pointer maskImage = miReader->GetOutput();
if (cmifname != ITK_NULLPTR)
if (cmifname != nullptr)
{
MaskReaderType::Pointer cmiReader = MaskReaderType::New();
......
......@@ -142,8 +142,8 @@ int main(int argc, char* argv[])
spacing[1] = atof(argv[11]);
ImageType::PointType origin;
origin[0] = strtod(argv[6], ITK_NULLPTR);
origin[1] = strtod(argv[7], ITK_NULLPTR);
origin[0] = strtod(argv[6], nullptr);
origin[1] = strtod(argv[7], nullptr);