Login  Register

Re: Constructing line perpendicular to other line (saved in ROI manager)

Posted by rafesgre on Mar 14, 2015; 4:41pm
URL: http://imagej.273.s1.nabble.com/Constructing-line-perpendicular-to-other-line-saved-in-ROI-manager-tp5011962p5011965.html

Hi wayne.

thank you very much for the macro!
Just two questions:
1) When I use the macro, it's only possible to draw a line that is perpendicular to the last line in the list of the ROI manager. Even if I select another line in the ROI manager, the new line will always be perpendicular to the last line in the ROI manager.
Is there a way to change this behaviour?
2) The newly created perpendicular line is always found at midlength of the "reference line" (= the previous line in the ROI manager). That is ok, because I can afterwards drag this line to the position where I would like to have it (however, I still have to modify it, because I also need a certain length). But is there also a possibility to draw the line that needs to be perpendicular (to the previous line) by starting from a point I choose and then attaching this line at 90° (i.e. perpendicular) to the previous line? So, to explain it another way:
  a) Start drawing the requested line from a a certain point
  b) Draw the line near to the previous line, to which it should be perpendicular
  c) The macro should now recognize that there's a "sticky" line to which our new line should be perpendicular to
  d) Complete the drawing of the line which should now be perpendicular to our "sticky" line and start from the point that we chose at a)

Is it possible, to do something like that?

Best wishes,
JK