WarpAffine

Performs the general affine transform of the source volume.

Syntax

IppStatus ipprWarpAffine_8u_C1PV(const Ipp8u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVoi, Ipp8u* const pDst[], int dstStep, IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);

IppStatus ipprWarpAffine_16u_C1PV(const Ipp16u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVoi, Ipp16u* const pDst[], int dstStep, IpprCuboid dstVoi, const double coeffs[3][4], int interpolation, Ipp8u* pBuffer);

Parameters

pSrc

Array of pointers to the planes in the source volume.

srcVolume

Size in pixels of the source volume.

srcStep

Distance in bytes between starts of consecutive lines in each plane of the source volume.

srcVoi

Volume of interest of the source volume.

pDst

Array of pointers to the planes in the destination volume.

dstVoi

Volume of interest of the destination volume.

coeffs

Coefficients of the affine transform.

interpolation

Type of interpolation, the following values are possible:

IPPI_INTER_NN - nearest neighbor interpolation,

IPPI_INTER_LINEAR - trilinear interpolation,

IPPI_INTER_CUBIC - tricubic interpolation,

IPPI_INTER_CUBIC2P_BSPLINE - B-spline,

IPPI_INTER_CUBIC2P_CATMULLROM - Catmull-Rom spline,

IPPI_INTER_CUBIC2P_B05C03 - special two-parameters filter (1/2, 3/10).

pBuffer

Pointer to the external buffer.

Description

The function ipprResize is declared in the ippr.h file. It operates with volume of interest (VOI).

This affine warp function transforms the coordinates (x,y,z) of the source volume voxels according to the following formulas:

x' = c00* x + c01* y + c02* z+ c03

y' = c10* x + c11* y + c12*z+ c13

z' = c20* x + c21* y + c22*z+ c23

where x', y' and z' denote the voxel coordinates in the transformed volume, and cij are the affine transform coefficients stored in the array coeffs.

The function requires the external buffer pBuffer, its size can be previously computed by calling the function ipprWarpAffineGetBufSize.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if width, or height, or depth of the source and destination volumes is less than or equal to 0.

ippStsCoeffErr

Indicates an error condition if determinant of the transform matrix cij is equal to 0.

ippStsInterpolationErr

Indicates an error condition if interpolation has an illegal value.

ippStsWrongIntersectVOI

Indicates a warning if srcVoi has not intersection with the source volume, operation is not performed.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.