Declaration: TMetaData.ConvertPhotoToHSICoords (PhotIx: integer; PhotX, PhotY: integer; var hsiX, hsiY: double): integer;
The function ConvertPhotoToHSICoords transforms the coordinates of the point [PhotX, PhotY] (pixel coordinates) on the photo into the corresponding coordinates [hsiX, hsiY] on the hyperspectral image (world coordinates). The photo is given by the parameter PhotIx which can assume values between 1 and NumPhotos.

The function returns the following error codes:

 0 ... everything OK
-1 ... the specified photo is not available (PhotIx is out of range)
-2 ... the photo is not yet calibrated

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