StitchCubes

Declaration: StitchCubes(Mode: TStitchMode; FNames: TStrArray; CubeList: TImgCollection; LayersToExtract: TIntArray; SpecDesc: string): integer;
Stitches several datacubes into a single big mosaic, the fully qualified filenames of the individual data tiles have to be stored in the open array parameter FNames. The individual tiles can be ImageLab datacubes (file extension .ilab) or ENVI files (.hdr). StitchCubes supports three different modes of stitching which differ in the information drawn from the layers of the source tiles. The parameter Mode can assume the following values:
smFullSpec Use all available layers, the layer dimension of the resulting mosaic cube will be the same as the layer dimension of the tiles. Be careful when using this mode because it may create huge datacubes which potentially cannot be handled by your computer.
smSelLayers Use only selected layers. For this mode the list of layers must be contained in the parameter LayersToExtract, which is an open integer array. The layers are specified by their index numbers (and not by their wavelengths), use the function WorldToIndex to convert wavelengths or masses to layer indexes.
smSpecDesc Use spectral descriptors. The list of spectral descriptors is defined in the file SpecDesc (fully qualified path). Please note that creating mosaics of spectral descriptors deprives you of further processing your data since the spectral information is lost.
The information about the position and the resolution of the individual tiles is given by the parameter CubeList. This parameter is an open array of records whose size is the same as the size of the FNames array. Each record contains the following parameters:

XPos the x-position of the lower left corner of the corresponding tile (in pixels)
YPos the y-position of the lower left corner of the corresponding tile (in pixels)
Width the width of the corresponding tile (in pixels)
Height the height of the corresponding tile (in pixels)
OrigPosX the x-position of the lower left corner of the corresponding tile (in world coordinates)
OrigPosY the y-position of the lower left corner of the corresponding tile (in world coordinates)
OrigWid the width of the corresponding tile (in world coordinates)
OrigHgt the height of the corresponding tile (in world coordinates)

The function resturns the following error codes:

 0 ... everything is OK
-1 ... CubeList is empty
-2 ... not enough physical memory available
-3 ... x coordinates in CubeList are ambiguous
-4 ... y coordinates in CubeList are ambiguous


Last Update: 2018-Mai-02