Unbiased Analysis Method for Measurement of Red Blood Cell Size and Velocity With Laser Scanning Microscopy

Two-photon laser scanning microscopy is widely used to measure blood hemodynamics in brain blood vessels. Still, the algorithms used so far to extract red blood cell (RBC) size and velocity from line-scan acquisitions have ignored the extent to which scanning speed influences the measurements. Here, we used a theoretical approach that takes into account the velocity and direction of both scanning mirrors and RBCs during acquisition to provide an algorithm that measures the real RBC size and velocity. We validate our approach in brain vessels of anesthetized mice, and demonstrate that it corrects online measurement errors that can reach several 10s of percent as well as data previously acquired. To conclude, our analysis allows unbiased comparisons of blood hemodynamic parameters from brain capillaries and large vessels in control and pathological animal models.


INTRODUCTION
Blood flow mapping is widely used to image brain activity in physiological or pathological conditions because of the tight coupling that links neuronal activation and functional hyperemia (Iadecola, 2017). RBCs undergo major deformation depending on blood flow dynamics within microvessels, in particular when they pass through capillaries that are smaller than their diameter (Suzuki et al., 1996;Zharov et al., 2006). This deformability is impaired in many pathological conditions as hereditary disorders (for example spherocytosis, elliptocytosis, ovalocytosis, and stomatocytosis), diabetes, hypercholesterolemia (reviewed by Tomaiuolo, 2014), or during infection by plasmodium (Tiburcio et al., 2012). At cellular resolution, RBCs flow, velocity, and shape are usually investigated with laser scanning microscopy, either with one-photon excitation and confocal detection for superficial vessels or transparent samples (Dirnagl et al., 1992;Villringer et al., 1994), or with multiphoton excitation for scattering tissue (Kleinfeld et al., 1998;Chaigneau et al., 2003;Shih et al., 2012;Kong et al., 2016). RBC velocity measurements are now commonly used to quantify changes of vascular dynamics in brain pathological models (Hutchinson et al., 2006;Schaffer et al., 2006;Shih et al., 2009;Autio et al., 2011;Kisler et al., 2017). Accurate measurement of RBC shape and velocity with laser scanning microscopy is therefore essential for accurate interpretation of data, comparison of data acquired in various experimental conditions or using other techniques.
RBC velocity is usually assessed with line-scans, i.e., repetitive scanning along a longitudinal portion of a vessel. Line-scans produce space-time (Xt) images on which each RBC leaves an oblique shadow from which the RBC velocity is calculated. Initial studies mostly focused at the smallest vessels, where RBC velocity ranges from zero to about 1 mm/s. RBC velocity was calculated using a simple velocity model: the ratio of the displacement of the RBC from one line to the successive one divided by the time between two lines. These two parameters were measured using image processing algorithms: either a distance measurement after binarization or SVD (Dirnagl et al., 1992;Villringer et al., 1994;Kleinfeld et al., 1998;Chaigneau et al., 2003). RBC velocity measurements were then extended to larger vessels, i.e., arterioles and venules, where velocity is higher and its quantification becomes a technical challenge in terms of image acquisition and analysis (Hutchinson et al., 2006;Kang et al., 2006;Shih et al., 2009;Drew et al., 2010;Rungta et al., 2018). For this reason, a variety of image processing algorithms have been proposed : line fitting (Zhang et al., 2005), Radon Transform (Drew et al., 2010;Chhatbar and Kara, 2013), LSPIV (Kim et al., 2012), and Fourier Transform (Autio et al., 2011). Nevertheless, no study questioned the velocity model and raised the point that time registration was approximate as it depends on the scanning velocity and direction.
Here, we performed a detailed theoretical analysis of the line-scan acquisition method, assessing the impact of scanning velocity and direction on RBC size and velocity. Based on this analysis, we provide new algorithms that measure accurately RBC size and velocity, avoiding quantification errors that reach up to 100% in high speed vessels. We then validate experimentally our theoretical approach by measuring blood velocity in small and large vessels of anesthetized mice.

TPLSM System
Imaging was performed using a custom-made acquisition system and LabVIEW software (National Instruments, Austin, TX, United States). Femtosecond laser pulses were delivered by a Ti:Sapphire laser (Mira, 120 fs pulse width, 76 MHz, Coherent, Santa Clara, CA, United States) and targeted on the sample with galvanometric mirrors (Cambridge Technology, Bedford, MA, United States) and relay lenses (f 1 = 60 mm, f 2 = 250 mm). Light intensity was controlled by an acoustic optical modulator (MT110B50-A1.5-IR-Hk, AA Optoelectronic, Orsay, France). The excitation light was focused through a LUMFLN 60XW NA 1.1 objective (Olympus, Tokyo, Japan). Epifluorescence light was collected with a FF705-Di01 dichroic (Semrock, Rochester, NY, United States) and photons were separated based on their wavelength with a DCXR 560 (Chroma, Bellows Falls, VT, United States) dichroic mirror. Green light was filtered with an E800SP2 and a GQ620/40nm (Chroma, Bellows Falls, VT, United States) and targeted onto a GaAsP photomultiplier tube (Hamamatsu, Japan). Signals at the output of the photomultiplier tube were amplified with custom-build electronics and sampled at 1.25 MHz. Typical scanning velocities and corresponding line-scan conditions are provided in the Supplementary Table.

Experimental Model Surgery and Anesthesia
All animal care and experimentation were performed following the experimental protocols approved by the INSERM Animal Care and Use Committee (Protocol Nos. CEEA34.SC.122.12 and CEEA34.SC.123.12) and work was reported complying with the ARRIVE guidelines. 5 Adult Thy1-GCaMP6f (GP5.11) mice and 1 adult wild-type mouse from the Jackson laboratory were used, 3-12 months old, 25-35 g, both males and female, housed in 12-h light-dark cycle. Mice were chronically implanted with a cranial glass window over the olfactory bulb. The animal preparation was done similarly to previously described (Lyons et al., 2016). Mice were anesthetized with a bolus of ketaminemedetomidine (100 and 0.4 mg kg −1 body mass, respectively) injected IP. They breathed a mixture of air and supplementary oxygen (the final inhaled proportion of oxygen was ∼30%) and the body temperature was monitored with a rectal probe and maintained at ∼37 • C by a feedback-controlled heating pad. A craniotomy was performed with a dental drill and care taken not to apply pressure to the bone and the area was regularly flushed with cool aqueous buffer solution to avoid damage or heating of the underlying tissue. A cover glass (100 µm thick) was used for the window and sealed in place with photopolymerizable dental cement, which was also used to form a head-cap in which a titanium head-bar was embedded. Mice were permitted to recover for at least 3 weeks before the experimental sessions began.
For experiments, mice were anesthetized either with ketamine-medetomidine (100 and 0.4 mg kg −1 body mass, respectively) injected IP or with isoflurane (3%, in air). Experiments were performed within 20-100 min following injection of anesthetic. Breathing rate (2-3 Hz, regular and rhythmic) was monitored with a pneumogram transducer (Biopac Systems, Goleta, CA, United States). Body temperature was maintained at ∼37 • C using a heating pad.

Measurements and Analysis of RBC Velocity
Fluorescein dextran (70 kDa, D1823, Invitrogen, Villebon-sur-Yvette, France) was administered intravenously by retro-orbital injections and excited at 890 nm. Line-scan recordings were performed for 5-30 s on capillaries and arterioles. An image of each vessel in which line-scans were performed was also collected. The vessel internal diameter was measured as the width of the fluorescent plasma in this image after processing with a 3x3 median filter.

Quantification and Statistical Analysis
V RBCapp was computed with the SVD method (Kleinfeld et al., 1998) over 1s long sections using LabVIEW (National Instruments, Austin, TX, United States). Measurements were then averaged over the whole recording.
For Figure 3B, data were pooled from six mice. The distribution of diameters, V AA and V AR for each V scan is shown in Supplementary Figure 1. For each V scan , the relation between V AA and V AR was fit using IgorPro7 (Wavemetrics, Portland, ME, United States), creating a user-defined function corresponding to Eq. 9 and optimizing the only parameter, "V scan. " Iterative curve-fitting was performed by minimizing the value of chi-square using the Levenberg-Marquardt algorithm and the confidence interval was calculated for V scan at p < 0.05.
For Figure 3C, data was fit using IgorPro7 (Wavemetrics, Portland, ME, United States) using linear curve-fitting.
Simulations on Figures 1B,C, 2C-E, 3B were performed using Eqs 2, 7, 7a,b, and 9 with Microsoft Excel 2010. The error made by using V RBCapp instead of V RBCreal was calculated as (V RBCreal -V RBCapp )/V RBC real .

Data and Code Availability Statement
Data and code used in the study are available upon direct request. This complies with the requirements of the funding institutes and with institutional ethics approval.

Apparent Size of RBCs and Choice of Scanning Direction
Line-scans allow to estimate the RBC size along the vessel axis, that we will call RBC real size. So, we first investigated the relationship between the size of a RBC shadow, the RBC real size and the scanning velocity. If the RBC is still, neglecting the impact of the point spread function of the system, the size of the shadow equals the size of the RBC. The time for the scanning system to scan an RBC (T RBC ) is the ratio of its real size (D RBCreal ) by the scanning velocity (V scan ) when the RBC is still ( Figure 1A). For a moving RBC, the size of the shadow depends both on V scan and the real RBC velocity (V RBCreal ). Indeed the time needed by the scanning system to overtake the object depends on the relative speed between the scanning system and the object: V scan -V RBCreal . Therefore, T RBC is the ratio of D RBCreal by V scan -V RBCreal ( Figure 1A): The size of the shadow, or apparent size of a RBC (D RBC app ), is thus given by the product of V scan , by T RBC : Therefore, if V RBC real < V scan , then D RBC app ≈ D RBCreal . Otherwise the apparent RBC size will be different from the RBC size. More precisely, D RBC app is larger than D RBCreal when scanning is performed in the same direction as RBC flow (V RBC > 0), and smaller than D RBCreal when scanning is opposite to the flow (V RBC < 0) (Figures 1A,B). If the scanning direction is the same as the RBC flow, for large V RBC real , the scanning system will have difficulties to overtake RBCs, and D RBC app increases toward the infinite. The length of the scanned segment also sets a limit to the apparent size of RBCs. For all these reasons, scanning opposite to the direction of the RBC flow will allow accessing a larger range of RBC velocities than in the same direction as the RBC flow ( Figure 1C).
As D RBCreal varies depending on RBC orientation and vessel size, V RBC cannot be estimated directly from Eq. 2. Thus measuring RBC speed requires visualizing the shadow at least on two successive lines of the space-time image obtained.

Apparent RBC Velocity and True RBC Velocity
RBC velocity is usually calculated as the ratio of the displacement of the RBC from one line to the successive one X mov divided by T line , the time to acquire one line (Figure 2A). We will call this value the "apparent velocity" (V RBCapp ): T line is the sum of the time to scan the vessel segment, an eventual time to scan a region outside of the vessel and the time needed by the scanning system to "fly back" to the initial point of the scanned segment. The apparent velocity of a RBC corresponds to the inverse of the slope of the stripe it leaves on a space-time image (Figure 2A): α being the angle made by the stripes and the horizontal line. The mathematical model used in Eqs 3 and 4 would give the true RBC velocity if all pixels on a line were acquired at the same time, as with a camera. Nevertheless this is not the case with a scanning system, and that is why we call this velocity the "apparent velocity." Indeed with a scanning system, pixels within each line are acquired at scanning speed. Therefore each pixel from each line of the space-time image is acquired at a different time. Two successive pixels are separated by T pixel which is the ratio of the size of a pixel to the scanning system speed: X pixel /V scan ( Figure 2B). Therefore, the time used by the RBC to move by X mov from a line of the space-time image to the following one is actually T line + X mov /V scan . As a consequence, the mathematical model to calculate the real velocity of RBCs with a scanning system is: This can also be expressed as: Therefore the real velocity of RBCs is different from their apparent velocity. Accurate measurement of RBC velocity requires correcting V RBCapp by a factor depending on the scanning velocity. Anterograde scanning overestimates the RBC size whereas retrograde scanning underestimates the RBC size. The theoretical apparent size of a RBC (real size set to 6 µm diameter) was calculated from Eq. 2 and plot versus V RBCreal for a range of V scan typically used in standard two-photon microscopes. (C) Retrograde scanning allows accessing a larger range of RBC velocities. The theoretical apparent size of a RBC (real size set to 6 µm diameter) was calculated from Eq. 2 and plot versus V scan for a range of V RBCreal . As the scan length sets a limit to D RBCapp , the range of scanning velocities that can be used to measure a given V RBC covers a limited range of V scan if scanning is performed in the same direction as blood flow, but the whole range of scanning speeds can be used if scanning is performed opposite to blood flow. The range of scanning velocities that can be used is further limited by the length of the scanned segment.
Frontiers in Neuroscience | www.frontiersin.org Scheme of the image parameters. V RBCapp is the inverse of the slope of the shadow made by the RBC (angle α), which corresponds the ratio of the distance traveled by the RBC between two successive lines ( X RBC ) divided by the time step between two lines (T line ). (B) New analysis considering individual pixel time to calculate real velocity (V RBCreal ). Top: scheme of the image parameters taking into account that each pixel within a line is acquired at a different time during scanning. The time step between two consecutive pixels (T pixel ) depends on the pixel size (X pixel ) and scan velocity (V scan ). Therefore, the time to move by X mov from a line to the following one is actually T line + X mov /V scan . As a consequence, V RBCreal depends not only on T line and X mov but also on V scan as described by Eqs 5 and 6. These equations can be reformulated to calculate the anterograde apparent velocity of RBCs (V RBCAA ) and the retrograde apparent velocity of RBCs (V RBCAR ) as described by Eqs 7a,b. (C) V RBCreal diverges from V RBCapp when V RBCreal ≥ 1 mm/s. V RBCapp was calculated from Eq. 7 and plot versus V RBCreal for a range of V scan . (D) The error made by using V RBCapp instead of V RBC can reach 10s of percent. The error made by using V RBCapp instead of V RBC was calculated as (V RBCreal -V RBCapp )/V RBCreal using Eq. 7 and plot versus exact V RBC for a range V scan . Inset: enlargement of the plot initial part. (E) Anterograde scanning overestimates RBC velocity whereas retrograde scanning underestimates velocity. V RBCAA and V RBCAR were calculated from Eqs 7a,b and plot versus V RBCreal for V scan = 10 mm/s. Eq. 6 can be reformulated as: Therefore, if V RBCreal is much smaller than V scan , then V RBCapp ≈ V RBCreal (Figures 2C,D), otherwise V RBCreal cannot usually be estimated accurately by V RBCapp (Figures 2C,D).
Furthermore, V RBC app depends on the scanning direction. Absolute values of V RBCapp for anterograde scanning, i.e., scanning in the same direction as flow (V scan > 0), V RBC AA and retrograde scanning, i.e., scanning opposite to flow, V RBC AR will be defined as: Anterograde scanning overestimates RBC velocity (V RBCapp > V RBCreal > 0), whereas retrograde scanning underestimates velocity (V RBCreal > | V RBCapp |) (Figure 2E). Furthermore, for a given RBC real velocity and a given scanning velocity, the error made by using the apparent speed instead of the real RBC speed is larger with anterograde scanning than with retrograde scanning. As a consequence accurate measurement of RBC velocity requires taking into account both scanning velocity and direction.
Anterograde and retrograde apparent velocities are directly related by the following equation: Eq. 8 can be reformulated:

Experimental Validation
Equation 9 can be used to test for the validity of our model as this equation only contains values that can be experimentally set or measured. Therefore, we have simultaneously measured V RBC AR and V RBC AA in a sample of 38 brain vessels from six mice whose diameters ranged from 2.3 to 17.3 µm (average 6.7 ± 4.5 µm, n = 38) ( Figure 3A) using bidirectional line-scans over the same segment and performed a series of tests on this pool of experimental values. As predicted by our model, V RBC AA was always larger than V RBC AR (Figure 3B and Supplementary Figure 1). Furthermore, the difference between V RBC AR and V RBC AA increased both with V scan and with V RBC AR . The mathematical relation between experimental values of V RBC AR and V RBC AA was very close to the ones predicted by our model (Figure 3B) and very well fit using Eq. 9 (p < 0.05 for each fit corresponding to each V scan value) (Figure 3B). V scan values obtained by these fits had a very good match with real values of V scan (Figure 3C) as their relation could be fit by a line of slope 0.96 ± 0.01 (R 2 = 0.99), further confirming the validity of our mathematical model. V RBCreal was then computed from experimental values of V RBCAA using Eq. 7a [giving V RBCreal (V RBCAA )] and from experimental values of V RBCAR using Eq. 7b. [giving V RBCreal (V RBCAR )] ( Figure 3D). There was again a very good match between V RBCreal (V RBCAA ) and V RBCreal (V RBCAR ) ( Figure 3D) as the mathematical relationship can be fit by a line of slope 1.02 ± 0.01 (R 2 = 0.99). This completes the validation of our mathematical model to calculate V RBCreal and the corrections to apply to measurements.

DISCUSSION
We have developed new algorithms to calculate RBC size and velocity with a line-scan acquisition method, that take into account the scanner movement. We have shown that measurements of RBC size and velocity can be erroneous if the scanning speed and direction are not considered. These errors can be avoided by using our algorithms, which provide unbiased models. Our algorithms cannot only be used for future measurements but also to correct for past measurements. Last, we have demonstrated the validity of our methodology by experimental measurements. RBCs undergo severe deformations in capillaries in physiological and pathological conditions (Suzuki et al., 1996;Tomaiuolo, 2014). These deformations result in changes in their size along the vessel axis. Laser scanning microscopy is the method of choice to investigate these deformations in depth in living tissue. We have previously shown that RBC size increases with RBCs speed in capillaries where RBC speed is below 1 mm/s in the anesthetized rat (Chaigneau et al., 2003). Our new algorithm now allows extending such an analysis in conditions where RBCs speed is higher, and comparing pathological and physiological models.
RBC speed reaches 2-3 mm/s in brain capillaries, 10 mm/s in brain arterioles and more than 20-30 mm/s in larger pial vessels. Standard scanning systems provide scanning velocities from 5 to 20 mm/s (Kleinfeld et al., 1998;Chaigneau et al., 2003;Schaffer et al., 2006;Chhatbar and Kara, 2013;Kornfield and Newman, 2015;Dunn et al., 2018). For the later scanning velocity range, calculating RBC velocity without taking into account scanning speed and direction results in biased measurements. Resonant scanning mirrors, which provide scanning speed higher than 100 mm/s (Autio et al., 2011;Kim et al., 2012;Kisler et al., 2018), could overcome the problem but at the cost of restrictive conditions (the alignment of the vessel and scanning direction) and expensive upgrades. Our methodology allows to measure accurately RBCs velocity without any additional cost in all brain vessels. Having access to more and more animal models of brain pathology, numerous laboratories are now measuring resting blood velocity (Santisakultarm et al., 2014;Silva et al., 2014;Ishikawa et al., 2016;McConnell et al., 2016;Bragin et al., 2017;Liu et al., 2018). Accurate measurements are fundamental for comparison of data in a set of experimental conditions, within and in between laboratories. It will also allow obtaining the real RBC velocity in other body regions as laser scanning microscopy is also used in kidney (Kang et al., 2006;Dunn et al., 2018), retina (Kornfield and Newman, 2015), skin (Brown et al., 2001), hindlimb (Lasch et al., 2018), both in physiological and pathological condition. Furthermore, we have shown that retrograde scanning allows to sample higher RBC velocities that anterograde scanning for the same scanned segment. Therefore, retrograde scanning is advisable.
We have developed algorithms assuming that the scanning velocity was constant. Of course, scanning systems accelerate at the beginning of the scanned segment and decelerate at the end of the scanned segment, but most scanning systems are now able to stabilize their speed in less than 0.1 ms. Therefore, the scanning velocity is usually constant over most of the scanning. As acceleration and deceleration period distort RBCs shape and speed, the easiest approach to circumvent the problem is by discarding the corresponding sections of the spatiotemporal images. Nevertheless, in the eventuality of extremely short scanned segment, acceleration, and deceleration periods should be considered and algorithms could be adapted, providing that the exact kinetics of acceleration and deceleration of the scanning system are known.
Supplying oxygen, is one of the most critical roles of the brain vasculature (reviewed by Schmid et al., 2017). Local tissue oxygenation is directly linked to local blood flow and velocity. Under physiological conditions, in response to activation, both blood flow velocity and pO2 increases have been reported (Vazquez et al., 2010;Lecoq et al., 2011;Yaseen et al., 2011;Parpaleix et al., 2013). Prior the pO 2 increase a brief and smaller decrease in pO 2 has also been observed in capillaries and parenchymal regions close to capillaries (Lecoq et al., 2011;Parpaleix et al., 2013), reporting increased oxygen demand in the tissue. In the case of states of high energy expenditure, neurovascular coupling is essential for maintaining tissue oxygenation. It has been shown that, during sustained neuronal excitation, there was hardly any pO2 increase in tissue (Devor et al., 2011). Unbiased measurement of RBC velocity is fundamental for proper understanding of these mechanisms. Red blood cell morphology does not directly impact oxygen supply as the gas transport capacity of RBCs is not only determined by their morphology. Nevertheless, changes in RBCs morphology can alter their rheological properties, and as a consequence, modify oxygen supply. Under pathological conditions it has been shown that misshaping of RBCs due to sickle cell disease induces reduced hematocrit and, in some case increased, blood viscosity, which both contribute to reduced brain tissue oxygenation (Waltz et al., 2015).

CONCLUSION
Accurate measurement of RBC velocity and size requires taking into account both scanning velocity and direction. Our analysis algorithms provide a costless way to measure accurately the real velocity of RBCs over a range of scanning velocities and to correct for past measurements.

DATA AVAILABILITY
The datasets generated for this study are available on request to the corresponding author.

ETHICS STATEMENT
All animal care and experimentation were performed following the experimental protocols approved by the INSERM Animal Care and Use Committee (Protocol Nos. CEEA34.SC.122.12 and CEEA34.SC.123.12) and work was reported complying with the ARRIVE guidelines.

AUTHOR CONTRIBUTIONS
EC initiated the project, developed the mathematical model and the software, and analyzed the data. EC and SC designed the experiments and wrote the manuscript. MR and SC performed the experiments. SC supervised the project.

FUNDING
Financial support was provided by the Institut National de la Santé et de la Recherche Médicale (INSERM), the Fondation Leducq Transatlantic Networks of Excellence program (16CVD05, Understanding the role of the perivascular space in cerebral small vessel disease), and the ERC Advanced Grant "Imaging-in-the-magnet" (ERC-2013-AD6; 339513).

ACKNOWLEDGMENTS
We thank Manon Omnes for her help with mice. The team of SC is part of the École des Neurosciences de Paris Ile-de-France network.