Skeletonization

imagej
fiji
Tags: #<Tag:0x00007fb8823f4a48> #<Tag:0x00007fb8823f45c0>

#1

Hi, I’m studying microscopic specimens of blood vessels, and I was hoping to be able to skeletonize them. The issue I’m facing is that the center of the vessels is lighter than the borders, so when i binarize then skeletonize them, I get 2 skeletonized lines, one per wall. I would like to get a skeletonized image with 1 line representing each vessel.
Uploaded is an example of these specimens.

Thanks!!
Capture


#2

Hello @Noah and welcome to the ImageJ Forum!

Can you post here your binary image? It seems strange you get two lines. Have a look at what I got with your image (skeleton overlaid in red):

image


#4

If these red lines are 1 pixel wide and I am able to calculate their length, then that is exactly what I need!Can you please walk me through the steps and plug-ins you used to achieve this?In layman’s terms if you will, haha :smile:


#5

Hello @Noah,

You can use for instance this macro code:

selectWindow("21755e773d10a766b12db386312795e582405a5f.JPG");
// Remove uneven background
run("Subtract Background...", "rolling=50 light");
// Convert to 8-bit to apply a 1-channel threshold later
run("8-bit");
// Smooth image preserving borders
run("Median...", "radius=2");
// Apply threshold to binarize the image
setThreshold(0, 213);
setOption("BlackBackground", true);
run("Convert to Mask");
// Calculate skeleton of white objects in the image
run("Skeletonize");


#6

@Noah

Just to piggy-back from what @iarganda’s answer for you… for more info on running and using macros (especially if you want to edit the code yourself down-the-road…) - here are some helpful links to get you started:

eta :slight_smile: