SerializeImages

Declaration: SerializeImages(LayerList: TIntArray; llx, lly, urx, ury, TSlot: integer; IncludePixelPos: boolean; var TargetMatrix: TDouble2DArray): integer;
Rearranges the images (layers) specified by the parameter LayerList such that the pixels are stored rowwise with the layers as columns of the resulting matrix. Starting with an image size of p x n pixels the serialization results in a matrix having k columns and n*p rows (k is the number of specified layers in the parameter LayerList). The parameters llx, lly, urx and ury define the lateral range of the image to be serialized, the parameter TSlot controls the time slot to be used.

If IncludePixelPos is set to TRUE two additional columns are created which contain the positions of the pixels. The columns are always arranged in the following order: pixel position x, pixel position y, data values (one column per layer).

The function returns the following error codes:

 0 ... everything is ok
-1 ... some of the specified layers do not exist
-2 ... LayerList must not be empty
-3 ... invalid lateral range
-4 ... invalid time slot


Last Update: 2018-Apr-12