A new characterization method of the microstructure using the macroscopic composition gradient in alloys