# Can we Identify the distance between two particle in IHC image using ImageJ

Tags: #<Tag:0x00007fb8836d8a88> #<Tag:0x00007fb8836d8650>

#1

I want to calculate the closest distance between multiple almost circular IHC particles.

Is this possible with macro to do in large scale?

Measuring distance between particles
#2

If you know the coordinates of the centers of the particles, itâ€™s pure geometry to do that.

A typical image and a list of the corresponding particle coordinates would be useful.

Regards

Herbie

#3

#4

@Praveen_kumar_R honestly how do you think someone can elaborate more than @Herbie as done without see any of your pictures and with a short description like your first post?

Emanuele

#5

sir, I am Praveen, Just doing my Post graduation in MD Anatomy, from India. I am totally new to ImageJ. I found this forum yesterday only.

Hope i will get some help from here.

#6

Please post a typical uncompressed image (TIF- or PNG-format), otherwise we are unable to help.

Please describe precisely what you are looking for and, if necessary, use image annotations, drawings and the like.

Herbie

#8

As Emanuele and I have written, there is little to no sense to make any statements without having seen a typical image.

Perhaps you can post an image from the literature that comes close to what you are going to achieve.

Better though is to make a pilot experiment (staining).

Regards

Herbie

#10

from that image, I came up to here.

Is the correct? after this?

#11

Yes, that looks nice!

Check â€śCentroidâ€ť in â€śSet Measurementsâ€ť.

Then â€śAnalyze Particlesâ€ť lists the center co-ordinates (X, Y) of all particles.

Now you need to access these co-ordinates and compute all distances according to Pythagoras and finally select the smallest one. This is extensive search and you may guess that there are ways to minimize the effort of the extensive search.

There may be an Imagej-plugin that does the distance analyses. Perhaps someone else can point you in this direction. Otherwise, you can write an Imagej-macro that does what you need.

Here is what you need for macro-coding:
https://imagej.nih.gov/ij/developer/macro/macros.html
https://imagej.nih.gov/ij/developer/macro/functions.html

Regards

Herbie

#12

Possibly these plugins could be worth looking into:
https://imagej.nih.gov/ij/plugins/graph/index.html

Or this one:

#13

Really thank you @Herbie and @Danielle_Z
I will let you know my progress and if I found any trouble tooâ€¦

Thanks a lot

#14

your ND - ImageJ plugin was really good, but i dont know how to measure Xstart and Ystart?

#15

Consider also using this plugin, which i havenâ€™t tried yet, but i would choose for nearest neighbour analysis in imagej: https://icme.hpc.msstate.edu/mediawiki/index.php/Nearest_Neighbor_Distances_Calculation_with_ImageJ

It uses the results table to calculate nearest neighbour distances based on centroid positions.

Best,

Rob

#16

Thanks a lot. it an simplest way to identify nearest distance.