Resize

Resizes the source volume.

Syntax

IppStatus ipprResize_8u_C1V(const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep, int srcPlaneStep, IpprCuboid srcVoi, Ipp8u* pDst, int dstStep, int dstPlaneStep, IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift, int interpolation, Ipp8u* pBuffer);

IppStatus ipprResize_16u_C1V(const Ipp16u* pSrc, IpprVolume srcVolume, int srcStep, int srcPlaneStep, IpprCuboid srcVoi, Ipp16u* pDst, int dstStep, int dstPlaneStep, IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift, int interpolation, Ipp8u* pBuffer);

IppStatus ipprResize_8u_C1PV(const Ipp8u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVoi, Ipp8u* const pDst[], int dstStep, IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift, int interpolation, Ipp8u* pBuffer);

IppStatus ipprResize_16u_C1PV(const Ipp16u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVoi, Ipp16u* const pDst[], int dstStep, IpprCuboid dstVoi, double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift, int interpolation, Ipp8u* pBuffer);

Parameters

pSrc

Pointer to the source volume origin. An array of pointers to the source planes for non-contiguous volume.

srcVolume

Size of the source volume.

srcStep

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

srcPlaneStep

Distance in bytes between planes of the source contiguous volume.

srcVoi

Volume of interest of the source volume.

pDst

Pointer to the destination volume origin. An array of pointers to the destination planes for non-contiguous volume.

dstStep

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

dstPlaneStep

Distance in bytes between planes of the destination contiguous volume.

dstVoi

Volume of interest of the destination volume.

x-, y-, zFactor

Factors by which the x, y, z dimensions of the source VOI are changed.

x-, y-, zShift

Shift values in the x, y, and z directions respectively.

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 function resizes the source volume srcVoi by xFactor in the x direction, yFactor in the y direction and zFactor in the z direction. The volume size can be reduced or increased in each direction, depending on the values of xFactor, yFactor, zFactor. If the value of the certain factor is greater than 1, the volume size is increased, and if it is less than 1, the volume size is reduced in the corresponding direction. The result is resampled using the interpolation method specified by the interpolation parameter, and written to the destination volume VOI.

Coordinates x', y', and z' in the resized volume are obtained from the equations:

x' = xFactor* x + xShift

y' = yFactor* x + yShift

z' = zFactor* z + zShift

where x, y, and z denote the coordinates of the element in the source volume. The right coordinate system (RCS) is used here.

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

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.

ippStsResizeFactorErr

Indicates an error condition if one of the xFactor, yFactor, zFactor is less than or 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.