ITK  4.13.0
Insight Segmentation and Registration Toolkit
Classes | Namespaces | Functions | Variables
itkMath.h File Reference
#include "itkMathDetail.h"
#include "itkConceptChecking.h"
#include <vnl/vnl_math.h>
#include <vxl_version.h>
+ Include dependency graph for itkMath.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  itk::Math::Detail::AlmostEqualsFloatVsFloat
struct  itk::Math::Detail::AlmostEqualsFloatVsInteger
struct  itk::Math::Detail::AlmostEqualsFunctionSelector< TInput1IsIntger, TInput1IsSigned, TInput2IsInteger, TInput2IsSigned >
struct  itk::Math::Detail::AlmostEqualsIntegerVsFloat
struct  itk::Math::Detail::AlmostEqualsPlainOldEquals
struct  itk::Math::Detail::AlmostEqualsSignedVsUnsigned
struct  itk::Math::Detail::AlmostEqualsUnsignedVsSigned




#define itkTemplateFloatingToIntegerMacro(name)


bool itk::Math::abs (const bool x)
unsigned char itk::Math::abs (const unsigned char x)
unsigned char itk::Math::abs (const signed char x)
unsigned char itk::Math::abs (const char x)
unsigned short itk::Math::abs (const short x)
unsigned short itk::Math::abs (const unsigned short x)
unsigned int itk::Math::abs (const int x)
unsigned int itk::Math::abs (const unsigned int x)
unsigned long itk::Math::abs (const long x)
unsigned long itk::Math::abs (const unsigned long x)
float itk::Math::abs (const float x)
double itk::Math::abs (const double x)
long double itk::Math::abs (const long double x)
template<typename T1 , typename T2 >
bool itk::Math::AlmostEquals (T1 x1, T2 x2)
template<typename T >
itk::Math::angle_0_to_2pi (const T angle)
template<typename T >
itk::Math::angle_minuspi_to_pi (const T angle)
template<typename TReturn , typename TInput >
TReturn itk::Math::CastWithRangeCheck (TInput x)
template<typename T >
itk::Math::cbrt (const T value)
template<TReturn , typename TInput >
 itk::Math::Ceil (TInput x)
template<typename T >
int itk::Math::ceil (const T x)
bool itk::Math::cube (const bool x)
int itk::Math::cube (const int x)
unsigned int itk::Math::cube (const unsigned int x)
long itk::Math::cube (const long x)
unsigned long itk::Math::cube (const unsigned long x)
float itk::Math::cube (const float x)
double itk::Math::cube (const double x)
template<typename TInput1 , typename TInput2 >
bool itk::Math::ExactlyEquals (const TInput1 &x1, const TInput2 &x2)
template<typename T >
itk::Math::FloatAddULP (T x, typename Detail::FloatIEEE< T >::IntType ulps)
template<typename T >
bool itk::Math::FloatAlmostEqual (T x1, T x2, typename Detail::FloatIEEE< T >::IntType maxUlps=4, typename Detail::FloatIEEE< T >::FloatType maxAbsoluteDifference=0.1 *itk::NumericTraits< T >::epsilon())
template<typename T >
Detail::FloatIEEE< T >::IntType itk::Math::FloatDifferenceULP (T x1, T x2)
template<TReturn , typename TInput >
 itk::Math::Floor (TInput x)
template<typename T >
int itk::Math::floor (const T x)
template<typename T >
itk::Math::hypot (const T value1, const T value2)
template<typename T >
bool itk::Math::isfinite (const T value)
template<typename T >
bool itk::Math::isinf (const T value)
template<typename T >
bool itk::Math::isnan (const T value)
template<typename T1 , typename T2 >
bool itk::Math::NotAlmostEquals (T1 x1, T2 x2)
template<typename TInput1 , typename TInput2 >
bool itk::Math::NotExactlyEquals (const TInput1 &x1, const TInput2 &x2)
template<typename T >
itk::Math::remainder_floored (const T x, const T y)
template<typename T >
itk::Math::remainder_truncated (const T x, const T y)
template<typename T >
int itk::Math::rnd (const T x)
template<typename T >
int itk::Math::rnd_halfinttoeven (const T x)
template<typename T >
int itk::Math::rnd_halfintup (const T x)
template<typename TReturn , typename TInput >
TReturn itk::Math::Round (TInput x)
template<TReturn , typename TInput >
 itk::Math::RoundHalfIntegerToEven (TInput x)
template<TReturn , typename TInput >
 itk::Math::RoundHalfIntegerUp (TInput x)
template<typename T >
int itk::Math::sgn (const T x)
template<typename T >
int itk::Math::sgn0 (const T x)
bool itk::Math::sqr (const bool x)
int itk::Math::sqr (const int x)
unsigned int itk::Math::sqr (const unsigned int x)
long itk::Math::sqr (const long x)
unsigned long itk::Math::sqr (const unsigned long x)
float itk::Math::sqr (const float x)
double itk::Math::sqr (const double x)
unsigned int itk::Math::squared_magnitude (const char x)
unsigned int itk::Math::squared_magnitude (const unsigned char x)
unsigned int itk::Math::squared_magnitude (const int x)
unsigned int itk::Math::squared_magnitude (const unsigned int x)
unsigned long itk::Math::squared_magnitude (const long x)
unsigned long itk::Math::squared_magnitude (const unsigned long x)
float itk::Math::squared_magnitude (const float x)
double itk::Math::squared_magnitude (const double x)
long double itk::Math::squared_magnitude (const long double x)
ITKCommon_EXPORT bool itk::Math::IsPrime (unsigned short n)
ITKCommon_EXPORT bool itk::Math::IsPrime (unsigned int n)
ITKCommon_EXPORT bool itk::Math::IsPrime (unsigned long n)
ITKCommon_EXPORT bool itk::Math::IsPrime (unsigned long long n)
ITKCommon_EXPORT unsigned short itk::Math::GreatestPrimeFactor (unsigned short n)
ITKCommon_EXPORT unsigned int itk::Math::GreatestPrimeFactor (unsigned int n)
ITKCommon_EXPORT unsigned long itk::Math::GreatestPrimeFactor (unsigned long n)
ITKCommon_EXPORT unsigned long long itk::Math::GreatestPrimeFactor (unsigned long long n)


static ITK_CONSTEXPR_VAR double itk::Math::deg_per_rad = vnl_math::deg_per_rad
static ITK_CONSTEXPR_VAR double itk::Math::e = vnl_math::e
static ITK_CONSTEXPR_VAR double itk::Math::eps = vnl_math::eps
static ITK_CONSTEXPR_VAR double itk::Math::euler = vnl_math::euler
static ITK_CONSTEXPR_VAR float itk::Math::float_eps = vnl_math::float_eps
static ITK_CONSTEXPR_VAR float itk::Math::float_sqrteps = vnl_math::float_sqrteps
static ITK_CONSTEXPR_VAR double itk::Math::ln10 = vnl_math::ln10
static ITK_CONSTEXPR_VAR double itk::Math::ln2 = vnl_math::ln2
static ITK_CONSTEXPR_VAR double itk::Math::log10e = vnl_math::log10e
static ITK_CONSTEXPR_VAR double itk::Math::log2e = vnl_math::log2e
static ITK_CONSTEXPR_VAR double itk::Math::one_over_pi = vnl_math::one_over_pi
static ITK_CONSTEXPR_VAR double itk::Math::one_over_sqrt2pi = vnl_math::one_over_sqrt2pi
static ITK_CONSTEXPR_VAR double itk::Math::pi = vnl_math::pi
static ITK_CONSTEXPR_VAR double itk::Math::pi_over_180 = vnl_math::pi_over_180
static ITK_CONSTEXPR_VAR double itk::Math::pi_over_2 = vnl_math::pi_over_2
static ITK_CONSTEXPR_VAR double itk::Math::pi_over_4 = vnl_math::pi_over_4
static ITK_CONSTEXPR_VAR double itk::Math::sqrt1_2 = vnl_math::sqrt1_2
static ITK_CONSTEXPR_VAR double itk::Math::sqrt1_3 = vnl_math::sqrt1_3
static ITK_CONSTEXPR_VAR double itk::Math::sqrt2 = vnl_math::sqrt2
static ITK_CONSTEXPR_VAR double itk::Math::sqrt2pi = vnl_math::sqrt2pi
static ITK_CONSTEXPR_VAR double itk::Math::sqrteps = vnl_math::sqrteps
static ITK_CONSTEXPR_VAR double itk::Math::two_over_pi = vnl_math::two_over_pi
static ITK_CONSTEXPR_VAR double itk::Math::two_over_sqrtpi = vnl_math::two_over_sqrtpi
static ITK_CONSTEXPR_VAR double itk::Math::twopi = vnl_math::twopi

Macro Definition Documentation

#define itkTemplateFloatingToIntegerMacro (   name)
template< typename TReturn, typename TInput > \
inline TReturn name(TInput x) \
{ \
if ( sizeof( TReturn ) <= 4 ) \
{ \
return static_cast< TReturn >( Detail::name##_32(x) ); \
} \
else if ( sizeof( TReturn ) <= 8 ) \
{ \
return static_cast< TReturn >( Detail::name##_64(x) ); \
} \
else \
{ \
return static_cast< TReturn >( Detail::name##_base< TReturn, TInput >(x) ); \
} \

A useful macro to generate a template floating point to integer conversion templated on the return type and using either the 32 bit, the 64 bit or the vanilla version

Definition at line 106 of file itkMath.h.