Part of Magic Wand Roi to Segmented Line

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
ard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Part of Magic Wand Roi to Segmented Line

ard
We have the Magic Wand tool pick up the very irregular edge of an object quite well.
Unfortunately the ROI then also includes the loopback to the start of the ROI, often but not always coinciding with the edges of the image.
Is there a way to indicate 2 points on the ROI the Magic Wand picked, break the loop and discard the portion that follows the image's edge?
The objective is to measure the remaining path length of the segmented line thus created.
Removing part of the ROI by using other tools in combination with the modifier keys still keep the 'flyback' part of the path in the loop.
Thanks!
Ard
________________________________

AMC Disclaimer : https://www.amc.nl/disclaimer

________________________________

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Part of Magic Wand Roi to Segmented Line

Jerome Mutterer-3
Ard,
I wrote a tool that does this interactively. You'll find it here:
https://gist.github.com/mutterer/00b3fde529b3a5a1ea83181cafd4bf06
Sincerely,
Jerome.

2017-06-08 16:04 GMT+02:00 A. Jonker <[hidden email]>:

> We have the Magic Wand tool pick up the very irregular edge of an object
> quite well.
> Unfortunately the ROI then also includes the loopback to the start of the
> ROI, often but not always coinciding with the edges of the image.
> Is there a way to indicate 2 points on the ROI the Magic Wand picked,
> break the loop and discard the portion that follows the image's edge?
> The objective is to measure the remaining path length of the segmented
> line thus created.
> Removing part of the ROI by using other tools in combination with the
> modifier keys still keep the 'flyback' part of the path in the loop.
> Thanks!
> Ard
> ________________________________
>
> AMC Disclaimer : https://www.amc.nl/disclaimer
>
> ________________________________
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
ard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Part of Magic Wand Roi to Segmented Line

ard
Thanks Jerome, this got me started.
It took me a while to realise your macro starts to remove points at x[0],y[0] from getSelectionCoordinates(x,y) of the Wand tool ROi coordinates, while we are trying to keep x[n...m], y[n...m] where m not necessarily > n.
I'll be using the shift key to first set (an overlay at) n for x[n],y[n], then m for x[m],y[m] and remove the coordinates not between n and m.

Ard
Loading...