An objective and automated algorithm was developed to phenotype CD163+ TAMs and calculate their density within the tumor stroma and derive several spatial metrics of interaction with cancer cells. Here, CD163 is linked to neoplasm.