Commit 68dba38a authored by Cresson Remi's avatar Cresson Remi

REFAC: replace vcl_xxx with std:xxx

parent 4267592c
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
// image utils // image utils
#include "otbTensorflowCommon.h" #include "otbTensorflowCommon.h"
#include <algorithm>
namespace otb namespace otb
{ {
...@@ -211,7 +212,7 @@ public: ...@@ -211,7 +212,7 @@ public:
// Check the smallest number of samples amongst classes // Check the smallest number of samples amongst classes
IndexValueType min_elem_in_class = itk::NumericTraits<IndexValueType>::max(); IndexValueType min_elem_in_class = itk::NumericTraits<IndexValueType>::max();
for (LabelImageType::InternalPixelType classIdx = 0 ; classIdx < number_of_classes ; classIdx++) 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 one class is empty, throw an error
if (min_elem_in_class == 0) if (min_elem_in_class == 0)
......
...@@ -224,8 +224,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage> ...@@ -224,8 +224,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage>
} }
// Set final size // Set final size
m_OutputSize[0] = vcl_floor( (extentSup[0] - extentInf[0]) / vcl_abs(m_OutputSpacing[0]) ) + 1; m_OutputSize[0] = std::floor( (extentSup[0] - extentInf[0]) / std::abs(m_OutputSpacing[0]) ) + 1;
m_OutputSize[1] = vcl_floor( (extentSup[1] - extentInf[1]) / vcl_abs(m_OutputSpacing[1]) ) + 1; m_OutputSize[1] = std::floor( (extentSup[1] - extentInf[1]) / std::abs(m_OutputSpacing[1]) ) + 1;
// Set final origin // Set final origin
m_OutputOrigin[0] = extentInf[0]; m_OutputOrigin[0] = extentInf[0];
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "itkProcessObject.h" #include "itkProcessObject.h"
#include "itkNumericTraits.h" #include "itkNumericTraits.h"
#include "itkSimpleDataObjectDecorator.h" #include "itkSimpleDataObjectDecorator.h"
#include <algorithm>
// Base // Base
#include "otbTensorflowMultisourceModelBase.h" #include "otbTensorflowMultisourceModelBase.h"
......
...@@ -124,7 +124,7 @@ TensorflowMultisourceModelLearningBase<TInputImage> ...@@ -124,7 +124,7 @@ TensorflowMultisourceModelLearningBase<TInputImage>
{ {
// Batches loop // 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; const IndexValueType rest = m_NumberOfSamples % m_BatchSize;
itk::ProgressReporter progress(this, 0, nBatches); itk::ProgressReporter progress(this, 0, nBatches);
......
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