Rapid multi-dynamic algorithm for gray image analysis of the stroma percentage on colorectal cancer

Tengfei Li, Zekuan Yu, Yanlian Yang, Zhongmao Fu, Ziang Chen, Qi Li, Kundong Zhang, Zai Luo, Zhengjun Qiu, Chen Huang

Abstract

Background: Tumor stroma percentage (TSP) is an independent, low-cost prognostic factor that could complement current pathology and act as a feasible risk factor for prognosis. This study investigates the prognostic significance of TSP using a robust rapid multi-dynamic approach applying MATLAB and a threshold algorithm for gray image analysis. Methods: A retrospective collection of 1,539 colorectal cancer (CRC) patients across three independent cohorts (SGH, N=996; two validation cohorts, N=106 and N=437) was analyzed. Gray image areas were determined as the stromal part of the Whole-Slide Image (WSI), and stroma percentage was calculated using a proposed MATLAB-based method. Results: Multivariate analysis showed that TSP-cad was an independent prognostic factor for vessel invasion and tumor location. For overall survival (OS), TSP-cad (median) showed a Hazard Ratio (HR) of 1.632. TSP-manual and TSP-cad were both independent prognostic factors across all cohorts. Conclusions: TSP is an independent prognostic factor in CRC. The rapid multi-dynamic threshold algorithm for quantifying TSP showed higher accuracy than manual evaluation and offers a practical method to guide clinical decision-making.

Introduction

In colorectal cancer (CRC) management, the TNM (Tumor-Node-Metastasis) staging system remains the gold standard for prognosis. However, patients within the same stage often exhibit significantly different clinical outcomes. Tumor Stroma Percentage (TSP)—the ratio of supportive connective tissue to tumor cells—has emerged as a powerful prognostic indicator. Generally, "stroma-high" tumors are more aggressive and have a poorer prognosis. Despite its potential, TSP is not routinely used in clinical staging because manual evaluation is subjective, time-consuming, and prone to inter-observer variability. This study introduces a standardized, computer-aided detection (CAD) algorithm to bridge this gap.

Methods and Materials

The researchers developed a semi-automatic MATLAB-based algorithm utilizing a rapid multi-dynamic threshold approach. The pipeline involves preprocessing (grayscale conversion and noise removal), enhancement (histogram equalization), and morphological operations to smooth tissue boundaries. Finally, the OTSU image segmentation method is applied with a specific threshold (0.82) to classify pixels as stroma, tumor, or necrosis.

Figure 5: The CAD workflow, illustrating the selection of the Region of Interest (ROI) within a Whole-Slide Image (WSI) and the subsequent automated segmentation into stromal and tumor components.

The study utilized a massive dataset of 1,539 CRC patients divided into three distinct groups: the SGH Cohort (996 patients), an internal validation set (106 patients), and an external validation set from The Cancer Genome Atlas (437 patients). While the algorithm handles the quantification, it remains semi-automatic as a pathologist selects the initial ROI to ensure analysis focuses on the most invasive tumor front.

Key Results

The algorithm achieved a segmentation accuracy of 90% and an Area Under the Curve (AUC) of 0.9 in the SGH cohort, indicating excellent performance for clinical screening.

Figure 4: Detailed view of the segmentation process, showing the original histological image (C) and the resulting computer-generated mask (D) where stroma and tumor areas are quantified.
  • Optimal Thresholding: Using the median TSP value (41.3%) as a cut-off provided superior prognostic accuracy compared to the traditional 50% manual threshold.
  • Necrosis Identification: The algorithm effectively identified necrotic areas (averaging 12% of image area), which are often miscalculated in manual assessments, leading to more precise stroma-to-tumor ratios.
  • Survival Outcomes: TSP-high patients had a significantly higher risk of death (HR = 1.632 for OS). The CAD system proved to be a robust independent prognostic factor across all validation cohorts.

Discussion and Conclusion

The proposed rapid multi-dynamic threshold algorithm provides a standardized, accurate, and faster alternative to manual TSP evaluation. By reducing subjectivity and improving prognostic accuracy, this digital pathology tool could significantly enhance clinical decision-making and supplement traditional TNM staging in colorectal cancer. Future work aims to fully automate the ROI selection process and expand the algorithm to quantify other microenvironment factors like tumor-infiltrating lymphocytes to create a more comprehensive digital profile.

Summary updated

Abstract

<b>Background:</b> Tumor stroma percentage (TSP), as an independent, low-cost prognostic factor, could complement current pathology and act as a more feasible risk factor for prognosis. However, TSP hadn't been applied into TNM staging. Here, the objective of our study was to investigate the prognostic significance of TSP in a robust rapid multi-dynamic approach with the application of MATLAB and threshold Algorithm for Gray Image analysis. <b>Methods:</b> Using a retrospective collection of 1539 CRC patients comprising three independent cohorts; one SGH cohort (N=996) and two validation cohorts (N =106, N= 437) from 2 institutions. We investigated 996 CRC of no special type. According to our established thresholds, 357 cases (35.84%) were classified as TSP-high and 639 cases (64.16%) as TSP-low. We determined the gray image area as the stromal part of the WSI and calculated the stroma percentage with our proposed method on MATLAB software. <b>Results:</b> In both TSP-cad(50%) and TSP-cad(median), multivariate analysis showed the TSP-cad was an independent prognostic factor for the vessel invasion and tumor location. For OS, TSP-manual HR=1.512 (95% CI 1.045-2.187); TSP-cad HR=1.443 (95% CI 0.993-2.097) and TSP-cad(median) HR=1.632 (95% CI 1.105-2.410). Fortunately, TSP-manual and TSP-cad were also found independent prognostic factor in all the cohorts. It was found that TSP-cad had slightly higher HR and wider CI than TSP-manual. <b>Conclusions:</b> Our research showed that TSP was an independent prognostic factor in CRC. Moreover, threshold algorithm for the quantitation of TSP could be established. In conclusion, with this Rapid multi-dynamic threshold Algorithm for Gray Image counting of TSP, which showed a higher accuracy than manual evaluation by pathologists and could be a practical method for CRC to guide clinical decision making.
BibTeX
@article{li2021rapid,
  author = {Tengfei Li and Zekuan Yu and Yanlian Yang and Zhongmao Fu and Ziang Chen and Qi Li and Kundong Zhang and Zai Luo and Zhengjun Qiu and Chen Huang},
  title = {{Rapid multi-dynamic algorithm for gray image analysis of the stroma percentage on colorectal cancer}},
  journal = {Journal of Cancer},
  year = {2021},
  doi = {10.7150/jca.58887},
}
Figure