# Calculate internal angles of multiple polygonal ROI

Hi there, I was wondering whether there already exists a functionality to extract internal angles of ROI. I guess my case is even easier, as all my ROI are convex polygons. Any hint is much appreciated!

Good day,

just write a little ImageJ-macro.

You can easily get the corner coordinates by using

getSelectionCoordinates(xpoints, ypoints)

The rest is basic geometry (Law of Cosines).

Regards

Herbie

1 Like

Donât I get all selection boundary points of a ROI with this and not just the corners/vertices?

Why donât you simply try?

``````getSelectionCoordinates(xpoints, ypoints);
Array.show(xpoints,ypoints);
``````

Another way of getting the info is studying the documents:

getSelectionCoordinates(xpoints, ypoints)
Returns two arrays containing the X and Y coordinates, in pixels, of the points that define the current selection. See the SelectionCoordinates macro for an example. See also: selectionType, getSelectionBounds.

points that define the current selection

is what you want to know âŚ

Herbie

This doesnât really help. Given e.g. the attached image, and selected ROI, I can extract selection boundary points of each ROI:

// clean results
run(âClear Resultsâ);
// get all points
n = roiManager(âcountâ);
for (index = 0; index < n; index++) {
roiManager(âselectâ, index);
getSelectionCoordinates(x, y);
for (i = 0; i < x.length; i++) {
print(index + 1 + " " + x[i] + " " + y[i]);
}
}

But how would I cluster the points of a ROI for edges or find those points that represent the six vertices of a hexagon?

You changed the game!

Could you please provide an unprocessed raw image in PNG-format?

BTW, if these are regular hexagones, the angles are know a priori.

Herbie

Itâs just an example image. The images I work with contain tesselations with irregular polygons.

Iâd suggest that instead of selecting ROIs by Analyze Particles or similar (which will create traced ROIs instead of polygons), you invert the problem (and the image) and do a skeleton analysis on the border lines and points:

This would allow you to get all the intersection points easily.

1 Like

This would allow you to get all the intersection points easily.

Not sure what you have in mind here,

Best

Herbie

PS:
Lowpass-filtering a skeleton followed by maximum-search with suitable tolerance may indeed result in the corners but generally not in the correct sequence when using âgetSelectionCoordinates(xpoints, ypoints)â. However, the correct sequence is important if one computes the desired angles by applying the âLaw of Cosinesâ. Presently, I have no idea of a simple way of ordering the found maxima coordinates.

Ugly âŚ

@gedankenexperiment

if I understand you correctly, you could use the Array.getVertexAngles command which was added in ImageJ 1.51n.

Array.getVertexAngles(xArr, yArr, arm) - From a closed contour given by âxArrâ, âyArrâ, an array is returned holding vertex angles in degrees (straight=0, convex = positive if contour is clockwise). Set âarmâ=1 to calculate the angle from the closest vertex points left and right, or use arm>1 for more distant neighbours and smoother results. Requires 1.51n.

Ved

If I understood the issue here correctly, the hard part is actually getting the junction points that define your hexagons, as opposed to getting the entire list of points along the contour of each ROI that a traced ROI would give.

Hence my suggestion to use the AnalyzeSkeleton plugin.

Let me explain it with a small script illustrating the case. After taking the image posted by @gedankenexperiment, creating a binary mask from it where the border lines have intensity 255, then running Plugins > Skeleton > Skeletonize 2D/3D, I can feed the skeleton image to this Groovy script:

``````#@ ImagePlus imp

import sc.fiji.analyzeSkeleton.AnalyzeSkeleton_

an = new AnalyzeSkeleton_()

an.setup("", imp)
sk = an.run(0, false, false, imp, true, true)

sk.getGraph()[0].getEdges().each {
println "\${it.getV1().getPoints()} *** \${it.getV2().getPoints()}"
}

null
``````

which creates output such as:

``````[(66, 153, 0)] *** [(108, 153, 0)]
[(66, 153, 0)] *** [(66, 227, 0)]
[(66, 153, 0)] *** [(107, 81, 0), (108, 81, 0), (108, 80, 0)]
[(66, 227, 0)] *** [(108, 227, 0)]
[(66, 227, 0)] *** [(66, 300, 0)]
[(66, 300, 0)] *** [(108, 300, 0)]
[(66, 300, 0)] *** [(66, 373, 0)]
[(66, 373, 0)] *** [(108, 373, 0)]
[(66, 373, 0)] *** [(66, 446, 0)]
[(66, 446, 0)] *** [(108, 446, 0)]
[(66, 446, 0)] *** [(66, 520, 0)]
[(66, 520, 0)] *** [(108, 520, 0)]
[(66, 520, 0)] *** [(66, 593, 0)]
[(66, 593, 0)] *** [(108, 593, 0)]
[(66, 593, 0)] *** [(66, 666, 0)]
[(66, 666, 0)] *** [(108, 666, 0)]
[(66, 666, 0)] *** [(66, 739, 0)]
[(66, 739, 0)] *** [(108, 739, 0)]
[(66, 739, 0)] *** [(66, 812, 0)]
[(66, 812, 0)] *** [(108, 812, 0)]
[(66, 812, 0)] *** [(108, 885, 0)]
[(107, 81, 0), (108, 81, 0), (108, 80, 0)] *** [(129, 116, 0), (130, 117, 0), (129, 117, 0)]
[(107, 81, 0), (108, 81, 0), (108, 80, 0)] *** [(192, 80, 0), (193, 81, 0), (192, 81, 0)]
[(108, 153, 0)] *** [(129, 189, 0), (130, 190, 0), (129, 190, 0)]
[(108, 153, 0)] *** [(129, 116, 0), (130, 117, 0), (129, 117, 0)]
[(108, 227, 0)] *** [(129, 263, 0), (130, 263, 0), (129, 264, 0)]
[(108, 227, 0)] *** [(129, 189, 0), (130, 190, 0), (129, 190, 0)]
[(108, 300, 0)] *** [(129, 336, 0), (130, 337, 0), (129, 337, 0)]
[(108, 300, 0)] *** [(129, 263, 0), (130, 263, 0), (129, 264, 0)]
[(108, 373, 0)] *** [(129, 409, 0), (130, 410, 0), (129, 410, 0)]
[(108, 373, 0)] *** [(129, 336, 0), (130, 337, 0), (129, 337, 0)]
[(108, 446, 0)] *** [(129, 482, 0), (130, 483, 0), (129, 483, 0)]
[(108, 446, 0)] *** [(129, 409, 0), (130, 410, 0), (129, 410, 0)]
[(108, 520, 0)] *** [(130, 556, 0)]
[(108, 520, 0)] *** [(129, 482, 0), (130, 483, 0), (129, 483, 0)]
[(108, 593, 0)] *** [(129, 629, 0), (130, 629, 0), (129, 630, 0)]
[(108, 593, 0)] *** [(130, 556, 0)]
[(108, 666, 0)] *** [(129, 702, 0), (130, 703, 0), (129, 703, 0)]
[(108, 666, 0)] *** [(129, 629, 0), (130, 629, 0), (129, 630, 0)]
[(108, 739, 0)] *** [(129, 775, 0), (130, 776, 0), (129, 776, 0)]
[(108, 739, 0)] *** [(129, 702, 0), (130, 703, 0), (129, 703, 0)]
[(108, 812, 0)] *** [(129, 848, 0), (130, 849, 0), (129, 849, 0)]
[(108, 812, 0)] *** [(129, 775, 0), (130, 776, 0), (129, 776, 0)]
[(108, 885, 0)] *** [(193, 886, 0)]
[(108, 885, 0)] *** [(129, 848, 0), (130, 849, 0), (129, 849, 0)]
[(129, 116, 0), (130, 117, 0), (129, 117, 0)] *** [(171, 117, 0)]
[(129, 189, 0), (130, 190, 0), (129, 190, 0)] *** [(171, 190, 0)]
[(129, 263, 0), (130, 263, 0), (129, 264, 0)] *** [(171, 263, 0)]
[(129, 336, 0), (130, 337, 0), (129, 337, 0)] *** [(171, 336, 0)]
[(129, 409, 0), (130, 410, 0), (129, 410, 0)] *** [(171, 410, 0)]
[(129, 482, 0), (130, 483, 0), (129, 483, 0)] *** [(171, 483, 0)]
[(129, 629, 0), (130, 629, 0), (129, 630, 0)] *** [(171, 629, 0)]
[(129, 702, 0), (130, 703, 0), (129, 703, 0)] *** [(171, 702, 0)]
[(129, 775, 0), (130, 776, 0), (129, 776, 0)] *** [(171, 776, 0)]
[(129, 848, 0), (130, 849, 0), (129, 849, 0)] *** [(171, 849, 0)]
[(130, 556, 0)] *** [(171, 556, 0)]
[(171, 117, 0)] *** [(193, 153, 0)]
[(171, 117, 0)] *** [(192, 80, 0), (193, 81, 0), (192, 81, 0)]
[(171, 190, 0)] *** [(193, 227, 0)]
[(171, 190, 0)] *** [(193, 153, 0)]
[(171, 263, 0)] *** [(193, 300, 0)]
[(171, 263, 0)] *** [(193, 227, 0)]
[(171, 336, 0)] *** [(193, 373, 0)]
[(171, 336, 0)] *** [(193, 300, 0)]
[(171, 410, 0)] *** [(193, 446, 0)]
[(171, 410, 0)] *** [(193, 373, 0)]
[(171, 483, 0)] *** [(193, 520, 0)]
[(171, 483, 0)] *** [(193, 446, 0)]
[(171, 556, 0)] *** [(193, 593, 0)]
[(171, 556, 0)] *** [(193, 520, 0)]
[(171, 629, 0)] *** [(193, 666, 0)]
[(171, 629, 0)] *** [(193, 593, 0)]
[(171, 702, 0)] *** [(193, 739, 0)]
[(171, 702, 0)] *** [(193, 666, 0)]
[(171, 776, 0)] *** [(193, 812, 0)]
[(171, 776, 0)] *** [(193, 739, 0)]
[(171, 849, 0)] *** [(193, 886, 0)]
[(171, 849, 0)] *** [(193, 812, 0)]
[(192, 80, 0), (193, 81, 0), (192, 81, 0)] *** [(234, 81, 0), (235, 81, 0), (235, 80, 0)]
[(193, 153, 0)] *** [(235, 154, 0)]
[(193, 227, 0)] *** [(235, 227, 0)]
[(193, 300, 0)] *** [(235, 300, 0)]
[(193, 373, 0)] *** [(235, 373, 0)]
[(193, 446, 0)] *** [(235, 446, 0)]
[(193, 520, 0)] *** [(235, 520, 0)]
[(193, 593, 0)] *** [(235, 593, 0)]
[(193, 666, 0)] *** [(235, 666, 0)]
[(193, 739, 0)] *** [(235, 739, 0)]
[(193, 812, 0)] *** [(235, 812, 0)]
[(193, 886, 0)] *** [(234, 886, 0), (235, 886, 0), (235, 885, 0)]
[(234, 81, 0), (235, 81, 0), (235, 80, 0)] *** [(256, 117, 0)]
[(234, 81, 0), (235, 81, 0), (235, 80, 0)] *** [(319, 80, 0), (320, 81, 0), (319, 81, 0)]
[(234, 886, 0), (235, 886, 0), (235, 885, 0)] *** [(320, 886, 0)]
[(234, 886, 0), (235, 886, 0), (235, 885, 0)] *** [(256, 849, 0)]
[(235, 154, 0)] *** [(256, 190, 0)]
[(235, 154, 0)] *** [(256, 117, 0)]
[(235, 227, 0)] *** [(256, 263, 0)]
[(235, 227, 0)] *** [(256, 190, 0)]
[(235, 300, 0)] *** [(256, 336, 0), (257, 337, 0), (256, 337, 0)]
[(235, 300, 0)] *** [(256, 263, 0)]
[(235, 373, 0)] *** [(256, 409, 0), (257, 410, 0), (256, 410, 0)]
[(235, 373, 0)] *** [(256, 336, 0), (257, 337, 0), (256, 337, 0)]
[(235, 446, 0)] *** [(256, 483, 0)]
[(235, 446, 0)] *** [(256, 409, 0), (257, 410, 0), (256, 410, 0)]
[(235, 520, 0)] *** [(256, 556, 0)]
[(235, 520, 0)] *** [(256, 483, 0)]
[(235, 593, 0)] *** [(256, 629, 0), (257, 629, 0), (256, 630, 0)]
[(235, 593, 0)] *** [(256, 556, 0)]
[(235, 666, 0)] *** [(256, 702, 0), (257, 703, 0), (256, 703, 0)]
[(235, 666, 0)] *** [(256, 629, 0), (257, 629, 0), (256, 630, 0)]
[(235, 739, 0)] *** [(256, 775, 0), (257, 776, 0), (256, 776, 0)]
[(235, 739, 0)] *** [(256, 702, 0), (257, 703, 0), (256, 703, 0)]
[(235, 812, 0)] *** [(256, 849, 0)]
[(235, 812, 0)] *** [(256, 775, 0), (257, 776, 0), (256, 776, 0)]
[(256, 117, 0)] *** [(298, 117, 0)]
[(256, 190, 0)] *** [(298, 190, 0)]
[(256, 263, 0)] *** [(298, 263, 0)]
[(256, 336, 0), (257, 337, 0), (256, 337, 0)] *** [(298, 337, 0)]
[(256, 409, 0), (257, 410, 0), (256, 410, 0)] *** [(298, 410, 0)]
[(256, 483, 0)] *** [(298, 483, 0)]
[(256, 556, 0)] *** [(298, 556, 0)]
[(256, 629, 0), (257, 629, 0), (256, 630, 0)] *** [(298, 629, 0)]
[(256, 702, 0), (257, 703, 0), (256, 703, 0)] *** [(298, 703, 0)]
[(256, 775, 0), (257, 776, 0), (256, 776, 0)] *** [(298, 776, 0)]
[(256, 849, 0)] *** [(298, 849, 0)]
[(298, 117, 0)] *** [(319, 153, 0), (320, 154, 0), (319, 154, 0)]
[(298, 117, 0)] *** [(319, 80, 0), (320, 81, 0), (319, 81, 0)]
[(298, 190, 0)] *** [(320, 227, 0)]
[(298, 190, 0)] *** [(319, 153, 0), (320, 154, 0), (319, 154, 0)]
[(298, 263, 0)] *** [(320, 300, 0)]
[(298, 263, 0)] *** [(320, 227, 0)]
[(298, 337, 0)] *** [(320, 373, 0)]
[(298, 337, 0)] *** [(320, 300, 0)]
[(298, 410, 0)] *** [(320, 446, 0)]
[(298, 410, 0)] *** [(320, 373, 0)]
[(298, 483, 0)] *** [(320, 520, 0)]
[(298, 483, 0)] *** [(320, 446, 0)]
[(298, 556, 0)] *** [(320, 593, 0)]
[(298, 556, 0)] *** [(320, 520, 0)]
[(298, 629, 0)] *** [(320, 666, 0)]
[(298, 629, 0)] *** [(320, 593, 0)]
[(298, 703, 0)] *** [(320, 739, 0)]
[(298, 703, 0)] *** [(320, 666, 0)]
[(298, 776, 0)] *** [(320, 812, 0)]
[(298, 776, 0)] *** [(320, 739, 0)]
[(298, 849, 0)] *** [(320, 886, 0)]
[(298, 849, 0)] *** [(320, 812, 0)]
[(319, 80, 0), (320, 81, 0), (319, 81, 0)] *** [(361, 81, 0), (362, 81, 0), (362, 80, 0)]
[(319, 153, 0), (320, 154, 0), (319, 154, 0)] *** [(361, 153, 0)]
[(320, 227, 0)] *** [(361, 227, 0)]
[(320, 300, 0)] *** [(361, 300, 0)]
[(320, 373, 0)] *** [(361, 373, 0)]
[(320, 446, 0)] *** [(361, 446, 0)]
[(320, 520, 0)] *** [(362, 520, 0)]
[(320, 593, 0)] *** [(361, 593, 0)]
[(320, 666, 0)] *** [(361, 666, 0)]
[(320, 739, 0)] *** [(361, 739, 0)]
[(320, 812, 0)] *** [(362, 812, 0)]
[(320, 886, 0)] *** [(361, 886, 0), (362, 886, 0), (362, 885, 0)]
[(361, 81, 0), (362, 81, 0), (362, 80, 0)] *** [(383, 117, 0)]
[(361, 81, 0), (362, 81, 0), (362, 80, 0)] *** [(446, 80, 0), (447, 81, 0), (446, 81, 0)]
[(361, 153, 0)] *** [(383, 190, 0)]
[(361, 153, 0)] *** [(383, 117, 0)]
[(361, 227, 0)] *** [(383, 263, 0)]
[(361, 227, 0)] *** [(383, 190, 0)]
[(361, 300, 0)] *** [(383, 336, 0), (384, 337, 0), (383, 337, 0)]
[(361, 300, 0)] *** [(383, 263, 0)]
[(361, 373, 0)] *** [(383, 409, 0), (384, 410, 0), (383, 410, 0)]
[(361, 373, 0)] *** [(383, 336, 0), (384, 337, 0), (383, 337, 0)]
[(361, 446, 0)] *** [(383, 483, 0)]
[(361, 446, 0)] *** [(383, 409, 0), (384, 410, 0), (383, 410, 0)]
[(361, 593, 0)] *** [(383, 629, 0)]
[(361, 593, 0)] *** [(383, 556, 0)]
[(361, 666, 0)] *** [(383, 702, 0), (384, 703, 0), (383, 703, 0)]
[(361, 666, 0)] *** [(383, 629, 0)]
[(361, 739, 0)] *** [(383, 776, 0)]
[(361, 739, 0)] *** [(383, 702, 0), (384, 703, 0), (383, 703, 0)]
[(361, 886, 0), (362, 886, 0), (362, 885, 0)] *** [(446, 885, 0)]
[(361, 886, 0), (362, 886, 0), (362, 885, 0)] *** [(383, 849, 0)]
[(362, 520, 0)] *** [(383, 556, 0)]
[(362, 520, 0)] *** [(383, 483, 0)]
[(362, 812, 0)] *** [(383, 849, 0)]
[(362, 812, 0)] *** [(383, 776, 0)]
[(383, 117, 0)] *** [(425, 117, 0)]
[(383, 190, 0)] *** [(425, 190, 0)]
[(383, 263, 0)] *** [(425, 263, 0)]
[(383, 336, 0), (384, 337, 0), (383, 337, 0)] *** [(425, 337, 0)]
[(383, 409, 0), (384, 410, 0), (383, 410, 0)] *** [(425, 410, 0)]
[(383, 483, 0)] *** [(425, 483, 0)]
[(383, 556, 0)] *** [(425, 556, 0)]
[(383, 629, 0)] *** [(425, 629, 0)]
[(383, 702, 0), (384, 703, 0), (383, 703, 0)] *** [(425, 703, 0)]
[(383, 776, 0)] *** [(425, 776, 0)]
[(383, 849, 0)] *** [(425, 849, 0)]
[(425, 117, 0)] *** [(446, 153, 0), (447, 154, 0), (446, 154, 0)]
[(425, 117, 0)] *** [(446, 80, 0), (447, 81, 0), (446, 81, 0)]
[(425, 190, 0)] *** [(446, 226, 0), (447, 227, 0), (446, 227, 0)]
[(425, 190, 0)] *** [(446, 153, 0), (447, 154, 0), (446, 154, 0)]
[(425, 263, 0)] *** [(446, 299, 0), (447, 300, 0), (446, 300, 0)]
[(425, 263, 0)] *** [(446, 226, 0), (447, 227, 0), (446, 227, 0)]
[(425, 337, 0)] *** [(446, 373, 0), (447, 373, 0), (446, 374, 0)]
[(425, 337, 0)] *** [(446, 299, 0), (447, 300, 0), (446, 300, 0)]
[(425, 410, 0)] *** [(447, 446, 0)]
[(425, 410, 0)] *** [(446, 373, 0), (447, 373, 0), (446, 374, 0)]
[(425, 483, 0)] *** [(446, 519, 0), (447, 519, 0), (446, 520, 0)]
[(425, 483, 0)] *** [(447, 446, 0)]
[(425, 556, 0)] *** [(446, 592, 0), (447, 593, 0), (446, 593, 0)]
[(425, 556, 0)] *** [(446, 519, 0), (447, 519, 0), (446, 520, 0)]
[(425, 629, 0)] *** [(446, 665, 0), (447, 666, 0), (446, 666, 0)]
[(425, 629, 0)] *** [(446, 592, 0), (447, 593, 0), (446, 593, 0)]
[(425, 703, 0)] *** [(447, 739, 0)]
[(425, 703, 0)] *** [(446, 665, 0), (447, 666, 0), (446, 666, 0)]
[(425, 776, 0)] *** [(446, 812, 0), (447, 812, 0), (446, 813, 0)]
[(425, 776, 0)] *** [(447, 739, 0)]
[(425, 849, 0)] *** [(446, 885, 0)]
[(425, 849, 0)] *** [(446, 812, 0), (447, 812, 0), (446, 813, 0)]
[(446, 80, 0), (447, 81, 0), (446, 81, 0)] *** [(488, 81, 0)]
[(446, 153, 0), (447, 154, 0), (446, 154, 0)] *** [(488, 153, 0)]
[(446, 226, 0), (447, 227, 0), (446, 227, 0)] *** [(488, 227, 0)]
[(446, 299, 0), (447, 300, 0), (446, 300, 0)] *** [(488, 300, 0)]
[(446, 373, 0), (447, 373, 0), (446, 374, 0)] *** [(488, 373, 0)]
[(446, 519, 0), (447, 519, 0), (446, 520, 0)] *** [(488, 519, 0)]
[(446, 592, 0), (447, 593, 0), (446, 593, 0)] *** [(488, 593, 0)]
[(446, 665, 0), (447, 666, 0), (446, 666, 0)] *** [(488, 666, 0)]
[(446, 812, 0), (447, 812, 0), (446, 813, 0)] *** [(488, 812, 0)]
[(446, 885, 0)] *** [(488, 886, 0), (489, 886, 0), (489, 885, 0)]
[(447, 446, 0)] *** [(488, 446, 0)]
[(447, 739, 0)] *** [(488, 739, 0)]
[(488, 81, 0)] *** [(510, 117, 0)]
[(488, 81, 0)] *** [(573, 80, 0), (574, 81, 0), (573, 81, 0)]
[(488, 153, 0)] *** [(510, 190, 0)]
[(488, 153, 0)] *** [(510, 117, 0)]
[(488, 227, 0)] *** [(510, 263, 0)]
[(488, 227, 0)] *** [(510, 190, 0)]
[(488, 300, 0)] *** [(510, 337, 0)]
[(488, 300, 0)] *** [(510, 263, 0)]
[(488, 373, 0)] *** [(510, 410, 0)]
[(488, 373, 0)] *** [(510, 337, 0)]
[(488, 446, 0)] *** [(510, 483, 0)]
[(488, 446, 0)] *** [(510, 410, 0)]
[(488, 519, 0)] *** [(510, 556, 0)]
[(488, 519, 0)] *** [(510, 483, 0)]
[(488, 593, 0)] *** [(510, 629, 0)]
[(488, 593, 0)] *** [(510, 556, 0)]
[(488, 666, 0)] *** [(510, 702, 0)]
[(488, 666, 0)] *** [(510, 629, 0)]
[(488, 739, 0)] *** [(510, 776, 0)]
[(488, 739, 0)] *** [(510, 702, 0)]
[(488, 812, 0)] *** [(510, 849, 0)]
[(488, 812, 0)] *** [(510, 776, 0)]
[(488, 886, 0), (489, 886, 0), (489, 885, 0)] *** [(573, 885, 0)]
[(488, 886, 0), (489, 886, 0), (489, 885, 0)] *** [(510, 849, 0)]
[(510, 117, 0)] *** [(552, 117, 0)]
[(510, 190, 0)] *** [(552, 190, 0)]
[(510, 263, 0)] *** [(552, 263, 0)]
[(510, 337, 0)] *** [(552, 337, 0)]
[(510, 410, 0)] *** [(552, 410, 0)]
[(510, 483, 0)] *** [(552, 483, 0)]
[(510, 556, 0)] *** [(552, 556, 0)]
[(510, 629, 0)] *** [(552, 629, 0)]
[(510, 702, 0)] *** [(552, 703, 0)]
[(510, 776, 0)] *** [(552, 776, 0)]
[(510, 849, 0)] *** [(552, 849, 0)]
[(552, 117, 0)] *** [(573, 153, 0), (574, 154, 0), (573, 154, 0)]
[(552, 117, 0)] *** [(573, 80, 0), (574, 81, 0), (573, 81, 0)]
[(552, 190, 0)] *** [(573, 226, 0), (574, 227, 0), (573, 227, 0)]
[(552, 190, 0)] *** [(573, 153, 0), (574, 154, 0), (573, 154, 0)]
[(552, 263, 0)] *** [(573, 300, 0)]
[(552, 263, 0)] *** [(573, 226, 0), (574, 227, 0), (573, 227, 0)]
[(552, 337, 0)] *** [(573, 373, 0)]
[(552, 337, 0)] *** [(573, 300, 0)]
[(552, 410, 0)] *** [(573, 446, 0)]
[(552, 410, 0)] *** [(573, 373, 0)]
[(552, 483, 0)] *** [(573, 519, 0), (574, 519, 0), (573, 520, 0)]
[(552, 483, 0)] *** [(573, 446, 0)]
[(552, 556, 0)] *** [(573, 592, 0), (574, 593, 0), (573, 593, 0)]
[(552, 556, 0)] *** [(573, 519, 0), (574, 519, 0), (573, 520, 0)]
[(552, 629, 0)] *** [(573, 665, 0), (574, 666, 0), (573, 666, 0)]
[(552, 629, 0)] *** [(573, 592, 0), (574, 593, 0), (573, 593, 0)]
[(552, 703, 0)] *** [(573, 739, 0)]
[(552, 703, 0)] *** [(573, 665, 0), (574, 666, 0), (573, 666, 0)]
[(552, 776, 0)] *** [(573, 812, 0), (574, 812, 0), (573, 813, 0)]
[(552, 776, 0)] *** [(573, 739, 0)]
[(552, 849, 0)] *** [(573, 885, 0)]
[(552, 849, 0)] *** [(573, 812, 0), (574, 812, 0), (573, 813, 0)]
[(573, 80, 0), (574, 81, 0), (573, 81, 0)] *** [(615, 81, 0)]
[(573, 153, 0), (574, 154, 0), (573, 154, 0)] *** [(615, 153, 0)]
[(573, 226, 0), (574, 227, 0), (573, 227, 0)] *** [(615, 227, 0)]
[(573, 300, 0)] *** [(615, 300, 0)]
[(573, 373, 0)] *** [(615, 373, 0)]
[(573, 446, 0)] *** [(615, 446, 0)]
[(573, 519, 0), (574, 519, 0), (573, 520, 0)] *** [(615, 519, 0)]
[(573, 592, 0), (574, 593, 0), (573, 593, 0)] *** [(615, 593, 0)]
[(573, 665, 0), (574, 666, 0), (573, 666, 0)] *** [(615, 666, 0)]
[(573, 739, 0)] *** [(615, 739, 0)]
[(573, 812, 0), (574, 812, 0), (573, 813, 0)] *** [(615, 812, 0)]
[(573, 885, 0)] *** [(615, 886, 0), (616, 886, 0), (616, 885, 0)]
[(615, 81, 0)] *** [(637, 117, 0)]
[(615, 81, 0)] *** [(700, 80, 0)]
[(615, 153, 0)] *** [(637, 190, 0)]
[(615, 153, 0)] *** [(637, 117, 0)]
[(615, 227, 0)] *** [(637, 263, 0)]
[(615, 227, 0)] *** [(637, 190, 0)]
[(615, 300, 0)] *** [(636, 336, 0), (637, 337, 0), (636, 337, 0)]
[(615, 300, 0)] *** [(637, 263, 0)]
[(615, 373, 0)] *** [(637, 410, 0)]
[(615, 373, 0)] *** [(636, 336, 0), (637, 337, 0), (636, 337, 0)]
[(615, 446, 0)] *** [(637, 483, 0)]
[(615, 446, 0)] *** [(637, 410, 0)]
[(615, 519, 0)] *** [(637, 556, 0)]
[(615, 519, 0)] *** [(637, 483, 0)]
[(615, 593, 0)] *** [(637, 629, 0)]
[(615, 593, 0)] *** [(637, 556, 0)]
[(615, 666, 0)] *** [(636, 702, 0), (637, 703, 0), (636, 703, 0)]
[(615, 666, 0)] *** [(637, 629, 0)]
[(615, 739, 0)] *** [(637, 776, 0)]
[(615, 739, 0)] *** [(636, 702, 0), (637, 703, 0), (636, 703, 0)]
[(615, 812, 0)] *** [(637, 849, 0)]
[(615, 812, 0)] *** [(637, 776, 0)]
[(615, 886, 0), (616, 886, 0), (616, 885, 0)] *** [(700, 885, 0)]
[(615, 886, 0), (616, 886, 0), (616, 885, 0)] *** [(637, 849, 0)]
[(636, 336, 0), (637, 337, 0), (636, 337, 0)] *** [(678, 337, 0), (679, 337, 0), (679, 336, 0)]
[(636, 702, 0), (637, 703, 0), (636, 703, 0)] *** [(679, 703, 0)]
[(637, 117, 0)] *** [(678, 117, 0)]
[(637, 190, 0)] *** [(678, 190, 0)]
[(637, 263, 0)] *** [(678, 263, 0)]
[(637, 410, 0)] *** [(678, 410, 0)]
[(637, 483, 0)] *** [(678, 483, 0)]
[(637, 556, 0)] *** [(678, 556, 0)]
[(637, 629, 0)] *** [(678, 629, 0)]
[(637, 776, 0)] *** [(679, 776, 0)]
[(637, 849, 0)] *** [(678, 849, 0)]
[(678, 117, 0)] *** [(700, 153, 0)]
[(678, 117, 0)] *** [(700, 80, 0)]
[(678, 190, 0)] *** [(700, 226, 0), (701, 227, 0), (700, 227, 0)]
[(678, 190, 0)] *** [(700, 153, 0)]
[(678, 263, 0)] *** [(700, 300, 0)]
[(678, 263, 0)] *** [(700, 226, 0), (701, 227, 0), (700, 227, 0)]
[(678, 337, 0), (679, 337, 0), (679, 336, 0)] *** [(700, 373, 0)]
[(678, 337, 0), (679, 337, 0), (679, 336, 0)] *** [(700, 300, 0)]
[(678, 410, 0)] *** [(700, 446, 0)]
[(678, 410, 0)] *** [(700, 373, 0)]
[(678, 483, 0)] *** [(700, 519, 0), (701, 519, 0), (700, 520, 0)]
[(678, 483, 0)] *** [(700, 446, 0)]
[(678, 556, 0)] *** [(700, 593, 0)]
[(678, 556, 0)] *** [(700, 519, 0), (701, 519, 0), (700, 520, 0)]
[(678, 629, 0)] *** [(700, 666, 0)]
[(678, 629, 0)] *** [(700, 593, 0)]
[(678, 849, 0)] *** [(700, 885, 0)]
[(678, 849, 0)] *** [(700, 812, 0)]
[(679, 703, 0)] *** [(700, 739, 0)]
[(679, 703, 0)] *** [(700, 666, 0)]
[(679, 776, 0)] *** [(700, 812, 0)]
[(679, 776, 0)] *** [(700, 739, 0)]
[(700, 80, 0)] *** [(742, 80, 0), (743, 81, 0), (743, 80, 0)]
[(700, 153, 0)] *** [(742, 154, 0)]
[(700, 226, 0), (701, 227, 0), (700, 227, 0)] *** [(742, 227, 0)]
[(700, 300, 0)] *** [(742, 300, 0)]
[(700, 373, 0)] *** [(742, 373, 0)]
[(700, 446, 0)] *** [(742, 446, 0)]
[(700, 519, 0), (701, 519, 0), (700, 520, 0)] *** [(742, 519, 0)]
[(700, 593, 0)] *** [(742, 593, 0)]
[(700, 666, 0)] *** [(742, 666, 0)]
[(700, 739, 0)] *** [(742, 739, 0)]
[(700, 812, 0)] *** [(742, 812, 0)]
[(700, 885, 0)] *** [(742, 885, 0)]
[(742, 80, 0), (743, 81, 0), (743, 80, 0)] *** [(763, 116, 0), (764, 117, 0), (763, 117, 0)]
[(742, 80, 0), (743, 81, 0), (743, 80, 0)] *** [(826, 80, 0), (827, 81, 0), (826, 81, 0)]
[(742, 154, 0)] *** [(764, 190, 0)]
[(742, 154, 0)] *** [(763, 116, 0), (764, 117, 0), (763, 117, 0)]
[(742, 227, 0)] *** [(764, 263, 0)]
[(742, 227, 0)] *** [(764, 190, 0)]
[(742, 300, 0)] *** [(763, 336, 0), (764, 337, 0), (763, 337, 0)]
[(742, 300, 0)] *** [(764, 263, 0)]
[(742, 373, 0)] *** [(763, 409, 0), (764, 410, 0), (763, 410, 0)]
[(742, 373, 0)] *** [(763, 336, 0), (764, 337, 0), (763, 337, 0)]
[(742, 446, 0)] *** [(763, 482, 0), (764, 483, 0), (763, 483, 0)]
[(742, 446, 0)] *** [(763, 409, 0), (764, 410, 0), (763, 410, 0)]
[(742, 519, 0)] *** [(764, 556, 0)]
[(742, 519, 0)] *** [(763, 482, 0), (764, 483, 0), (763, 483, 0)]
[(742, 593, 0)] *** [(763, 629, 0), (764, 629, 0), (763, 630, 0)]
[(742, 593, 0)] *** [(764, 556, 0)]
[(742, 666, 0)] *** [(763, 702, 0), (764, 703, 0), (763, 703, 0)]
[(742, 666, 0)] *** [(763, 629, 0), (764, 629, 0), (763, 630, 0)]
[(742, 739, 0)] *** [(763, 775, 0), (764, 776, 0), (763, 776, 0)]
[(742, 739, 0)] *** [(763, 702, 0), (764, 703, 0), (763, 703, 0)]
[(742, 812, 0)] *** [(764, 849, 0)]
[(742, 812, 0)] *** [(763, 775, 0), (764, 776, 0), (763, 776, 0)]
[(742, 885, 0)] *** [(827, 886, 0)]
[(742, 885, 0)] *** [(764, 849, 0)]
[(763, 116, 0), (764, 117, 0), (763, 117, 0)] *** [(805, 117, 0)]
[(763, 336, 0), (764, 337, 0), (763, 337, 0)] *** [(805, 336, 0)]
[(763, 409, 0), (764, 410, 0), (763, 410, 0)] *** [(805, 410, 0)]
[(763, 482, 0), (764, 483, 0), (763, 483, 0)] *** [(805, 483, 0)]
[(763, 629, 0), (764, 629, 0), (763, 630, 0)] *** [(805, 629, 0)]
[(763, 702, 0), (764, 703, 0), (763, 703, 0)] *** [(805, 703, 0)]
[(763, 775, 0), (764, 776, 0), (763, 776, 0)] *** [(805, 776, 0)]
[(764, 190, 0)] *** [(805, 190, 0)]
[(764, 263, 0)] *** [(805, 263, 0)]
[(764, 556, 0)] *** [(805, 556, 0)]
[(764, 849, 0)] *** [(805, 849, 0)]
[(805, 117, 0)] *** [(827, 153, 0)]
[(805, 117, 0)] *** [(826, 80, 0), (827, 81, 0), (826, 81, 0)]
[(805, 190, 0)] *** [(827, 227, 0)]
[(805, 190, 0)] *** [(827, 153, 0)]
[(805, 263, 0)] *** [(827, 300, 0)]
[(805, 263, 0)] *** [(827, 227, 0)]
[(805, 336, 0)] *** [(827, 373, 0)]
[(805, 336, 0)] *** [(827, 300, 0)]
[(805, 410, 0)] *** [(827, 446, 0)]
[(805, 410, 0)] *** [(827, 373, 0)]
[(805, 483, 0)] *** [(827, 519, 0)]
[(805, 483, 0)] *** [(827, 446, 0)]
[(805, 556, 0)] *** [(827, 593, 0)]
[(805, 556, 0)] *** [(827, 519, 0)]
[(805, 629, 0)] *** [(827, 666, 0)]
[(805, 629, 0)] *** [(827, 593, 0)]
[(805, 703, 0)] *** [(827, 739, 0)]
[(805, 703, 0)] *** [(827, 666, 0)]
[(805, 776, 0)] *** [(827, 812, 0)]
[(805, 776, 0)] *** [(827, 739, 0)]
[(805, 849, 0)] *** [(827, 886, 0)]
[(805, 849, 0)] *** [(827, 812, 0)]
[(826, 80, 0), (827, 81, 0), (826, 81, 0)] *** [(869, 80, 0)]
[(827, 153, 0)] *** [(869, 154, 0)]
[(827, 227, 0)] *** [(869, 227, 0)]
[(827, 300, 0)] *** [(869, 300, 0)]
[(827, 373, 0)] *** [(869, 373, 0)]
[(827, 446, 0)] *** [(869, 446, 0)]
[(827, 519, 0)] *** [(869, 519, 0)]
[(827, 593, 0)] *** [(869, 593, 0)]
[(827, 666, 0)] *** [(869, 666, 0)]
[(827, 739, 0)] *** [(869, 739, 0)]
[(827, 812, 0)] *** [(869, 812, 0)]
[(827, 886, 0)] *** [(869, 885, 0)]
[(869, 80, 0)] *** [(890, 116, 0), (891, 117, 0), (890, 117, 0)]
[(869, 80, 0)] *** [(932, 117, 0)]
[(869, 154, 0)] *** [(890, 189, 0), (891, 190, 0), (890, 190, 0)]
[(869, 154, 0)] *** [(890, 116, 0), (891, 117, 0), (890, 117, 0)]
[(869, 227, 0)] *** [(890, 263, 0), (891, 263, 0), (890, 264, 0)]
[(869, 227, 0)] *** [(890, 189, 0), (891, 190, 0), (890, 190, 0)]
[(869, 300, 0)] *** [(890, 336, 0), (891, 337, 0), (890, 337, 0)]
[(869, 300, 0)] *** [(890, 263, 0), (891, 263, 0), (890, 264, 0)]
[(869, 373, 0)] *** [(890, 409, 0), (891, 410, 0), (890, 410, 0)]
[(869, 373, 0)] *** [(890, 336, 0), (891, 337, 0), (890, 337, 0)]
[(869, 446, 0)] *** [(890, 482, 0), (891, 483, 0), (890, 483, 0)]
[(869, 446, 0)] *** [(890, 409, 0), (891, 410, 0), (890, 410, 0)]
[(869, 519, 0)] *** [(890, 556, 0)]
[(869, 519, 0)] *** [(890, 482, 0), (891, 483, 0), (890, 483, 0)]
[(869, 593, 0)] *** [(890, 629, 0), (891, 629, 0), (890, 630, 0)]
[(869, 593, 0)] *** [(890, 556, 0)]
[(869, 666, 0)] *** [(890, 702, 0), (891, 703, 0), (890, 703, 0)]
[(869, 666, 0)] *** [(890, 629, 0), (891, 629, 0), (890, 630, 0)]
[(869, 739, 0)] *** [(890, 775, 0), (891, 776, 0), (890, 776, 0)]
[(869, 739, 0)] *** [(890, 702, 0), (891, 703, 0), (890, 703, 0)]
[(869, 812, 0)] *** [(891, 849, 0)]
[(869, 812, 0)] *** [(890, 775, 0), (891, 776, 0), (890, 776, 0)]
[(869, 885, 0)] *** [(932, 849, 0)]
[(869, 885, 0)] *** [(891, 849, 0)]
[(890, 116, 0), (891, 117, 0), (890, 117, 0)] *** [(932, 117, 0)]
[(890, 189, 0), (891, 190, 0), (890, 190, 0)] *** [(932, 190, 0)]
[(890, 263, 0), (891, 263, 0), (890, 264, 0)] *** [(932, 263, 0)]
[(890, 336, 0), (891, 337, 0), (890, 337, 0)] *** [(932, 336, 0)]
[(890, 409, 0), (891, 410, 0), (890, 410, 0)] *** [(932, 410, 0)]
[(890, 482, 0), (891, 483, 0), (890, 483, 0)] *** [(932, 483, 0)]
[(890, 556, 0)] *** [(932, 556, 0)]
[(890, 629, 0), (891, 629, 0), (890, 630, 0)] *** [(932, 629, 0)]
[(890, 702, 0), (891, 703, 0), (890, 703, 0)] *** [(932, 703, 0)]
[(890, 775, 0), (891, 776, 0), (890, 776, 0)] *** [(932, 776, 0)]
[(891, 849, 0)] *** [(932, 849, 0)]
[(932, 117, 0)] *** [(932, 190, 0)]
[(932, 190, 0)] *** [(932, 263, 0)]
[(932, 263, 0)] *** [(932, 336, 0)]
[(932, 336, 0)] *** [(932, 410, 0)]
[(932, 410, 0)] *** [(932, 483, 0)]
[(932, 483, 0)] *** [(932, 556, 0)]
[(932, 556, 0)] *** [(932, 629, 0)]
[(932, 629, 0)] *** [(932, 703, 0)]
[(932, 703, 0)] *** [(932, 776, 0)]
[(932, 776, 0)] *** [(932, 849, 0)]
``````

The above shows one line per edge of the resulting graph, some of the skeleton junctions consist of up to three pixels, thatâs why you sometimes have three sets of coordinates.

From the above, it should be possible to compute the angles between the edges.

Jan,

sorry I canât follow this approach, because I use neither Fiji nor Groovy.

Sorry furthermore that I canât actually interprete the posted output values.

My question:
If you consider one of the hexagons of the tesselation the OP has posted:
Are the corner points ordered or not, i.e. do the follow in a ring-like sequence?
If not, the application of the Law of Cosines is impossible.

Best

Herbie