Ultrasound measurement to analyse vascular density


I’m trying to analyse jpeg images from a tumour ultrasound to see the vascular density, but I don’t have a lot of experience doing it, I would appreciate any advise you could possibly have.
Here’s an example of what I got.

Thank you so much,


So when you say

What do you mean exactly? To measure what? The ‘red’ blob? or the ‘blue’ blobs? and then measure what - volume, #, length/width, etc. How do you want to measure that ‘density’?

Just try to be a bit more specific, and we can see if we can help. :slight_smile: Most everyone here has different scientific backgrounds - biologists, material scientists, computer scientists, etc… so try to stay away from specific-field ‘jargon’ when describing your analysis goals.


Thank you so much for your reply and advise Ellen.

I’ve gotten a few ultrasound images like the one uploaded to compare the vascular density on each tumour, in order to do it I want to measure both blobs: the red and the blue, since each of them are vessels.

I have tried using Threshold in greys-scale (or 8 bite) but either the red or the blue they get grey and not white, which is not working for me because I need them white so I can measure them, since they are what I need to mesure.
Before, for measuring the vascular density in other images (like immunofluorescence tiff images) what I’ve been doing is to use threshold and then deciding and specific area to measure in different places, to later compare them with the samples I’ve gotten of each tumour.
But with ultrasound images I honestly got no experience and I’ve read it is possible to measure with imageJ, but did not get how, so I was wondering whether here I could find someone with experience with it who could explain me.

Pd: I’ve tried my best being specific, sorry if I didn’t get to succeed, I’m new at this but I really try to learn about it.

Thank you once again.


No worries! You did a good job explaining things… so to grab the ‘red’ or ‘blue’ blobs - you can try:

  1. Color Threshold to select either the ‘red’ or ‘blue’ regions…


  1. You can try Trainable Weka Segmentation (TWS) to select those regions…

either tool should be able to get you there using ImageJ/Fiji. Too - we recommend for new users to use Fiji. NOTE: Fiji is Just ImageJ - it is simply a distribution of ImageJ that comes with a bunch of plugins bundled - ready for you to use out-of-the-box. If you are just getting started, we recommend downloading/using Fiji. And it comes with TWS already installed!

And since you said you are just getting started, here are some other helpful links:

If you have more specific questions moving forward - don’t hesitate to ask! We are here to help.

1 Like

Too @dsclaudia

I left out an important part! Jpegs are really an awful file format… and should never really be used in quantitative analyses… You can read more on why JPEGs shouldn’t be used in imaging here.

Ideally - save all images in the original file format provided by your imaging system or as a .tiff. That way - you know your data is not altered or compressed in any way.

1 Like

Since the colors in your images are just marker color (they are always Red and Blue I assume) you can use some image math to separate the channels.

Transform your RGB image into separate R | G | B channels.
(Transform them from 8bit to 32bit for precise calculations.)
Then use Process>Image Calculator to calculate the following:
RED channel = 2R/(G+B)
BLUE channel = 2

The resulting images can be easily and automatically thresholded.
The resulting binary channel images can be used to detect the objects and to measure geometrical properties. In case you want to measure intensity features you will need the identical image without the colored markers.

All this can be packed into a macro once you have established the procedure.

Here is an example how the binary channels look like:

(Of course you should limit your measurement area by using a Roi/Selection.)


Another option. If it does not matter whether the blobs are red or blue, you could convert the image the HSB and use the Saturation plane to threshold the regions that contain some colour (i.e. not greyscale).


Thank you so much for your help Ellen, Peter and Gabriel.
If any doubt comes up again, hope you don’t mind if I ask you once again.




Another possible track: use the RGB PlugIn —> CMYK
It is necessary to make an adjustment to spot the two small red spots.


macro "Echographie"
// Start batch mode
// Start processing
// Select image source and copy it
makeRectangle(229, 223, 839, 500);
run("Duplicate...","copy ");
run("Duplicate...","copy2 ");
run("RGB to CMYK");
run("Stack to Images");
setAutoThreshold("Default dark");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Analyze Particles...", "size=100-Infinity circularity=0.4-1.00 display exclude summarize add");
setAutoThreshold("Default dark");
run("Convert to Mask");
run("Analyze Particles...", "size=100-Infinity circularity=0.30-1.00 display exclude summarize add");
roiManager("Show All without labels");
// End of processing
// End of batch mode
exit("All is done !");
1 Like