// This macro labels the midpoint of a line selection. It uses a // special spline fit that converts the selection to one with points // spaced one pixel apart and then it draws the line and the // midpoint as an overlay. ÊÊrequires("1.43u"); ÊÊrun("Fit Spline", "straighten"); ÊÊgetSelectionCoordinates(x, y); ÊÊn = x.length; ÊÊrun("Add Selection...", "stroke=yellow"); ÊÊmakePoint(x[n/2],y[n/2]); ÊÊrun("Add Selection...", "stroke=red"); run("Select None");