CopyPixMask

Declaration: TMetaData.CopyPixMask (Source, Destination: integer): integer;
Copies the mask Source to the mask Destination. If the destination mask is undefined, it is automatically created. Please note that the name of the source mask is also copied to the destination mask. The function returns the following error codes:
 0 .... everything OK
-1 ... the source mask does not exist
-2 ... the destination mask does not exist (index out of valid range)

Hint: In order to directly access the metadata of the currently loaded dataset you can use the pre-declared global variable MData.