Finding Indices of Scaled Multidimensional Wave From Scaled Values

Hello,

I've been having a good bit of trouble indexing a 3D wave from known scaled values. The wave is an image and its dimensions are always 1109x896x3 and I have necessarily scaled the wave as follows:

SetScale /p x -37/1321.25, 1/1321.25, "", root:theWave
SetScale /p y 846/1015, -1/1015, "", root:theWave

Now, I know if I open the image and use the cursor information panel I can see which row and column correspond to any particular point, however I'm lost as to how Igor is able to find these values. Knowing the dimension size, would it be possible to accomplish this by retrieving the axis labels (not the best word choice here, as these are the native labels Igor supplies so GetDimLabels couldn't work)?  For example, if I plot the point (0.62062)(0.37931)(0) I know the wave indices are 857 and 461 only because of the cursor information panel. How could I programmatically determine which indices correspond to a particular scaled pair of coordinates?

You can compute these numbers from DimDelta() and DimOffset(). And the recently-added ScaleToIndex() has Igor do the computation.