ResampleSpatial

Declaration: ResampleSpatial(DivX, OffsX, DivY, OffsY: integer; CalcAvg, Feedback: boolean): integer;
Resamples the x and y axis of the data cube by a factor of DivX and DivY. The parameters OffsX and OffsY specify the pixel offsets. If CalcAvg is TRUE the resampled data is obtained by averaging the corresponding pixels.

Setting Feedback to TRUE activates the Epina ImageLab progress bar to provide visual feedback of the process. Please note that unless the script progress bar is already visible you have to make it visible before calling ResampleSpatial, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).

The function returns the following error codes:

>0 ... everything is OK, the image has been successfully resampled
-1 ... cannot recalibrate the x axis
-2 ... cannot recalibrate the y axis
-3 ... the resulting image is too small (minimum required size: 2x2 pixels)