Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkMath.h File Reference

Go to the source code of this file.

Namespaces

namespace  itk
namespace  itk::Math

Functions

template<typename TReturn , typename TInput >
TReturn itk::Math::CastWithRangeCheck (TInput x)
int itk::Math::Ceil (float x)
int itk::Math::Ceil (double x)
template<TReturn , typename TInput >
 itk::Math::Ceil (TInput x)
int itk::Math::Floor (float x)
int itk::Math::Floor (double x)
template<TReturn , typename TInput >
 itk::Math::Floor (TInput x)
int itk::Math::Round (float x)
int itk::Math::Round (double x)
template<typename TReturn , typename TInput >
TReturn itk::Math::Round (TInput x)
template<TReturn , typename TInput >
 itk::Math::RoundHalfIntegerToEven (TInput x)
int itk::Math::RoundHalfIntegerUp (float x)
int itk::Math::RoundHalfIntegerUp (double x)
template<TReturn , typename TInput >
 itk::Math::RoundHalfIntegerUp (TInput x)

Variables

static const double itk::Math::ln10 = 2.30258509299404568402
static const double itk::Math::ln2 = 0.69314718055994530942
static const double itk::Math::log10e = 0.43429448190325182765
static const double itk::Math::log2e = 1.4426950408889634074
static const double itk::Math::one_over_pi = 0.31830988618379067154
static const double itk::Math::one_over_sqrt2pi = 0.39894228040143267794
static const double itk::Math::pi_over_2 = 1.57079632679489661923
static const double itk::Math::pi_over_4 = 0.78539816339744830962
static const double itk::Math::sqrt1_2 = 0.70710678118654752440
static const double itk::Math::sqrt2 = 1.41421356237309504880
static const double itk::Math::two_over_pi = 0.63661977236758134308
static const double itk::Math::two_over_sqrtpi = 1.12837916709551257390



#define itkTemplateFloatingToIntegerMacro(name)
int itk::Math::RoundHalfIntegerToEven (float x)
int itk::Math::RoundHalfIntegerToEven (double x)

Define Documentation

#define itkTemplateFloatingToIntegerMacro ( name   ) 
Value:
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 75 of file itkMath.h.


Generated at Fri Apr 16 20:05:01 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000