Resample Data Member Function

Resamples the array, using an 'image view' of the array. For example, given an array that contains 256 values, one 'image view' of the array is as a 16×16 <Image>. For the same array, another 'image view' of the array is as a 32×8 <Image>. In both examples, 16×16 = 256 and 32×8 = 256, which exactly matches the array count.

Prototype

int32 Resample( Uint32Array src, Uint32Array dst, Int32Array p_aiResampleDims, ImageResampler p_oImageResampler )

Parameters

Parameter Type Parameter Name Documentation
<Uint32Array>srcA pointer to an array containing the source data.
<Uint32Array>dstA pointer to an array that will contain the resampled data.
<Int32Array>p_aiResampleDimsA pointer to an <Int32Array> containing exactly 4 values. Index 0 = source view width, Index 1 = source view height, Index 2 = destination view width, Index 3 = destination view height. Note that the input values ( source view width * source view height ) must match the count of the source array. If you use source view width = 10 and source view height = 10, then the source array must contain 100 elements.
<ImageResampler>p_oImageResamplerA pointer to an <ImageResampler> object that will do the resampling. Note that you can configure the FilterType, FilterScale, Gamma, and boundary handling parameters of this object to suit your needs. Please see <ImageResampler>.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.