The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Resample


Unit:SDL_matrix
Class: TMat4D
Declaration: procedure Resample (XDiv, XOffset, YDiv, YOffset, ZDiv, ZOffset, TDiv, TOffset: integer; Average: boolean);

The method Resample resamples the data of the matrix along a regular grid whose grid points are spaced by XDiv (YDiv, ZDiv, TDiv, respectively) cells. The sampling grid can be offset by specifying the parameters XOffset, YOffset, ZOffset, and TOffset. The offsets %Offset (% = X, Y, Z, or T) have a valid range between 0 and %Div-1. If the parameter Average is true, the resampled values are calculated by averaging %Div cells between two sampling points.

The following figure shows a two-dimensional example of resampling:

Hint: The method Resample triggers the OnPercentDone event to allow to implement a progress indicator when working with large files.



Last Update: 2023-Feb-06