Computational analysis of histopathological images plays a central role in cancer diagnosis and treatment planning. As hematoxylin and eosin (H&E) staining constitutes the primary entry point in routine diagnostic workflows, computer-aided diagnosis from whole-slide H&E images is of particular clinical relevance. However, substantial variability in specimen preparation, staining protocols, and scanning conditions, together with inherent uncertainty in expert pixel-level annotations, makes automated analysis of H&E-stained images challenging. In this study, we propose a semantic segmentation-based framework for image-level diagnosis, grounded in the clinically motivated assumption that each histopathological image corresponds to a single cancer type. Image-level predictions are obtained by assigning the class of the dominant pixel-level label in the segmentation output. To ensure clinical relevance, we adopt the nnU-Net architecture and train it on a publicly available dataset collected in our study with pixel-level annotations for three liver cancer types: hepatocellular carcinoma (HCC; 55 images from 30 patients), cholangiocellular carcinoma (CCA; 55 images from 29 patients), and colorectal metastatic adenocarcinoma (CMA; 60 images from 30 patients). Annotations were independently provided by four pathologists, and consensus ground truth was established via majority voting. Inter-annotator agreement, measured using Fleiss' kappa, was 0.694 for HCC, 0.728 for CCA, and 0.756 for CMA, indicating substantial agreement. We hypothesize that the combination of stain normalization and semantic segmentation mitigates domain shift and reduces sensitivity to annotation noise, thereby limiting the need for model fine-tuning when new data are introduced. Five-fold cross-validation yielded balanced accuracies of 0.975 (HCC), 0.950 (CCA), and 1.000 (CMA), comparable to results obtained with immunohistochemical staining and superior to several deep learning models trained on patch-level annotations. On intraoperatively acquired CMA samples not included in the training cohort, nnU-Net achieved a balanced accuracy of 0.947, demonstrating robustness to domain shift that was not case with models trained on patch-level annotations. The proposed framework has the potential to support pathologists in prioritizing immunohistochemical marker selection, thereby reducing diagnostic costs and turnaround time. Integration with immunohistochemical findings may further improve overall diagnostic reliability.