Resample

Declaration: TMat4D.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: