I am trying to reconstruct a brain tumor image after clustering using hdbscan.
However, hdbscan does not have cluster centers unlike kmeans so I am a bit confused on how to obtain the clustered image. I have tried obtaining the ref cluster center by matching the (65536,3) array with the hdbscan labels i.e. r and storing them after getting the mean cluster points for each cluster in crs.
I am unsure if this is the best way to proceed to reconstruct an image that is, get some mean centers based on clusters and reconstruct the image using the mean centers plus labels.
crs = np.zeros((dbnumber_of_clusters, 3))
for i in range(0, dbnumber_of_clusters):
dbcluster_points = mriarr[r == i]
dbcluster_mean = np.mean(dbcluster_points, axis=0)
crs[i, :] = dbcluster_mean