In situ mapping of chemical segregation using synchrotron x-ray imaging