Re: Constructing line perpendicular to other line (saved in ROI manager)
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Mar 14, 2015; 4:38am
URL: http://imagej.273.s1.nabble.com/Constructing-line-perpendicular-to-other-line-saved-in-ROI-manager-tp5011962p5011963.html
> On Mar 13, 2015, at 6:36 PM, Mqoi Mgfsu <
[hidden email]> wrote:
>
> Hi everyone.
>
> does someone know how to create (automatically) a line that is perpendicular to a previously created straight line (saved in the ROI manager) in ImageJ/Fiji? Of course, you can do it manually, but that will never be a exactly perpendicular line.
> I'm sure that there already exists a simple solution, but I just cannot find it.
The following macro creates a line perpendicular to a previously created line in the ROI Manager.
-wayne
count = roiManager("count");
if (count==0)
exit("ROI Manager line selection required");
roiManager("select", count-1);
if (selectionType!=5)
exit("Straight line selection required");
run("Rotate...", "angle=90");
roiManager("Add");
roiManager("Show All without labels");
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html