Skip to content

Commit 72b9dc1

Browse files
committed
COMP: Future proof vnl_math_XXX function usage.
Prefer C++ over aliased names vnl_math_[min|max] -> std::[min|max] Prefer vnl_math::abs over deprecated alias vnl_math_abs In all compilers currently supported by VXL, vnl_math_[min|max] could be replaced with std::[min|max] without loss of functionality. This also circumvents part of the backwards compatibility requirements as vnl_math_ has been recently replaced with a namespace of vnl_math::. Since Wed Nov 14 07:42:48 2012: The vnl_math_* functions use #define aliases to their vnl_math::* counterparts in the "real" vnl_math:: namespace. The new syntax should be backwards compatible to VXL versions as old as 2012. Prefer to use itk::Math:: over vnl_math:: namespace
1 parent 0f43c85 commit 72b9dc1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/itkArrivalFunctionToPathFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef itkArrivalFunctionToPathFilter_hxx
1919
#define itkArrivalFunctionToPathFilter_hxx
2020

21-
#include "vnl/vnl_math.h"
21+
#include "itkMath.h"
2222
#include "itkArrivalFunctionToPathFilter.h"
2323

2424
namespace itk

include/itkSingleImageCostFunction.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef itkSingleImageCostFunction_hxx
1818
#define itkSingleImageCostFunction_hxx
1919

20-
#include "vnl/vnl_math.h"
20+
#include "itkMath.h"
2121
#include "itkSingleImageCostFunction.h"
2222

2323
namespace itk
@@ -146,7 +146,7 @@ SingleImageCostFunction<TImage>
146146
// (indicated by very large values) which may skew the gradient.
147147
// To avoid this skewing effect, we reset gradient values larger
148148
// than a given threshold.
149-
if ( vnl_math::abs(derivative[i]) > DerivativeThreshold )
149+
if ( itk::Math::abs (derivative[i]) > DerivativeThreshold )
150150
{
151151
derivative[i] = 0.0;
152152
}

include/itkSpeedFunctionToPathFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef itkSpeedFunctionToPathFilter_hxx
1919
#define itkSpeedFunctionToPathFilter_hxx
2020

21-
#include "vnl/vnl_math.h"
21+
#include "itkMath.h"
2222
#include "itkSpeedFunctionToPathFilter.h"
2323
#include "itkFastMarchingUpwindGradientImageFilter.h"
2424

0 commit comments

Comments
 (0)