How do I join edges from the results of AnalyzeSkeleton plugin?

imagej
skeleton-analysis

#1

Hello,

I’m a bit stuck on working with the result of AnalyzeSkeleton. After I used the method on the plugin web page to prune very short end points, I re-analyzed the skeleton and this is the result (an example of many of the same problem):
how to join branch

As you can see, there is a junction despite not having a bifurcation. My question is: how would I go about combining the two edges?

Here’s what I have so far:
detect by gathering vertices that only connects 2 branches (no bifurcation therefore edges should be connected)
first idea: make a new graph with all existing edges and vertices except for the offending vertex and its 2 edges, make a new edge with the appropriate V1 and V2, and all the slab pixels from e1 and e2, then adds it to the new graph -> runs out of memory therefore inconclusive.
second idea: get p1 and p2 from the vertex, draw a line (3D) between the two points on the image stack then re-analyze. -> no change

The skeleton is fully connected in the imagestack, but AnalyzeSkeleton acts as they’re spereated and renders them accordingly on the 3D Viewer.


#2

Ok I’m stupid, setting the analysis setting to detect and break cycles via “AnalyzeSkeleton_.SHORTEST_BRANCH” solved it. Maybe the skeleton isn’t as clean as I thought it was.