This technical note will show you how to measure the average distance between objects, in this case nuclei. Euclidean distance is a simple measurement that uses intensity as a measure of distance. Individual objects are created as binary objects. A single intensity unit is added for each pixel away from the original object.
This technique can be used to measure the distance between two separate stains. For example, the distance vessels are in a tissue from hypoxic regions.
A further method of measuring and showing distance distributions it to use nearest neighbour distances. This shows the distance to the closest object from each object in the image.
Open Nuclei.tif from the Demo Images\Segmentation folder
2. Apply a threshold and generate a binary image of the nuclei
3, To avoid potential issues in subsequent analysis the Euclidean distance map that is generated must be set to a bit depth of 16. The default of 8bits will only allow you measure a maximum distance of 256 pixels. A 16 bit EDM will allow a maximum distance of 65,536.
Go to Process 🡪 Binary 🡪 Options and configure the EDM Output to 16 bit
4. To generate a distance map of the distances between cells the image needs to be inverted. Go to Edit 🡪 Invert
If the image isn’t inverted the resulting distance map will measure the stance from the edge to the centre of each nuclei
5. Go to Process 🡪 Binary 🡪 Distance Map
6. The resulting image is a distance map that shows distances from the original seed points (the nuclei) as an increase in intensity.
7. To make it look pretty press the LUT button and select 16 colours
To measure the distances in the image firstly configure the measurements to measure the mean gray value and limit the measurement to the threshold
2. Threshold the EDM image so as to select only the background and leave the nuclei free (so all values from 1 and up)
3. Measuring the image will give a mean intensity result that can be interpreted as the average distance. In this example the average distance between the nuclei is 8.098 pixels. If you know the size of a pixel in your given image you can then translate this value into a calibrated distance.
Open Fluoro 01.tif from the Demo Images\Widefield\Fluorescent Measurement folder
2. Separate the channels using the Image 🡪 Colour 🡪 Split Channels command. Only the Red (blood vessels) and Green (hypoxia) channels are required for the rest of the analysis.
3. Apply a threshold to each channel to generate binary masks. The default auto threshold is fine for the Red channel and the Li auto threshold is fine for the Green channel
To measure the distance of objects from different channels from each other we first have to make one of the channels a mask and one of them a distance map. In this example we want to measure the distance of the blood vessels from the hypoxia region. For this we need a binary mask of the blood vessels (already created in previous step) and a distance map representing the distances away from the edge of the hypoxia regions.
Select the binary image of the hypoxia stain and invert it (Edit 🡪 invert)
2. Check that the EDM Output is set to 16 bit (Process 🡪 Binary 🡪 Options)
3. Generate a distance map by going to Process 🡪 Binary 🡪 Distance Map
To measure the average and individual distances of the blood vessels from the hypoxic areas we need to redirect the measurements from vessel binary when it is measured to the EDM Map we just generated.
Go to Analyse 🡪 Set Measurements Select Area and Mean Grey Value. Make sure the Redirect To is set to EDM of Fluoro (the distance map)
2. Select the binary mask of the vessels and go to Analyse 🡪 Analyse Particles. Configure it to Display Results and Summarise
3. The resulting tables will give a summary of all the measurements or detailed information about each vessel. The mean intensity value represents the number of pixels from the object. So in this example on average the vessels are 32.9 pixel away from the hypoxic regions
First make sure you have the Nearest Neighbour Distance plugin installed.
Open Nuclei.tif from the Demo Images\Segmentation folder
2. Nearest Neighbour Distance needs to know the centre point in X and Y position of the objects. This is easily achieved using the Find Maxima command we have used previously.
Go to Process 🡪 Find Maxima
3. Set the prominence to put a single cross on each nuclei as done previously (tick Preview point selection to check).
Set the Output type to Single Points and press OK
4. An image with a single binary point for each object will be created. Go to Analyze 🡪 Set Measurements... and set it so that only Centroid is selected
5. Make sure the single points image is the active one and go to Analyze 🡪 Analyze Particles .
6. To generate of list of the centroid coordinates to measure with the nearest neighbour distance plugin select Display Results and Clear Results.
Press OK
7. Select the Results window and go to Plugins 🡪 NND
8. A results window is created called Nearest Neighbour Distances that has an entry for each object showing its nearest distance in pixels, or calibrated units if the image was calibrated, to its nearest neighbour.
9. The resulting data is usually best plotted as a frequency distribution or used for subsequent clustering analysis such as Ripley’s K Means