1. A non-transitory computer readable medium having stored thereon a sequence of instructions which, when executed by a computer, causes the computer to: access a reconstructed basis material image; for a first voxel of the reconstructed basis material image, optimize a concentration of a pair of materials (a,b) in the first voxel exclusively in the image domain and based on: a first probability based on random perturbations; a second probability based on random perturbations; a third probability based on known materials; and a fourth probability based on concentrations of the pair of materials in a pair of voxels neighboring the first voxel.