## 2 Materials and Methods
### Image Creation and Spectra Processing  
The analysis of the data was executed separately for each modality. Photographs taken by the camera were stitched to an entire image using the Grid/Collection stitching [59], a plug-in for the open-source image processing package Fiji Fiji Is Just Image]). No further processing of the stitched images like contrast enhancement or brightness adjustment was performed. An in-house developed Python3 (Python Software Foundation) application assembled hyperspectral data cubes for the respective spectroscopic modalities. Such data cubes assign each recorded spectrum to the corresponding image coordinate (pixel). Before spectral analysis, preprocessing of the raw spectra was required to eliminate undesirable spectral features. In the case of VIS/NIR reflectance spectroscopy, the spectral characteristics of the halogen lamp had to be eliminated by an appropriate reference measurement. In order to get spectral information of the sample reflectivity, reflection spectra \(R(\lambda)\) of each pixel were calculated in the VIS spectral region as well as the NIR spectral region. Therefore, Equation (1) [60] was used.  
\[R(\lambda)=\frac{I(\lambda)}{I_{0}(\lambda)} \tag{1}\]  
where \(I(\lambda)\) is the measured intensity reflected from the sample as a function of wavelength and \(I_{0}(\lambda)\) is a reference spectrum. As the reference spectrum, the intensity spectrum of the halogen lamp reflected from the aforementioned Zenith(r) Diffuse Reflectance Standard was used after multiplication by a factor of 2.5. This arbitrary factor was applied to raise the intensity level of the diffuse reflection by the Zenith(r) standard above the intensity level of sample measurements caused by the specular reflection of the gold-coated microscope slide.  
In order to create an image based on the VIS or NIR spectra, the reflectivity at a certain wavelength was visualized by colorizing the pixels according to their value. Therefore, PyQtGraph (Scientific Graphics and GUI Library for Python) and the linear color scale bipolar was used. The highest value was indicated by a yellow-colored pixel while the pixel with the lowest value was light blue. The same color scale was used to create images based on the Raman spectra. In contrast to the data analysis of the VIS/NIR reflection spectra, intensity peak ratios of two Raman peaks were calculated to distinguish between GM and WM. To get these desired Raman peaks, preprocessing of the Raman spectra was mandatory. Spectral preprocessing of Raman spectra was investigated by several researchers in the past [58; 61; 62]. In this publication, Raman spectra were preprocessed as follows. First of all, the spectral range was limited to the range from 350 cm\({}^{-1}\) to 3195 cm\({}^{-1}\) in order to delete software-based zero values that would cause errors in the further processing steps. As a consequence, the number of x-values (active sensor pixels) was reduced from originally 1044 to 955. Cosmic rays that appear randomly when CCD detectors were struck from high energy particles were removed by applying an algorithm for spectra despiking [63]. The threshold value was set to 65. Afterwards, the Raman spectra's offset was removed by subtracting the Raman spectrum's lowest intensity value from each sensor pixel. With the aid of an asymmetric least squares smoothing, initially developed by Eilers in 2005 and presented by He et al. [64] in 2014, broad background from tissue fluorescence was compensated. Within the applied algorithm, the lambda value and the \(p\)-value were set to 1,000,000 and 0.1, respectively. The number of iterations was set to 10. Data preprocessing was completed by smoothing the Raman spectra in order to reduce noise. Therefore, a Savitzky-Golay filter [65] with a 3 rd order polynomial fit and a window size of 11 was applied. The complete spectral preprocessing, as well as image creation based on spectral data, was performed with the developed Python3 application.