## 2 Materials and Methods
### Registration  
For registering the variously stained histologic images, the proposed method adapted \"_Greedy_\" (github.com/pyushkevich/greedy, hash: 1a871c1, Last accessed: 27 May 2020) [33], a central processing unit (CPU)-based C++ implementation of the greedy diffeomorphic registration algorithm [34]. _Greedy_ is integrated into the ITK-SNAP (itssnap.org, version: 3.8.0, last accessed: 27 May 2020) segmentation software [35; 36], as well as the Cancer Imaging Phenomics Toolkit (CaPTK--www.cbica.upenn.edu/captk, version: 1.8.1, last accessed: 11 February 2021) [37; 38; 39]. _Greedy_ shares multiple concepts and implementation strategies within the SyN tool in the ANTs package [7; 8] while focusing on computational efficiency by eschewing the symmetric property of SyN and utilizing highly optimized code for computation of image similarity metrics such as NCC, normalized mutual information (NMI), and sum of squared differences (SSD). For the NCC metric, an optimized implementation was used here on the basis of the sum-table algorithm [40]. In general, deformable registration does not do well with the NMI kernel since there are too many degrees of freedom to reduce the dissimilarity metric, i.e., the algorithm can reduce join entropy by non-realistic deformations. Since NCC uses patches, it is much more constrained to match corresponding anatomical locations, thus allowing us to focus on using NCC with an adaptive kernel size scaled with respect to the fixed image size for both the proposed method:  
\[\text{NCC Kernel Radius}=\left\lfloor\frac{\text{Size}(I_{i})}{S}\right\rfloor \tag{3}\]  
Figure 5: Example results on the difference of the normalized cross-correlation (NCC) response maps after applying white padding (**A**) and our padding approach (**B**). In the top row, the yellow box is noted due to the gradient between the image’s gray background and the white added padding. Conversely, in the bottom row, where the intensities of the four image corners were used for padding, there were no square responses in the NCC. The background NCC responses (due to the added noise) were negligible. where \(S\) is the scale by which the width of the fixed image \(I_{i}\) prior to padding is scaled, such that the NCC kernel can pick up enough information for a good registration. After cautious qualitative analysis using various value ranges for \(S\): {10, 20,..., 60}, we decided to empirically choose \(S=40\) for both the affine and deformable registration, while optimizing for computational efficiency and accuracy. It is also worth noting that further experimentation with fixed kernels (i.e., 4 \(\times\) 4 \(\times\) 4, and 5 \(\times\) 5 \(\times\) 5 corresponding to the radius in different scales) resulted in comparable results. All registrations were performed in a configuration of a multi-resolution pyramid comprising 3 different scales. Specifically, initial registrations were performed on images subsampled by factors of \(2^{k}\), and continuous refinements were conducted on images subsampled by factors of \(2^{k-1}\), until the final registration occurred at the full resolution images (resolution subsampling factors of 4, 2, 1 were chosen). This process ensures that the most computationally expensive deformations happen at the coarsest resolutions, thereby reducing the overall time and memory requirements. In this paper, the following notation was used:  
\[T_{i\to j}^{*}=R\big{(}I_{i}\to I_{j};\theta\big{)} \tag{4}\]  
where (\(T_{i\to j}^{*}\)) describes the transformation between fixed (\(I_{i}\)) and moving (\(I_{j}\)) image, and \(\theta\) defines the registration parameters yielding transformation \(T_{i\to j}^{*}\).