Skip to content

These ImageJ/Fiji macros count the number of objects that are touching each other and measure their separation.

License

Notifications You must be signed in to change notification settings

peterjlee/asc-ImageJ-TouchCount-and-Proximity

Repository files navigation

asc-ImageJ-TouchCount-and-Proximity macros

Touch Count and Proximity Macros

These ImageJ macros:
1: Count the number of objects that are touching each other.
2: Count the number of objects within successive spacing range increases of 1 pixel (up to 10 iterations).
3: Report the minimum separation distance between objects.
By default these macros assume that all objects have been previously separated by using a watershed tool (i.e.  "touching" objects will be separated by 1 pixel). Separation ranges are converted from pixels to the scaled unit if there is one (if just pixels are preferred just remove the scale prior to running the macro). The "CZS" version automatically pulls the scale information from CZS format headers. Note: there needs to be an empty background color border around all the outside objects that is at least as wide as the maximum measured separation.

Touch count of each object.

Nearest Neighbor Object Separation

This macro measures the closest separation between neighboring objects. The minimum spacings are added to the Results table along with the connecting coordinates. The spacing connecting lines can be displayed on the images or animated. Alternatives the lines can be color coded by the Line Color Coder macro using the coordinates generated with this macro.

Distances are measured from outline to inline so that objects separated by one pixel should yield a separation of 1 pixel (outline-outline would produce overlapping outlines).

Nearest Neighbor Object Separation macro animation.

Legal Notice:
These macros have been developed to demonstrate the power of the ImageJ macro language and we assume no responsibility whatsoever for its use by other parties, and make no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. On the other hand we hope you do have fun with them without causing harm.
The macros are continually being tweaked and new features and options are frequently added, meaning that not all of these are fully tested. Please contact me if you have any problems, questions or requests for new modifications.

About

These ImageJ/Fiji macros count the number of objects that are touching each other and measure their separation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published