Added rudimentary ROI centroid calculation code.