I am working on a project where calculating the centroid of a segmentation based on the intensity in each voxel in the MRI-picture could be interesting. Slicer had a centroid calculation option easily available, but it only told me the geometrical centroid of a segmentation, not a centroid based on intensity.
I have tried (with some assistance from friends) to use the python console to extract the data (both the intensity voxels from the MRI-image, and the position of the segmentation). It didn’t seem very straightforward, so if anybody could give some guidance it would be very helpful!
I also looked for solutions online, but I couldn’t find anything that helps, or anybody with the same issue.