Re: Feature request: make line selection tool show dx/dy
Posted by
Herbie on
Jan 06, 2020; 2:07pm
URL: http://imagej.273.s1.nabble.com/Feature-request-make-line-selection-tool-show-dx-dy-tp5022813p5022815.html
Good day Adrian,
here is a macro that may help:
macro "straightLineParams [l]" {
h=getHeight()-1;
while (is("line")) {
getLine(x1, y1, x2, y2, lineWidth);
s=(y1-y2)/(x2-x1);
c=round(h-y1-s*x1);
showStatus("slope="+s+"; y-intercept="+c);
}
}
Please install the macro and make a line-selection, then type "l" and any
changes you make to the line will be displayed as the slope and the
y-intercept in the status bar.
Please note that slope and intercept are relative to the bottom left corner
of the image. If you prefer another convention, it is easy to adapt the
above macro code.
HTH
Herbie
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html