CopyLayerToArray

Declaration: TMat4D.CopyLayerToArray (var DestArray: TDouble2DArray; LowCol, HighCol, LowRow, HighRow, Layer, TimeSlot: integer): integer;
The method CopyLayerToArray copies the cells of the 4D matrix to the dynamic array DestArray. The parameters Layer and TimeSlot specify the layer and the timeslot of the matrix. The range of matrix cells to be copied to the array is defined by the parameters LowCol, HighCol, LowRow and HighRow. The size of the destination array is automatically adjusted to the size of the specified range.

The function returns the following error codes:
 0 ... everything is OK
-1 ... Layer is out of range
-2 ... TimeSlot is out of range