![]() |
MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Medical Data Segmentation Toolkit (MDSTk)
Copyright (c) 2003-2010 by Michal Spanel
.
More...
Namespaces | |
| namespace | mds |
Medical Data Segmentation Toolkit (MDSTk) | |
| namespace | mds::math |
Functions | |
| template<typename T > | |
| bool | mds::math::conv2Bool (const T &x) |
| Conversion of a given number to bool. | |
| template<typename T > | |
| void | mds::math::cut (T &x, const T &a, const T &b, const T &n) |
| Values in the range <a, b> remain unchanged, othervise a new value n is assigned. | |
| double | mds::math::deg2Rad (double Degrees) |
| Converts degrees to radians. | |
| template<typename T > | |
| const T & | mds::math::get2Pi () |
| Returns the value 2*pi. | |
| template<typename T > | |
| T | mds::math::getAbs (const T &a) |
| Absolute value. | |
| template<> | |
| unsigned int | mds::math::getAbs (const unsigned int &a) |
| Specialization of the function that returns an absolute value. | |
| template<> | |
| unsigned short | mds::math::getAbs (const unsigned short &a) |
| Specialization of the function that returns an absolute value. | |
| template<> | |
| unsigned long | mds::math::getAbs (const unsigned long &a) |
| Specialization of the function that returns an absolute value. | |
| template<typename T > | |
| const T & | mds::math::getE () |
| Returns the Euler's constant. | |
| template<typename T > | |
| const T & | mds::math::getHalfPi () |
| Returns the value pi/2. | |
| template<typename T > | |
| T | mds::math::getMax (const T &a, const T &b) |
| Returns maximum of two values. | |
| template<typename T > | |
| T | mds::math::getMax (const T &a, const T &b, const T &c) |
| Returns maximum of three values. | |
| template<typename T > | |
| T | mds::math::getMax (const T &a, const T &b, const T &c, const T &d) |
| Returns maximum of four values. | |
| template<typename T > | |
| T | mds::math::getMin (const T &a, const T &b) |
| Returns minimum of two values. | |
| template<typename T > | |
| T | mds::math::getMin (const T &a, const T &b, const T &c) |
| Returns minimum of three values. | |
| template<typename T > | |
| T | mds::math::getMin (const T &a, const T &b, const T &c, const T &d) |
| Returns minimum of four values. | |
| template<typename T > | |
| const T & | mds::math::getPi () |
| Returns the constant pi. | |
| template<typename T > | |
| const T & | mds::math::getSqrt2 () |
| Returns square root of the number 2. | |
| template<typename T > | |
| const T & | mds::math::getSqrt2Pi () |
| Returns the value sqrt(2*pi). | |
| template<typename T > | |
| const T & | mds::math::getSqrt3 () |
| Returns square root of the number 3. | |
| template<typename T > | |
| const T & | mds::math::getSqrt6 () |
| Returns square root of the number 6. | |
| template<typename T > | |
| bool | mds::math::isEven (const T &x) |
| Returns true if a given integer number is even. | |
| template<typename T > | |
| bool | mds::math::isOdd (const T &x) |
| Returns true if a given integer number is odd. | |
| template<typename T > | |
| void | mds::math::limit (T &x, const T &a, const T &b) |
| Value x is limited into an interval <a, b>. | |
| template<typename T > | |
| void | mds::math::mirror (T &x, const T &a, const T &b) |
| Value x is mirrored into a given interval <a, b>. | |
| double | mds::math::rad2deg (double Radians) |
| Converts degrees to radians. | |
| template<typename T > | |
| int | mds::math::round2Int (const T &x) |
| Rounds a given floating point number to integer. | |
| template<typename T > | |
| void | mds::math::swap (T &a, T &b) |
| Exchanges two values. | |
| template<> | |
| void | mds::math::swap (int &a, int &b) |
| Exchanges two int numbers. | |
| template<> | |
| void | mds::math::swap (unsigned &a, unsigned &b) |
| Exchanges two unsigned int numbers. | |
| template<> | |
| void | mds::math::swap (long &a, long &b) |
| Exchanges two long numbers. | |
| template<> | |
| void | mds::math::swap (unsigned long &a, unsigned long &b) |
| Exchanges two unsigned long numbers. | |
Variables | |
| const double | mds::math::E = 2.718281828459045 |
| Euler's constant. | |
| const double | mds::math::HALF_PI = 0.5 * PI |
| Constant pi/2. | |
| const double | mds::math::PI = 3.141592653589793 |
| Constant pi. | |
| const double | mds::math::SQRT2 = 1.414213562373095 |
| Square root of the number 2. | |
| const double | mds::math::SQRT3 = 1.732050807568877 |
| Square root of the number 3. | |
| const double | mds::math::SQRT6 = 2.449489742783178 |
| Square root of the number 6. | |
| const double | mds::math::SQRT_TWO_PI = 2.506628274631001 |
| Constant sqrt(2*pi). | |
| const double | mds::math::TWO_PI = 2.0 * PI |
| Constant 2*pi. | |
Medical Data Segmentation Toolkit (MDSTk)
Copyright (c) 2003-2010 by Michal Spanel
.
Author: Michal Spanel, spanel@fit.vutbr.cz
Date: 2003/10/16
Description:
1.7.6.1