For faster visualization purposes, the data-cubes were resampled to a common voxel scale and aligned to principal contact surfaces of the teeth with 10 scale. In Fig. 2 axes x, y, z were aligned as indicated (x along the palatal, y along the contact, and z along the vertical extent of tooth). For detailed mapping of MCs, the vertical slice of the tooth was divided into three horizontal slabs of equal height corresponding to 1/3 (cervical third), 2/3 (middle third) and 3/3 (occlusal third) of the tooth surface. The division of the tooth surface was based on dental examination methodologies and different enamel quality and mechanical properties of the individual tooth (Fig. 2)1, 4, 7, 36, 39–41.
X-ray CT data-cube cuts of a tooth without visible enamel microcracks on the buccal surface. Enamel is light-grey, dentin—dark-grey, and tooth outside, pulp and cracks—black. (a) Vertical slice in x, z plane at y position, as indicated by horizontal dotted yellow line in panels (b–h). (a) Horizontal dashed red and dotted cyan lines show positions of slices in x, y planes, displayed as images in panels (b–h). (a) Horizontal slabs selected between dashed red lines are indicated as 1/3, 2/3, 3/3. In panels (b–h) dashed magenta lines cut-out four identified sectors (buccal, contact right, palatal, contact left). Field of view is mm. One pixel corresponds to 10 .
As each tooth has four surfaces of different convexity (Fig. 1), enamel thickness, distance to dentin and pulp, four sectors (buccal, contact right, palatal, contact left) were identified for the analysis (Fig. 2 (b–h))42, 43. Transitions from convex (buccal, palatal) to flatter tooth surfaces (contact right, contact left) were selected as reference points to define sectors. The dashed magenta lines connected the upper reference point of the right contact surface to the lower reference point of the left contact surface and vice versa. This resulted in 3D slab sectors used for examination of MCs of each tooth. In each of the slab sector in Fig. 2, the following structures could be identified: enamel (visible as light-grey shaded area), dentin (dark-grey area surrounded by enamel), pulp (black area in the central part of the tooth), cracks (in the enamel, dentin, or both layers), scanning artefacts (large black cylinder, CT playback “rays” on top of the tooth), enamel discoloration at the bottom.
Although the principal components of the tooth can be identified with a naked eye by the grey level of voxel value, such a straightforward selection of voxels to isolate tooth components would result in a rather poor quality, e.g. cracks, pulp, and outside of the tooth would have similar numerical values. Therefore, we trained a CNN to identify voxels (pixels in each slice since we processed data-cube as slices for this purpose) which belong to these four categories: (1) cracks, (2) enamel, (3) dentin, (4) air.
In the previous study34 a segmentation of a tooth was performed using deep learning toolkit within Dragonfly (Object Research Systems) software. It allowed to manually and iteratively derive robust eye-verified volume segmentation labels of a single tooth. In the current study this data was used to train a new CNN image segmentation model44, which was based on “Multiclass semantic segmentation using DeepLabV3+” example (by S. Rakshit, https://keras.io/examples/vision/deeplabv3_plus) and was implemented with “TensorFlow”45 (https://www.tensorflow.org). The model is a fully convolutional architecture with ResNet50 backbone46 (pretrained on ImageNet), encoder module that performs dilated convolutions as a multi-scale contextual information processor, and a decoder module that is responsible for accurate spatial boundary segmentation between categories.
As an input for training, slices of the tooth along z axis of 512 512 pixels were cropped and converted to RGB image repeating a 2D greyscale array three times, making it suitable for the ResNet50 input. As target labels, an array with the same spatial size, but with four channels (one-hot encoding the categories) was created, with any given pixel attributed to either cracks, enamel, dentin, or air. Categorical cross entropy loss function was used during training.
The model was trained for 50 epochs using Adam’s optimizer47, with a learning rate of , a batch size of 5 images, and random contrast and flip/rotation augmentations. It achieved 99.5% accuracy on both training and validation images (15,000 and 2,000 respectively) without over-fitting. An example of network’s predictions is presented in Fig. 3.
Example of X-ray CT data-cube slice-by-slice segmentation with convolutional neural network (CNN) to produce data-cubes of structural elements of a tooth. (a) CNN’s predictions on slice image with enamel (yellow), dentin (brown), cracks (dark blue), and air (black) indicated. (b) Binary mask of cracks, which was used to fill in the segmentation image shown in (c), resulting in isolated areas of enamel and dentin presented in (d) as if there were no cracks in the tooth. One pixel corresponds to 10 . “NumPy 1.24.0”49 (https://numpy.org) was used to process data-cubes, which were visualized with “Matplotlib 3.6.0”50 (https://matplotlib.org).
To process data-cubes of four teeth samples, each slice image (1000 1000 pixels) was cropped into 512 512 pixel size overlapping tiles as suitable for CNN’s input, which yielded pixel classification maps of the same size that were assembled back to the size of the slice. The segmentation of each tooth data-cube was performed three times, taking slices perpendicular to x, y, and z axis. A voxel was identified as crack if it was classified as crack in at least two planes. The remaining voxels were classified as enamel, dentin, or air. A slice-by-slice fill-in was performed to restore enamel and dentin areas (as if the tooth had no cracks) using “scikit-image”48 (https://scikit-image.org) restoration.inpaint method (https://scikit-image.org/docs/stable/auto_examples/filters/plot_inpaint.html) on dilated mask of cracks.
Data-cube manipulations were performed using “NumPy 1.24.0”49 (https://numpy.org) while visualizations were created with “Matplotlib 3.6.0”50 (https://matplotlib.org) libraries. “SAOImageDS9” tool51 (https://sites.google.com/cfa.harvard.edu/saoimageds9) was used for visual assessment of iterative model training and the task of teeth segmentation. Although some minor segmentation artifacts can be noticed, the results of the teeth segmentation are robust (the CNN model architectures and training strategies are different between previous and this study), allowing to see the overall internal structure of teeth. The groups of connected cracks were isolated and filtered by size using “cc3d” library52 (https://github.com/seung-lab/connected-components-3d).
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.