Add function to get all centroids.

@wronk