Hello! This is my first time posting, please don’t hesitate to ask me questions or point things out I missed.
This is an example image of the types of patterns I see in my photos. I have a cluster of user identified points (multipoint tool), that then need to be analyzed for neighbor-neighbor distances. Note: I tried to identify my points via the threshold control, however, there isn’t enough contrast in my images to do this reliably.
The problem is that the plugin that runs Delaunay triangulation connects all neighbors. In my samples this isn’t what I want; some connections are extraneous. My idea was to take the readout of Delaunay Triangulation, filter for the connections I want, and then recalculate average neighbor distance. (Arrows are unwanted connections)
I found a macro posted on this forum to run Delaunay Triangulation analysis: [http://forum.imagej.net/t/measuring-distance-to-neigbours/10712].
This is a great start, and almost does exactly what I want. It prints a readout of coordinate pairs. I’d like to associate the coordinates with point names in the ROI Manager, filter them for connections I’d like to keep, and then recalculate the output: object, number of neighbors, average distance, and then overall average distance. I can do all this by hand using the coordinate readout- ugh please help me not have to do it that way.
The macro attempts to store the points from the coordinate readout using the segment of code below. However it does this wrong- it adds the same point multiple times, misses points, and the ones it does add aren’t associated with the readout numbering order.
(I tried the commented out in green section, still no go)
My basic idea was if I can get:
-ROI Manager to associate properly with the points
-user filter for correct connections
-feed list of correct coordinate connections to a macro
-end analysis of distance between neighbors, number of neighbors
And finally a nice wish:
-draw connected points that were counted.
I have more details as needed,
Thanks for the help!