From Hematoxylin and Eosin to Masson's Trichrome: A Comprehensive Framework for Virtual Stain Transformation in Chronic Liver Disease Diagnosis

Diagnostics (Basel). 2026 Mar 4;16(5):764. doi: 10.3390/diagnostics16050764.

Abstract

Background/Objectives: Virtual histological staining offers a rapid, cost-effective alternative to physical reprocessing but faces challenges related to spatial misalignment and staining heterogeneity between Hematoxylin and Eosin (H&E) and Masson's Trichrome (MT) domains. This study develops a robust framework for H&E-to-MT virtual staining to enable accurate fibrosis assessment without additional tissue consumption. Methods: We propose a transformer-based generative adversarial network (TbGAN) supported by a multi-stage alignment pipeline (SIFT (scale-invariant feature transform) coarse alignment, ORB/homography patch registration, and B-spline free-form deformation) and a weighted fusion mechanism combining four configuration outputs (O/10/3, O/3/10, R/10/3, and R/3/10). The framework was validated on 27 whole-slide images (>100,000 aligned patches) through 24 independent experiments. Results: The fused approach achieved state-of-the-art performance: MI = 0.9815 ± 0.0934, SSIM = 0.7474 ± 0.0597, NCC = 0.9320 ± 0.0220, and CS = 0.9946 ± 0.0014. Statistical analysis confirmed enhanced stability through narrower interquartile ranges, fewer outliers, and tighter 95% confidence intervals compared to individual configurations. Qualitative assessment demonstrated preserved collagen morphology critical for fibrosis staging. Conclusions: Our framework provides a reliable, IRB-compliant solution for virtual MT staining that maintains high structural fidelity suitable for diagnostic support. It enables resource-efficient fibrosis quantification and supports integration into clinical digital pathology workflows without patient-specific recalibration.

Keywords: deep learning; histopathological analysis; stain conversion; stain normalization; transformers.