Add support for initializing from centroids.