Projecting a Heat map to an object and manipulating density

I want to take a heat map data and project it over a 3d object, in order to change the infill density (for 3d printing) of the object with respect to the heatmap.
So basically, when I slice my model the infill density should be different in different parts according to the heatmap.