Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Geometrics Namespace Reference

Functions

template<class D >
Image< D > AffineTransform (const Image< D > &img, const Matrix< float > &transform)
 Applies affine transformation to an image, using the matrix of transformation. More...
 
template<class D >
Image< D > AffineTransform (const Image< D > &img, const Matrix< float > &transform, const PixelInterpolation &interpolation)
 Applies affine transformation to an image, using the matrix of transformation. More...
 
template<class D >
Image< D > Rotate (const Image< D > &img, float rad, size_t dms=2)
 Rotates a image. More...
 
template<class D >
Image< D > Rotate (const Image< D > &img, const PixelInterpolation &interpolation, float rad, size_t dms=2)
 Rotates a image. More...
 
Matrix< float > Rotate (double rad, size_t dms=2)
 Generates a transformation corresponding to a rotation. More...
 
Matrix< float > Rotate (Matrix< float > &source, double rad, size_t dms=2)
 Generates a composite transformation of the rotation applyed over source matrix. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, double factor, bool resize=false)
 Scales a image. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, const PixelInterpolation &interpolation, double factor, bool resize=false)
 Scales a image. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, double fx, double fy, double fz=1.0, bool resize=false)
 Scales a image. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, const PixelInterpolation &interpolation, double fx, double fy, double fz=1.0, bool resize=false)
 Scales a image. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, const Vector< size_t > &dims)
 Scales a image. More...
 
template<class D >
Image< D > Scale (const Image< D > &img, const PixelInterpolation &interpolation, const Vector< size_t > &dims)
 Scales a image. More...
 
Matrix< float > Scale (double fx, double fy, double fz=1.0)
 Generates a transformation corresponding to a scaling. More...
 
Matrix< float > Scale (Matrix< float > &source, double fx, double fy, double fz=1.0)
 Generates a composite transformation of the scaling applyed over source matrix. More...
 
template<class D >
Image< D > Shear (const Image< D > &img, double s_xy, double s_yx, double s_xz=0.0, double s_yz=0.0, double s_zx=0.0, double s_zy=0.0)
 Shears an image. More...
 
template<class D >
Image< D > Shear (const Image< D > &img, const PixelInterpolation &interpolation, double s_xy, double s_yx, double s_xz=0.0, double s_yz=0.0, double s_zx=0.0, double s_zy=0.0)
 Shears an image. More...
 
Matrix< float > Shear (double s_xy, double s_yx, double s_xz=0.0, double s_yz=0.0, double s_zx=0.0, double s_zy=0.0)
 Generates a transformation corresponding to a shear. More...
 
Matrix< float > Shear (Matrix< float > &source, double s_xy, double s_yx, double s_xz=0.0, double s_yz=0.0, double s_zx=0.0, double s_zy=0.0)
 Generates a composite transformation of the shear applyed over source matrix. More...
 
template<class D >
Image< D > Translate (const Image< D > &img, double dx, double dy, double dz=0)
 Translates a image. More...
 
template<class D >
Image< D > Translate (const Image< D > &img, const PixelInterpolation &interpolation, double dx, double dy, double dz=0)
 Translates a image. More...
 
Matrix< float > Translate (double dx, double dy, double dz=0)
 Generates a transformation corresponding to a translation. More...
 
Matrix< float > Translate (Matrix< float > &source, double dx, double dy, double dz=0)
 Generates a composite transformation of the translation applyed over source matrix. More...
 

Function Documentation

template<class D >
Image< D > Bial::Geometrics::AffineTransform ( const Image< D > &  img,
const Matrix< float > &  transform 
)

Applies affine transformation to an image, using the matrix of transformation.

Date
2014/Jun/08
Parameters
imgInput image.
transformAffine transformation matrix.
Returns
A transformated image.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::AffineTransform ( const Image< D > &  img,
const Matrix< float > &  transform,
const PixelInterpolation interpolation 
)

Applies affine transformation to an image, using the matrix of transformation.

Date
2014/Jun/08
Parameters
imgInput image.
transformAffine transformation matrix.
interpolationPixel interpolation to be used.
Returns
A transformated image.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Rotate ( const Image< D > &  img,
float  rad,
size_t  dms = 2 
)

Rotates a image.

Date
2014/Jun/08
Parameters
imgInput image.
radRotation in radians.
dmsRotation dimension. Default: 2 to rotate around z axis.
Returns
A rotated image in rad radians with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Rotate ( const Image< D > &  img,
const PixelInterpolation interpolation,
float  rad,
size_t  dms = 2 
)

Rotates a image.

Date
2014/Jun/08
Parameters
imgInput image.
interpolationPixel interpolation to be used.
radRotation in radians.
dmsRotation dimension. Default: 2 to rotate around z axis.
Returns
A rotated image.
Warning
none.
Matrix< float > Bial::Geometrics::Rotate ( double  rad,
size_t  dms = 2 
)

Generates a transformation corresponding to a rotation.

Date
2014/May/27
Parameters
radRotation in radians
dmsRotation dimension. Default: 2 to rotate around z axis.
Returns
The affine transformation corresponding to a rotation.
Warning
none.
Matrix< float > Bial::Geometrics::Rotate ( Matrix< float > &  source,
double  rad,
size_t  dms = 2 
)

Generates a composite transformation of the rotation applyed over source matrix.

Date
2014/May/27
Parameters
sourceInitial affine transformation over which rotation is applyed.
radRotation in radians
dmsRotation dimension. Default: 2 to rotate around z axis.
Returns
The affine transformation corresponding to a rotation applyed over source matrix.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
double  factor,
bool  resize = false 
)

Scales a image.

Date
2014/Jan/07
Parameters
imgInput image.
factorScaling factor. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
resizeresize the resultant image.
Returns
A scaled image with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
const PixelInterpolation interpolation,
double  factor,
bool  resize = false 
)

Scales a image.

Date
2014/Jan/07
Parameters
imgInput image.
interpolationPixel interpolation to be used.
factorScaling factor. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
resizeresize the resultant image.
Returns
A scaled image.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
double  fx,
double  fy,
double  fz = 1.0,
bool  resize = false 
)

Scales a image.

Date
2014/Aug/16
Parameters
imgInput image.
fxScaling factor in X. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fyScaling factor in Y. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fzScaling factor in Z. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
resizeresize the resultant image.
Returns
A scaled image with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
const PixelInterpolation interpolation,
double  fx,
double  fy,
double  fz = 1.0,
bool  resize = false 
)

Scales a image.

Date
2014/Aug/16
Parameters
imgInput image.
interpolationPixel interpolation to be used.
fxScaling factor in X. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fyScaling factor in Y. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fzScaling factor in Z. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
resizeresize the resultant image.
Returns
A scaled image.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
const Vector< size_t > &  dims 
)

Scales a image.

Date
2014/Jan/07
Parameters
imgInput image.
dimsResulting image dimensions.
Returns
A scaled image with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Scale ( const Image< D > &  img,
const PixelInterpolation interpolation,
const Vector< size_t > &  dims 
)

Scales a image.

Date
2014/Jan/07
Parameters
imgInput image.
interpolationPixel interpolation to be used.
dimsResulting image dimensions.
Returns
A scaled image.
Warning
none.
Matrix< float > Bial::Geometrics::Scale ( double  fx,
double  fy,
double  fz = 1.0 
)

Generates a transformation corresponding to a scaling.

Date
2014/Jun/26
Parameters
imgInput image.
fxScaling factor in X. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fyScaling factor in Y. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fzScaling factor in Z. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
Returns
The affine transformation corresponding to a scaling.
Warning
none.
Matrix< float > Bial::Geometrics::Scale ( Matrix< float > &  source,
double  fx,
double  fy,
double  fz = 1.0 
)

Generates a composite transformation of the scaling applyed over source matrix.

Date
2014/Jun/26
Parameters
imgInput image.
sourceInitial affine transformation over which scaling is applyed.
fxScaling factor in X. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fyScaling factor in Y. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
fzScaling factor in Z. If greater than 1.0, image is dilated. If lower than 1.0, image is compressed.
Returns
The affine transformation corresponding to a scaling applyed over source matrix.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Shear ( const Image< D > &  img,
double  s_xy,
double  s_yx,
double  s_xz = 0.0,
double  s_yz = 0.0,
double  s_zx = 0.0,
double  s_zy = 0.0 
)

Shears an image.

Date
2014/Jun/08
Parameters
imgInput image.
s_xyShearing in axis X with respect to axis Y.
s_yxShearing in axis Y with respect to axis X.
s_xzShearing in axis X with respect to axis Z.
s_yzShearing in axis Y with respect to axis Z.
s_zxShearing in axis Z with respect to axis X.
s_zyShearing in axis Z with respect to axis Y.
Returns
A Sheared image with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Shear ( const Image< D > &  img,
const PixelInterpolation interpolation,
double  s_xy,
double  s_yx,
double  s_xz = 0.0,
double  s_yz = 0.0,
double  s_zx = 0.0,
double  s_zy = 0.0 
)

Shears an image.

Date
2014/Jun/08
Parameters
imgInput image.
interpolationPixel interpolation to be used.
s_xyShearing in axis X with respect to axis Y.
s_yxShearing in axis Y with respect to axis X.
s_xzShearing in axis X with respect to axis Z.
s_yzShearing in axis Y with respect to axis Z.
s_zxShearing in axis Z with respect to axis X.
s_zyShearing in axis Z with respect to axis Y.
Returns
A Sheared image.
Warning
none.
Matrix< float > Bial::Geometrics::Shear ( double  s_xy,
double  s_yx,
double  s_xz = 0.0,
double  s_yz = 0.0,
double  s_zx = 0.0,
double  s_zy = 0.0 
)

Generates a transformation corresponding to a shear.

Date
2014/Jun/08
Parameters
s_xyShearing in axis X with respect to axis Y.
s_yxShearing in axis Y with respect to axis X.
s_xzShearing in axis X with respect to axis Z.
s_yzShearing in axis Y with respect to axis Z.
s_zxShearing in axis Z with respect to axis X.
s_zyShearing in axis Z with respect to axis Y.
Returns
The affine transform corresponding to a shear.
Warning
none.
Matrix< float > Bial::Geometrics::Shear ( Matrix< float > &  source,
double  s_xy,
double  s_yx,
double  s_xz = 0.0,
double  s_yz = 0.0,
double  s_zx = 0.0,
double  s_zy = 0.0 
)

Generates a composite transformation of the shear applyed over source matrix.

Date
2014/Jun/08
Parameters
s_xyShearing in axis X with respect to axis Y.
s_yxShearing in axis Y with respect to axis X.
s_xzShearing in axis X with respect to axis Z.
s_yzShearing in axis Y with respect to axis Z.
s_zxShearing in axis Z with respect to axis X.
s_zyShearing in axis Z with respect to axis Y.
Returns
The affine transformation corresponding to a shear applyed over source matrix.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Translate ( const Image< D > &  img,
double  dx,
double  dy,
double  dz = 0 
)

Translates a image.

Date
2014/Jun/08
Parameters
imgInput image.
dxDisplacement in X
dyDisplacement in Y
dzDisplacement in Z
Returns
A translated image with linear interpolation.
Warning
none.
template<class D >
Image< D > Bial::Geometrics::Translate ( const Image< D > &  img,
const PixelInterpolation interpolation,
double  dx,
double  dy,
double  dz = 0 
)

Translates a image.

Date
2014/Jun/08
Parameters
imgInput image.
interpolationPixel interpolation to be used.
dxDisplacement in X
dyDisplacement in Y
dzDisplacement in Z
Returns
A translated image.
Warning
none.
Matrix< float > Bial::Geometrics::Translate ( double  dx,
double  dy,
double  dz = 0 
)

Generates a transformation corresponding to a translation.

Date
2014/Jun/08
Parameters
sourceInitial affine transformation over which translation is applyed.
dxDisplacement in X
dyDisplacement in Y
dzDisplacement in Z
Returns
The affine transformation corresponding to a translation.
Warning
none.
Matrix< float > Bial::Geometrics::Translate ( Matrix< float > &  source,
double  dx,
double  dy,
double  dz = 0 
)

Generates a composite transformation of the translation applyed over source matrix.

Date
2014/Jun/08
Parameters
sourceInitial affine transformation over which translation is applyed.
dxDisplacement in X
dyDisplacement in Y
dzDisplacement in Z
Returns
The affine transformation corresponding to a translation applyed over source matrix.
Warning
none.