Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Lozac'h Loic
otbtf
Commits
68dba38a
Commit
68dba38a
authored
May 01, 2019
by
Cresson Remi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
REFAC: replace vcl_xxx with std:xxx
parent
4267592c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
app/otbLabelImageSampleSelection.cxx
app/otbLabelImageSampleSelection.cxx
+2
-1
include/otbTensorflowMultisourceModelFilter.hxx
include/otbTensorflowMultisourceModelFilter.hxx
+2
-2
include/otbTensorflowMultisourceModelLearningBase.h
include/otbTensorflowMultisourceModelLearningBase.h
+1
-0
include/otbTensorflowMultisourceModelLearningBase.hxx
include/otbTensorflowMultisourceModelLearningBase.hxx
+1
-1
No files found.
app/otbLabelImageSampleSelection.cxx
View file @
68dba38a
...
...
@@ -22,6 +22,7 @@
// image utils
#include "otbTensorflowCommon.h"
#include <algorithm>
namespace
otb
{
...
...
@@ -211,7 +212,7 @@ public:
// Check the smallest number of samples amongst classes
IndexValueType
min_elem_in_class
=
itk
::
NumericTraits
<
IndexValueType
>::
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
)
...
...
include/otbTensorflowMultisourceModelFilter.hxx
View file @
68dba38a
...
...
@@ -224,8 +224,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage>
}
// 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
];
...
...
include/otbTensorflowMultisourceModelLearningBase.h
View file @
68dba38a
...
...
@@ -14,6 +14,7 @@
#include "itkProcessObject.h"
#include "itkNumericTraits.h"
#include "itkSimpleDataObjectDecorator.h"
#include <algorithm>
// Base
#include "otbTensorflowMultisourceModelBase.h"
...
...
include/otbTensorflowMultisourceModelLearningBase.hxx
View file @
68dba38a
...
...
@@ -124,7 +124,7 @@ TensorflowMultisourceModelLearningBase<TInputImage>
{
// 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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment