Inter-alveolar wall thickness measurement in a lung slice.

Reactiv’IP developed a specific Python script, based on IPSDK library, to measure automatically the wall thickness located between the pulmonary alveoli from lung sections acquired using light microscopy. This global approach generates a complete histogram of the thicknesses while saving the tiresome handwork of an operator.

Lung slice, wall detection and automatic thickness measurement.

This application first detects the cells using the SMART Segmentation IPSDK Machine Learning model previously created based on few images. Once the alveoli segmentation is achieved, the algorithm computes a distance map based on the wall mask obtained in the first step. The thickness histogram is then computed using the distance values from the peak line of this distance map.

Histogram

Wall thickness distribution histogram in micrometers.

Detailed process description

Alveolar Detection Learning process.

In the first step, a Machine Learning model was created using IPSDK Explorer Smart Segmentation module. This operation consists in manually marking certain areas that are part of walls and alveoli. Once the model is created from a small part of the image, it can be reapplied on the whole image or on other similar images.

Alveolar segmentation

Once the IPSDK SMART Segmentation Machine Learning model is created, the Algorithm automatically segments the alveoli and the walls. During this intermediate step, it is possible to count the number of alveoli as well as to perform a size distribution measurement.

Wall distance map

Next step is computing the inter-pulmonary wall distance map. This Algorithm uses the binary image of the wall mask. Based on the contours, it will propagate inside the tissue by marking incrementally pixels ( based on the distance to the closest border).

Au final, la carte de distance fournit la cartographie globale des épaisseurs.

Extracting the mid-lines between alveoli.

Next, only the pixels present on the peak lines are considered to construct the wall thickness distribution histogram. These lines represent the separation lines generated from Watershed algorithm.

Remark : It is important to note that the values on these peak lines represent the distance to the nearest edge. It is important to double these values to obtain the thicknesses.

Alveoli line separator

Thickness histogram computation

Finally, the process uses the pixel values under the midlines to automatically calculate the wall thickness distribution histogram.

This computation is directly performed using Masked Histogram measurement 2D function which is available as standard in IPSDK library.

Histogram