MorphoLibJ is the great tool kit for this type of analysis (can do 3D too). Install it from the
Help > Update... sites and select
What you want is a connected component labelling,
Plugins > MorphoLibJ > Binary Images > Connected Components Labelling. This fills each connected regions with an integer starting with 1 and goes up, which makes it hard to see.
So apply a color labelling using
Plugins > MorphoLibJ > Label Images > Set Label Map. Choose
Golden Angle, try the shuffle and set
There bunch more things in MorphoLibJ that you might find useful. For example:
- removing small areas with size Opening
- closing small gaps with a morphological closing
- measuring the geodesic distance between regions.