## 2 Materials and Methods  
The procedure for HSI-based automated classification of stained intact and stained demineralized occlusal areas is depicted in Scheme 2. **Scheme 2. ** Methodology flowchart for HSI-based automated classification of occlusal stains and stained lesions. After selection and preparation of 65 tooth samples, hyperspectral images were acquired and preprocessed. Classification algorithms were trained on hyperspectral data and subsequently assessed by calculating Matthews correlation coefficient (MCC). The analysis of histological cross-sections by means of PLM served as the reference method for validating enamel health states. Five further teeth were imaged, preprocessed and classified using the previously trained classification model, and enamel health prediction results were presented color-coded in projections of the samples' occlusal surfaces. Tooth acquisition and selection: Sixty-five human permanent biccuspids and molars, of which thirty-five were maxillary and thirty-one were mandibular, were investigated in this study. All teeth were recently extracted in clinical routine for medically justified reasons not related to this study in private practices across the state of Saxony, Germany, and therefore, this study is exempt from ethical approval [26]. No personal or general health information was collected from the donors. The selection of the investigated tooth samples was based on the visual appearance of their occlusal surfaces, which was assessed by three experienced dentists independently, such that no communication occurred between the three raters. None of the raters are authors of this study. All raters were calibrated on ICDAS scoring using the ICDAS II Training Packet prior to tooth assessment [27]. In the case of different scores allocated to a tooth, the most frequent score was taken. If all three raters assigned different scores, the tooth was excluded from the study. Moreover, using his or her clinical experience, each rater independently encircled the most questionable area of each tooth's fissure on an accompanying photograph of each tooth. Teeth with stained or discolored occlusal fissures were included in this study. Teeth with surface cavitation with dentin exposure (\(\geq\)ICDAS 5) or with fissure sealants or occlusal restorations were excluded from this study. In order to prevent dehydration, the teeth were stored in a distilled water and thymol solution. For each tooth, a central region of its fissural system was defined for validation of its occlusal health state. Validation was performed by histological cross-section analysis with polarized light microscopy (PLM). Hyperspectral imaging setup:Hyperspectral images of each tooth's entire occlusal surface were acquired using a commercially available hyperspectral imaging line-scan camera (Diaspective Vision TIVITA(r) Tissue, Diaspective Vision, Pepelow, Germany) to measure oxygenation, perfusion, heme and water content of skin and mucous membranes. The camera provides spatially resolved images (640 \(\times\) 480 pixels) within the wavelength range of 505-1000 nm (100 spectral bands, \(\Delta\lambda\) = 5 nm). The reflected, broadband light is collected by a 75 mm, coated NIR lens (Azuree Photonics, Inc., San Ramon, CA, USA) at an aperture of f/2.8 and passes through a moveable internal slit to an optical grating where the light is dispersed into its wavelengths. The resulting intensities are then projected onto the camera sensor, where one axis represents the coordinates of a single line and the other axis represents the intensities of the wavelengths (\(x\)-\(\lambda\) orientation). The second spatial dimension is generated by internally moving the slit along the object. For a thorough explanation of the line-scan hyperspectral acquisition principle, we highly recommend the review of [PERSON] and Fei on medical hyperspectral imaging [13]. The teeth were measured under moist conditions; larger water residues in the fissural system were carefully removed with a paper point prior to imaging.