Fig. 8. Image analysis algorithm for tissue analysis.
Algorithm used for the demarcation of melanoma nodule slices and subsequent image analysis pipeline. The WSI was divided into seven relevant regions: ITR, ITS-1 to ITS-5, and PTS. The PTS was identified at the intersection of the healthy tissue with the dilated tumor using the morphological dilation operator. The PTS was then dilated to extract in the order ITS-1 to ITS-5, with each concentric slice having equivalent thickness. The remaining principal tumor region was designated as the ITR. The whole slide was then split into patches. For each patch, four masks (one for each specific stain) were obtained based on color in the HSV scale. The cytoplasm of melanoma cells was approximated and the number of CD107a+ pixels inside was counted. The function called count_cells was used for both CD8 and melanoma counts. For a given staining mask, count_cells returned both the number of cells and their centroid coordinates. Last, the mean CD107a pixel number per melanoma cell was calculated.
