Summary
Identification and counting of cells is necessary to test biological hypotheses, for instance of nervous system formation, disease, degeneration, injury and regeneration, but manual counting is time consuming, tedious, and subject to bias. The fruit fly Drosophila is a widely used model organism to analyse gene function, and most research is carried out in the intact animal or in whole organs, rather than in cell culture. Inferences on gene function require that cell counts are known from these sample types. Image processing and pattern recognition techniques are appropriate tools to automate cell counting. However, counting cells in Drosophila is a complex task: variations in immunohistochemical markers and developmental stages result in images of very different properties, rendering it challenging to identify true cells. Here, we present a technique for counting automatically larval glial cells in three dimensions, from confocal microscopy serial optical sections. Local outlier thresholding and domes are combined to find the cells. Shape descriptors extracted from a data set are used to characterize cells and avoid oversegmentation. Morphological operators are employed to divide cells that could otherwise be missed. The method is accurate and very fast, and treats all samples equally and objectively, rendering all data comparable across specimens. Our method is also applicable to identify cells labelled with other nuclear markers and in sections of mouse tissues.