Resize
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
);
IppStatus ipprResize_32f_C1PV(const Ipp32f* const
pSrc
[], IpprVolume
srcVolume
, int
srcStep
, IpprCuboid
srcVoi
, Ipp32f* const
pDst
[], int
dstStep
, IpprCuboid
dstVoi
, double
xFactor
, double
yFactor
, double
zFactor
, double
xShift
, double
yShift
, double
zShift
, int
interpolation
, Ipp8u*
pBuffer
);
IppStatus ipprResize_32f_C1V(const Ipp32f*
pSrc
, IpprVolume
srcVolume
, int
srcStep
, int
srcPlaneStep
, IpprCuboid
srcVoi
, Ipp32f*
pDst
, int
dstStep
, int
dstPlaneStep
, IpprCuboid
dstVoi
, double
xFactor
, double
yFactor
, double
zFactor
, double
xShift
, double
yShift
, double
zShift
, int
interpolation
, Ipp8u*
pBuffer
);
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
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 the starting points of consecutive lines in each plane of the source volume.
- srcPlaneStep
- Distance, in bytes, between the 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 the starting points of consecutive lines in each plane of the the destination volume.
- dstPlaneStep
- Distance, in bytes, between the planes of the destination contiguous volume.
- dstVoi
- Volume of interest of the destination volume.
- x-, y-, zFactor
- Factors by which thex,y,zdimensions of the source VOI are changed.
- x-, y-, zShift
- Shift values in thex,y, andzdirections 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
This function 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 volumeVOI.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.Descriptor
PV
means working with non-contiguous volume data, where the location of the planes is passed to the function using pointers on the plane. In functions with descriptor V
, the location of the planes is determined by the distance in bytes between the starting points of successive lines in each plane of the original volume (contiguous volume data).In case of resize:
- InIppStatus ipprResize_8u_C1VfunctionVmeans:const Ipp8u* pSrc- Pointer to the source volume origin.srcPlaneStep- Distance, in bytes, between the planes of the source contiguous volume.
- InIppStatus ipprResize_8u_C1PVfunctionPVmeans:const Ipp8u* const pSrc[]- An array of pointers to the source planes for non-contiguous volume.
Before using this function, compute the size of the external buffer
pBuffer
using ipprResizeGetBufSize.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or a warning.
- ippStsNullPtrErr
- Indicates an error when one of the specified pointers isNULL.
- ippStsSizeErr
- Indicates an error when width, or height, or depth of the source and destination volumes is less than or equal to 0.
- ippStsResizeFactorErr
- Indicates an error when one of thexFactor,yFactor,zFactorpointers is less than, or equal to 0.
- ippStsInterpolationErr
- Indicates an error wheninterpolationhas an illegal value.
- ippStsWrongIntersectVOI
- Indicates a warning whensrcVoihas no intersection with the source volume, operation is not performed.