This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Return distance between endpoints of Distance tool

getDistance is not recommended. Use one of the ROI classes instead, described in ROI Creation Overview.


dist = getDistance(h)


dist = getDistance(h) returns the distance between the endpoints of the Distance tool, h.

Input Arguments

collapse all

Distance tool, specified as an imdistline object.

Output Arguments

collapse all

Distance between endpoints, returned as a numeric scalar. The data units of the distance are determined by the XData and YData properties of the underlying image. By default, the distance is measured in pixels.

Introduced before R2006a