This is an inelegant approach, but one we implemented years ago when we wanted to measure gold particles' shortest distances to a membrane.
We had the xy locations of each gold particle in an array and calculated for each particle every distance to the membrane and sorted for the shortest. While this was a n squared brute force approach, computers are fast enough that it worked fine. Initially we used the array function in Excel but then rewrote it as a macro in NIH-Image.
In this case, there would be two arrays, each one containing the XY locations of the edge of the magic wand selection. Calculate all distances of perimeter points and sort for the shortest. Certainly not elegant, but it will find the closest two points on the opposed perimeters.
-Michael C.
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Lasse
Sent: Tuesday, July 24, 2012 3:14 AM
To:
[hidden email]
Subject: Shortest distance between magic wand selections
Hi all you smart people!
When I have to magic wand selections in an image, and I would like to find the shortest distance between these two selections. How would you approach this problem?
Thanks in advance!
/Lasse
--
View this message in context:
http://imagej.1557.n6.nabble.com/Shortest-distance-between-magic-wand-selections-tp4999539.htmlSent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html