We provide a robust diagnostic algorithm based on intratumoral and stromal CD8+ T-cell densities in the tumor center compartment that translates spatial densities of tumor-infiltrating CD8+ T cells into the clinically relevant immune diagnostic categories “inflamed”, “excluded”, and “desert”. This evidence concerns the gene CD8A and neoplasm.