Apparatus and methods are described for use with a sample that includes a plurality of red blood cells. A series of images associated with a series of depth levels of the sample are acquired, by performing a depth scan of the sample with a microscope. One of the depth levels is identified as being an optimum focal plane for imaging one or more entities within the sample using the microscope, by identifying that a drop in image contrast occurs at the identified depth level. The sample is imaged using the microscope, by focusing the microscope at an investigative depth level that is based on the identified depth level. Other applications are also described.