AnalayzeSkeleton: Count and Mark Branch Points

Hi, I’m trying to analyze the distances between branch points. At the moment, I’m using AngioTool. It’s useful for my purposes, since it’s able to choose vessels by width, intensity, and outputs an overlay with a skeleton and branch points.

It’s based on AnalyzeSkeleton though. What I want to do is take the image produced (which is a skeleton overlayed onto a grayscale image) and map/print the coordinates of the branch points in order for each branch. For example, for a given branch, all I need is the X/Y coordinates of the 1st, 2nd, to nth junction of the branch.

AngioTool will take an image like:

and produce:

The vessels that are not included are going to be ignored, so I really only need those that are highlighted by the red skeleton. AngioTool serves as a way to measure the width and intensity parameters easily.

I can toggle the yellow, red, and blue branch points on or off. I believe the best first step is to somehow isolate the skeleton from the background, and then use AnalyzeSkeleton to count the branches in order. I do not know how to do either of these things, and really need help here! Other options include Strahler Analysis, but I don’t think that provides as much flexibility as AnalyzeSkeleton.

My goal is to count those branch points in order from their origin (in the center) and print the X and Y values. What’s the best way to do this? I simply have a large number of images and want to be able to do this easily. I’d also like to remove the watermark (a rectangular region in the same position on each image) but this is a side goal.

At the moment, I believe the code in that counts triple and quadruple branch points is where to begin. However, the code seems to just count the points rather than ordering them.

Thank you very much! Hopefully I’ve provided enough info for you to be able to help me a bit :slight_smile:

cc: @iarganda

Have you tried passing the overlay to the ROI Manager and then using it to create the skeleton on another image?

Once you have the skeleton image, you can display all the branches as explained here.