The morphology of clusters of galaxies