Declaration: TMetaData.GetCalibCoeffs(Dim: TDims; idx: integer; var Offs, Fact, Shft: double; var Coeffs: TDoubleArray; var InvOffs, InvFact, InvShft: double; var InvCoeffs: TDoubleArray): integer;
Returns the calibration coefficients for a particular axis specified by the parameter Dim. The parameter idx is the (pixel) index along the specified axis. The returned calibration values contain the parameters of both the forward (pixel index to real-world coordinates, see IndexToWorld) and the reverse calibration (real-world coordinates to pixel index, see WorldToIndex):

Forward calibration:

Offs ... the offset
Fact ... the scale factor
Shft ... the shift factor
Coeffs ... the coefficients of the calibration polynomial (max. order = 6)
Reverse calibration:
InvOffs ... the offset
InvFact ... the scale factor
InvShft ... the shift factor
InvCoeffs ... the coefficients of the calibration polynomial (max. order = 6)

The function returns the following error codes:

 0 ... everything is OK
-1 ... idx is out of range

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