Abstract
Tissue examination and quantification in a 3D context on serial section whole slide images (WSIs) were labor-intensive and time-consuming tasks. Our previous study proposed a novel registration-based method (Map3D) to automatically align WSIs to the same physical space, reducing the human efforts of screening serial sections from WSIs. However, the registration performance of our Map3D method was only evaluated on single-stain WSIs with large-scale kidney tissue samples. In this paper, we provide a Docker for an end-to-end 3D slide-wise registration pipeline on needle biopsy serial sections in a multi-stain paradigm. The contribution of this study is three-fold: (1) We release a containerized Docker for an end-to-end multi-stain WSI registration. (2) We prove that the Map3D pipeline is capable of sectional registration from multi-stain WSI. (3) We verify that the Map3D pipeline can also be applied to needle biopsy tissue samples. The source code and the Docker have been made publicly available at https://github.com/hrlblab/Map3D.
Keywords: Docker, registration, multi-stain, renal pathology
1. DESCRIPTION OF PURPOSE
The tremendous advances in whole slide imaging and image processing techniques have led to a paradigm shift in modern pathology analysis. These advances are mostly attributed to deep-learning techniques, which empower computers to accomplish many labor-intensive and time-consuming manual tasks. However, the current quantitative assessments of primitive tissue structures across sectional WSIs still rely on the analysis of a single two-dimensional (2D) section and require manual assessments on WSI in 2D serial sectioning representation, leading to high labor costs and vulnerability. Therefore, large-scale 3D modeling in digital pathology is demanding for disease diagnosis. For example, the quantification of sclerotic areas within the capillary tuft has to be analyzed in 3D dimension to attain glomerular morphology for subtotal nephrectomy.1 Several disease-relative pathological changes, like Atubular, can only be confirmed when all WSI sections of a nephron are visually examined in 3D context.2 Moreover, the 3D modeling in digital pathology can also make benefits to infuse additional phenotypic or functional information across the multi-staining biopsies when the adjacent biopsies are dyed by distinctive stains.3
To achieve large-scale 3D modeling in digital pathology, researchers have put much effort into developing models for whole series quantification. Robust biological image registration is critical to the performance of any 3D tissue quantification model. However, it is inevitable to have missing tissues and artifacts in WSI during section preparation, and these can lead to bad registration results.4 Fortunately, our previously proposed deep-learning model Map3D5, 6 demonstrated a strong performance registering large-scale sectional WSIs in a 3D context, so it can further succeed in glomerular identification and association tasks that reduce the human efforts of screening serial sections from WSIs†. However, the previous Map3D registration model was only trained and tested on large-scale sectional WSIs, so we come up with the question that whether the registration capability can be kept for needle biopsy sections which contains less information and context. Moreover, the generalizability of Map3D registration to multi-stain sections also remained questionable.
In this paper, we present an end-to-end 3D slide-wise registration pipeline on needle biopsy serial sections in a multi-stain paradigm: (1) We release a containerized Docker for an end-to-end multi-stain WSI registration.(2) We prove that the Map3D pipeline is capable of sectional registration from multi-stain WSI. (3) We verify that the Map3D pipeline can also be applied to needle biopsy tissue samples. The source code and the Docker have been made publicly available at https://github.com/hrlblab/Map3D.
2. METHOD
The overall end-to-end 3D registration pipeline is presented in Figure 2. The proposed pipeline consists of two sections: (1)Two-stage pair-wise affine registration and (2) Slide-wise transformation propagation in a 3D context.
Figure 2.

This figure presents the whole pipeline of Map3D pair-wise affine registration, which is divided into 2 steps: (1)Two-stage pair-wise affine registration and (2) Slide-wise transformation propagation in a 3D context.
2.1. Two-stage pair-wise affine registration
Two-stage pair-wise registration is employed to find the pixel-to-pixel correspondence between different pathological images. To maintain the morphological characteristics of a tissue structure, we only deploy affine registration at each step rather than non-rigid registration.
For the first step of the registration, recent Graph Neural Network (GNN) based registration SuperGlue (SG)7 is employed to achieve keypoint-based global deformation on WSIs, since SG can filter out as well as match the similar key points on each pair of WSI with the reliable performance when encountering missing tissues and intensity changing,5 significantly reducing the registration computing from pixel-wise registration of giga-pixel pathological images. The output of this step is a pair-wise affine matrix MSG(t) from Eq.(1).
| (1) |
For the second step of the registration, advanced normalization tools (ANTs)8 is utilized due to the superior performance on high-resolution neuroimaging data. The output of this step is MANTs(t) from Eq.(2).
| (2) |
We define t as the t-th section (frame) in the entire series with length T − 1, where i is the index of pixel xi in the image I, with N pixels. The two-stage registration (SG + ANTs) affine matrix for each pair is presented in Eq.(3).
| (3) |
In Eq.(1) and (2), A indicates the affine registration. The affine matrix MSG(t) from SG is the initial parameter of ANTs. The ||.||AffSG and ||.||AffANTs in Eq.(1) and (2) indicates the different similarity metrics for two affine registration, respectively. SG used Graph Neural Network layers to minimize the difference between each pair of keypoints, while ANTs registration was performed with default similarity metrics of mutual information (MI) and cross-correlation (CC), respectively.
2.2. Slide-wise transformation propagation in 3D context
After receiving pair-wise registration for all WSI pairs, we implement transformation propagation by doing sequence matrix multiplication to transfer sectional WSIs to the same physical space of the middle section Tm. The final transformation matrix in 3D context for t-th section (frame) is shown in Eq(4).
| (4) |
where (.)−1 is the inverse matrix of the multiplication.
3. EXPERIMENTS
3.1. DATA
Image patches were extracted from 17 cases of renal transplant biopsies from Renal Pathology Teaching Collection by Virtual Pathology at the University of Leeds. This dataset contains serial sections of whole slide images in different kinds of stains, namely C4d, H&E, CD45, Jones Methenamine Silver (JMS), Periodic Acid Shiff (PAS), Elastic Van Gieson (EVG), Polyoma Virus (PV), and Martius Scarlet Blue (MSB). All images were extracted from the 10 × magnification of a WSI with the original pixel resolution of 1 Micron.
For all sections, three glomeruli were selected as the region of interest and were manually annotated with rectangular bounding boxes on raw WSIs by ImageScope software. We saved the vertex coordinates for all the bounding boxes. In addition, we were confident that the selected glomeruli among all sections within the same case were derived from the same 3D object.
3.2. Evaluation Metrics
For the purpose of evaluating our results, we employed two types of metrics: the pair-wise distance from the middle section and the pair-wise Intersection over Union (IoU). The distance measures the physical distance between the center of a bounding box on a non-middle section after performing global registration and the center of a bounding box for the same glomerulus on the middle section. The IoU metric represents the level of overlap between these two bounding boxes.
Most of the glomeruli on the WSIs are in a ball-shape, which indicates that a significant part of a rectangular bounding box does not belong to our interested tissue. To reduce the effect of this error, we also included a special form of IoU metric that uses circles as the bounding region. A formula has been purposed to calculate the Intersection over Union of two circles given their centers and radii.9 To obtain these circles, we looked for the largest circle contained in a given bounding box.
4. RESULTS
Table 1 presents the quantitative performance of our Map3D registration on multi-stain needle biopsy WSIs compared against two classical registration methods. Our previously proposed Map3D method achieved better performance than others in all evaluation metrics. According to Figure 3, our two-stage registration pipeline keeps its superior power when generalize to multi-stain needle biopsy serial section WSIs with smaller registration errors and bigger overlaps. In addition, Map3D also demonstrates better robustness than the other two pipelines. As the table implies, although ANTs has a better overall performance than SuperGlue, it has several extreme outliers that leads to a larger average distance. In contrast, the result from Map3D is more consistent and reliable. All of these prove that our method also works with scarce information and context for needle biopsy tissue samples.
Table 1.
Quantitative result for different baseline methods.
Figure 3.

This figure shows the registration results from needle biopsy sections using SuperGlue, ANTs, and Map3D pipeline. (a) The average distance between a bounding box center on a non-middle section after registration and the corresponding bounding box center on the middle section. The red circle represents six extreme outliers from failure cases in ANTs registration. (b) The Intersection over Union between bounding boxes on the non-middle sections after registration and the corresponding bounding boxes on the middle sections. (c) The Intersection over Union between bounding circles on the non-middle sections after registration and the corresponding bounding circles on the middle sections.
An example of a glomerulus on a non-middle section getting registered can be found in Figure 4. The green box shows the position of a glomerulus on a non-middle section at the current stage, whereas the yellow box represents the physical position of the same glomerulus on the middle section. After Map3D Registration, the glomeulus was fitted into the yellow rectangle, while the other two registration method generated less ideal results.
Figure 4.

This figure shows a comparison of an original section and its transformed sections from different registration models. The yellow bounding box represents the physical position of the glomerulus in the middle section, while the green bounding box represents the position of the glomerulus in a non-middle section before or after the registration.
5. NEW OR BREAKTHROUGH WORK TO BE PRESENTED
In this study, we release a Docker for an end-to-end 3D WSI registration pipeline. The entire process can now be run with one line of command. In addition, we also verified the robustness of our pipeline for registering needle biopsy tissue samples in the multi-stain paradigm.
Figure 1.

This figure shows an overview of the Map3D registration pipeline. The input is a series of raw cross-section multi-stain WSIs, and the output is a series of images that have been transformed to the physical space of the middle section in a 3D context by transformation propagation.
ACKNOWLEDGMENTS
This work has not been submitted for publication or presentation elsewhere.
Footnotes
REFERENCES
- [1].Remuzzi A, Mazerska M, Gephardt GN, Novick AC, Brenner BM, and Remuzzi G, “Three-dimensional analysis of glomerular morphology in patients with subtotal nephrectomy,” Kidney international 48(1), 155–162 (1995). [DOI] [PubMed] [Google Scholar]
- [2].Chevalier RL and Forbes MS, “Generation and evolution of atubular glomeruli in the progression of renal disorders,” Journal of the American Society of Nephrology 19(2), 197–206 (2008). [DOI] [PubMed] [Google Scholar]
- [3].Roberts N, Magee D, Song Y, Brabazon K, Shires M, Crellin D, Orsi NM, Quirke R, Quirke P, and Treanor D, “Toward routine use of 3d histopathology as a research tool,” The American journal of pathology 180(5), 1835–1842 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
- [4].Wright AM, Smith D, Dhurandhar B, Fairley T, Scheiber-Pacht M, chakraborty S, and et al. , “Digital slide imaging in cervicovaginal cytology: A pilot study,” Arch Pathol Lab Med 137, 618–624 (2013). [DOI] [PubMed] [Google Scholar]
- [5].Deng R, Yang H, Jha A, Lu Y, Chu P, Fogo AB, and Huo Y, “Map3d: registration based multi-object tracking on 3d serial whole slide images,” IEEE Transactions on Medical Imaging (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- [6].Deng R, Yang H, Asad Z, Zhu Z, Wang S, Wheless LE, Fogo AB, and Huo Y, “Dense multi-object 3d glomerular reconstruction and quantification on 2d serial section whole slide images,” in [Medical Imaging 2022: Digital and Computational Pathology], 12039, 83–90, SPIE; (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- [7].Sarlin P-E, DeTone D, Malisiewicz T, and Rabinovich A, “Superglue: Learning feature matching with graph neural networks,” in [Proceedings of the IEEE/CVF conference on computer vision and pattern recognition], 4938–4947 (2020). [Google Scholar]
- [8].Avants BB, Epstein CL, Grossman M, and Gee JC, “Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain,” Med Image Anal , 26–41 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
- [9].Yang H, Deng R, Lu Y, Zhu Z, Chen Y, Roland JT, Lu L, Landman BA, Fogo AB, and Huo Y, “Circlenet: Anchor-free glomerulus detection with circle representation,” Medical Image Computing and Computer Assisted Intervention – MICCAI 2020 12264 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
