ConvertHSItoPhotoCoords

Declaration: TMetaData.ConvertHSItoPhotoCoords (PhotIx: integer; hsiX, hsiY: double; var PhotX, PhotY: integer): integer;
The function ConvertHSItoPhotoCoords transforms the coordinates of the point [hsiX, hsiY] on the hyperspectral image (world coordinates) into the corresponding photo coordinates [PhotX, PhotY] (pixel 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.


Last Update: 2017-Sep-27