From 68dba38a651b4e4a095328572a3ffccd4217ee4f Mon Sep 17 00:00:00 2001 From: Remi Cresson Date: Wed, 1 May 2019 22:41:52 +0200 Subject: [PATCH] REFAC: replace vcl_xxx with std:xxx --- app/otbLabelImageSampleSelection.cxx | 3 ++- include/otbTensorflowMultisourceModelFilter.hxx | 4 ++-- include/otbTensorflowMultisourceModelLearningBase.h | 1 + include/otbTensorflowMultisourceModelLearningBase.hxx | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/otbLabelImageSampleSelection.cxx b/app/otbLabelImageSampleSelection.cxx index e1e023f..41d77e1 100644 --- a/app/otbLabelImageSampleSelection.cxx +++ b/app/otbLabelImageSampleSelection.cxx @@ -22,6 +22,7 @@ // image utils #include "otbTensorflowCommon.h" +#include namespace otb { @@ -211,7 +212,7 @@ public: // Check the smallest number of samples amongst classes IndexValueType min_elem_in_class = itk::NumericTraits::max(); for (LabelImageType::InternalPixelType classIdx = 0 ; classIdx < number_of_classes ; classIdx++) - min_elem_in_class = vcl_min(min_elem_in_class, number_of_samples[classIdx]); + min_elem_in_class = std::min(min_elem_in_class, number_of_samples[classIdx]); // If one class is empty, throw an error if (min_elem_in_class == 0) diff --git a/include/otbTensorflowMultisourceModelFilter.hxx b/include/otbTensorflowMultisourceModelFilter.hxx index dbed34f..b59752e 100644 --- a/include/otbTensorflowMultisourceModelFilter.hxx +++ b/include/otbTensorflowMultisourceModelFilter.hxx @@ -224,8 +224,8 @@ TensorflowMultisourceModelFilter } // Set final size - m_OutputSize[0] = vcl_floor( (extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0]) ) + 1; - m_OutputSize[1] = vcl_floor( (extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1]) ) + 1; + m_OutputSize[0] = std::floor( (extentSup[0] - extentInf[0]) / std::abs(m_OutputSpacing[0]) ) + 1; + m_OutputSize[1] = std::floor( (extentSup[1] - extentInf[1]) / std::abs(m_OutputSpacing[1]) ) + 1; // Set final origin m_OutputOrigin[0] = extentInf[0]; diff --git a/include/otbTensorflowMultisourceModelLearningBase.h b/include/otbTensorflowMultisourceModelLearningBase.h index f5ada7f..f72f376 100644 --- a/include/otbTensorflowMultisourceModelLearningBase.h +++ b/include/otbTensorflowMultisourceModelLearningBase.h @@ -14,6 +14,7 @@ #include "itkProcessObject.h" #include "itkNumericTraits.h" #include "itkSimpleDataObjectDecorator.h" +#include // Base #include "otbTensorflowMultisourceModelBase.h" diff --git a/include/otbTensorflowMultisourceModelLearningBase.hxx b/include/otbTensorflowMultisourceModelLearningBase.hxx index 55f0de3..e9ae654 100644 --- a/include/otbTensorflowMultisourceModelLearningBase.hxx +++ b/include/otbTensorflowMultisourceModelLearningBase.hxx @@ -124,7 +124,7 @@ TensorflowMultisourceModelLearningBase { // Batches loop - const IndexValueType nBatches = vcl_ceil(m_NumberOfSamples / m_BatchSize); + const IndexValueType nBatches = std::ceil(m_NumberOfSamples / m_BatchSize); const IndexValueType rest = m_NumberOfSamples % m_BatchSize; itk::ProgressReporter progress(this, 0, nBatches); -- GitLab