Protocol | Published:

# High-throughput imaging flow cytometry by optofluidic time-stretch microscopy

## Abstract

The ability to rapidly assay morphological and intracellular molecular variations within large heterogeneous populations of cells is essential for understanding and exploiting cellular heterogeneity. Optofluidic time-stretch microscopy is a powerful method for meeting this goal, as it enables high-throughput imaging flow cytometry for large-scale single-cell analysis of various cell types ranging from human blood to algae, enabling a unique class of biological, medical, pharmaceutical, and green energy applications. Here, we describe how to perform high-throughput imaging flow cytometry by optofluidic time-stretch microscopy. Specifically, this protocol provides step-by-step instructions on how to build an optical time-stretch microscope and a cell-focusing microfluidic device for optofluidic time-stretch microscopy, use it for high-throughput single-cell image acquisition with sub-micrometer resolution at >10,000 cells per s, conduct image construction and enhancement, perform image analysis for large-scale single-cell analysis, and use computational tools such as compressive sensing and machine learning for handling the cellular ‘big data’. Assuming all components are readily available, a research team of three to four members with an intermediate level of experience with optics, electronics, microfluidics, digital signal processing, and sample preparation can complete this protocol in a time frame of 1 month.

## Introduction

Imaging flow cytometry is a powerful tool for basic research in a diverse range of fields, including immunology, microbiology, and marine biology, as it combines the strengths of imaging and flow cytometry1,2,3,4,5,6,7,8,9,10,11,12,13. It not only provides the usual ability of conventional non-imaging flow cytometry to count and analyze single cells in large heterogeneous populations, but also offers spatial metrics that can be used to further differentiate cells via cellular morphological variations, as well as cell-surface and intracellular molecular variations14,15,16,17,18,19,20. For example, defining the morphological features of cells, such as size, shape, and structure, is important for evaluating the progression and status of diseases. This is well aligned with the pressing need for progressively larger biomedical datasets for efficient and accurate data analysis to make better decisions in biomedical research and clinical diagnosis5,6,7,8,11,21. Unfortunately, the throughput of conventional imaging flow cytometers is constrained to ~1,000 cells per s because of the limited shutter speed and frame rate of built-in CCD or CMOS (complementary metal oxide semiconductor) image sensors, which places an upper limit on the number of cells that can be probed in a given period of time and hence does not allow enumeration of rare cells and outliers with high statistical accuracy.

Optofluidic time-stretch microscopy overcomes the throughput limit and is capable of performing high-throughput imaging flow cytometry at up to 100,000 cells per s (refs. 1,2,4,5,6,14,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32), which is about two orders of magnitude higher than the throughput of conventional imaging flow cytometry. The high-throughput imaging capability is enabled by optical time-stretch imaging1,3,12,13,17,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69, which lies at the heart of optofluidic time-stretch microscopy and provides blur-free bright-field images of ultrafast dynamics at an ultrahigh frame rate of >10,000,000 frames per s. Optical time-stretch imaging builds on frequency-to-space conversion to map the spatial profile of the imaging target onto the spectrum of each incident probe pulse, frequency-to-time conversion to transform the spectrum into a temporal waveform for single-pixel detection, and digital reconstruction of the spatial profile (image) of the target. In addition to the high-throughput imaging capability, it also provides near-diffraction-limited spatial resolution and high sensitivity due to its single-pixel photodetection. Furthermore, by virtue of its ability to generate cellular ‘big data’, the capacities of optofluidic time-stretch microscopy can be enhanced through the use of computational tools, including compressive sensing30,39,41,67 and machine learning5,6,16,18,28. Since it was first demonstrated in 2009 (ref. 1), optical time-stretch imaging has been integrated with on-chip microfluidics4,5,6,14,15,18,19,28 for large-scale multiparametric single-cell analysis of various cell types ranging from cancer cells to microalgae, enabling a unique class of biological, medical, pharmaceutical, and green energy applications. These include real-time detection of aggregated platelets in blood5, label-free detection of the drug response of cancer cells6, and evaluation of the lipid productivity of microalgae15,17,18,19,27,28,30.

### Development of the approach

Optofluidic time-stretch microscopy can be operated at various wavelengths1,2,4,12,15,26,28. In 2009, when it was first demonstrated, its basic configuration was based on the combination of a mode-locked erbium-doped fiber laser at a center wavelength of ~1,550 nm with a spectral bandwidth of ~20 nm1 and a dispersion compensation fiber (such fibers are commonly used to compensate for temporal dispersion in long-haul transmissions), which provides high dispersion-to-loss ratios in the ~1,550-nm spectral range. This ~1,550-nm spectral range corresponds to the telecom band in which high-quality low-cost fiber components are available, but high-quality free-space imaging optics such as objective lenses are not available. This limitation motivated researchers to develop necessary components and configurations to implement optofluidic time-stretch microscopy at shorter wavelengths, which are desirable for high-resolution imaging and biomedical applications. In 2012, researchers demonstrated optofluidic time-stretch microscopy at a wavelength of ~1 µm21,22,51 by using a mode-locked ytterbium-doped fiber laser and an SMF28 fiber spool for large temporal dispersion. In the same year, optofluidic time-stretch microscopy was performed at a wavelength of ~800 nm based on a mode-locked laser with a Ti:Sapphire crystal with a broad bandwidth of ~40 nm15,26. The 800- to 1-µm band was considered to be the optimum spectral range for operating optofluidic time-stretch microscopy because both free-space optics and fiber optics are available. Implementation of optofluidic time-stretch microscopy at shorter wavelengths was regarded as difficult because of the lack of low-loss fibers with a sufficiently large amount of temporal dispersion. However, in 2016, free-space angular-chirp-enhanced delay was invented to provide large temporal resolution in the visible spectral range, enabling the operation of high-resolution optofluidic time-stretch microscopy12,31 and hence offering further opportunities for biomedical applications.

Optofluidic time-stretch microscopy can be operated in a quantitative phase imaging configuration to provide both intensity and phase maps of each single cell16,20,21,28,29,45. The image obtained by quantitative phase imaging is a map of path-length shifts associated with the cell and contains quantitative information about both the local thickness and refractive index of the cellular structure. Specifically, this is made possible by the use of an optofluidic time-stretch microscope in an interferometric setting to encode the phase content of each cell onto the intensity of the transmitted light through the cell, which interferes with the reference light of the interferometer, and temporal decoding of the interferogram using a time stretcher20,21,28. In the past few years, optofluidic time-stretch microscopy with quantitative phase imaging—or optofluidic time-stretch quantitative phase microscopy, in short—has been demonstrated by a few groups20,21,28 and used to evaluate the intracellular contents of leukemia cells29, characterize different cultures of microalgal cells28, investigate spleen tissue for disease diagnosis21, and measure intracellular protein concentrations of cancer cells20.

### Overview of the procedure

In this protocol, we describe how to perform high-throughput imaging flow cytometry by optofluidic time-stretch microscopy (Fig. 1). This has been driven by the rapidly growing number of users of the method, as well as the pressing need for a protocol that inexperienced users could follow in order to produce reliable results, which should not substantially depend on settings and conditions. Specifically, the protocol provides recipe-like instructions for how to build an optical time-stretch microscope (Steps 1–36) and a cell-focusing microfluidic device (Steps 37–64) for optofluidic time-stretch microscopy, use it for high-throughput single-cell image acquisition with sub-micrometer resolution (>10,000 cells per s; Steps 65–81), conduct image construction and enhancement (Steps 82–86), perform image analysis for large-scale single-cell analysis (Steps 87–103), and use computational tools such as compressive sensing and machine learning for handling the cellular ‘big data’ (Steps 104–106). The protocol is designed for any potential user with limited knowledge interested in constructing and using an optofluidic time-stretch microscope for conducting high-throughput imaging flow cytometry.

### Applications of the method

By virtue of its ability to obtain images of a large number of cells with high throughput, optofluidic time-stretch microscopy has been applied to a variety of scientific and industrial applications. As the image data obtained by optofluidic time-stretch microscopy contain cellular, multicellular, and intracellular information, they can be used to classify different types of cells or cells under different conditions. Moreover, to maximize the accuracy of classification based on the image data, comprehensive feature extraction followed by multiparametric analysis can also be used concurrently. Consequently, optofluidic time-stretch microscopy has enabled applications such as oil-rich microalga screening15,19,28, drug screening6, cancer-cell identification16,20, and platelet aggregation diagnosis5.

Morphological and textural features of individual cells identified from their images provide valuable information about them. In the past, hundreds of morphological and textural features of drug-treated and untreated MCF-7 cells have been extracted, which was followed by multiparametric classification with a support vector machine (SVM). As a result, the cellular response to a drug treatment was identified, indicating that the method could be more broadly applicable to drug screening6. The same approach has also been applied to multiclass classification of phytoplankton18. Another possible application for cell classification based on the morphological and textural features is in studying cellular functions accompanied by morphological changes, including budding2, polarization, phagocytosis, apoptosis, and differentiation.

Multicellular analysis such as identification of cell aggregation can also take advantage of the morphological features obtained by optofluidic time-stretch microscopy. For example, it is known that activated platelets form aggregates and can be a potential diagnostic biomarker for the prevention of thrombotic disorders such as heart attacks and strokes. Previously, optofluidic time-stretch microscopy in combination with massive feature extraction and SVM classification has been shown to distinguish platelet aggregates from single platelets and leukocytes, indicating potential utility of the method as a diagnostic tool5. Another example of the multicellular analysis is the study of Scenedesmus, a genus of green algae that consists of two-daughter and four-daughter colonies, which can be distinguished by optofluidic time-stretch microscopy17.

The quantification of intracellular information, such as the accumulation and distribution of metabolites, has extended the utility of optofluidic time-stretch microscopy to metabolic engineering. In the past few years, optofluidic time-stretch microscopy has been used to characterize populations of Euglena gracilis cells and identify the oil content of individual E. gracilis cells via opacity distribution functions15,19,28. E. gracilis is a unicellular microalgal species known to produce lipids that can be converted to biofuels. By adding quantitative phase imaging capability to optofluidic time-stretch microscopy, the method offers higher specificity for identifying oil-rich E. gracilis28 and distinguishing cancer cells from T cells16 and hybridomas20.

### Advantages and limitations of the method

The primary advantage of optofluidic time-stretch microscopy is its extremely high throughout (up to 100,000 cells per s) with near-diffraction-limited spatial resolution and high sensitivity. The ability to generate numerous single-cell images in a short period of time enables highly accurate classification of the cells and the use of advanced computational tools such as compressive sensing and machine learning. Another advantage of the method is its simplicity in instrumentation. The microscope consists of only commercially available components and does not require special or custom parts. The microfluidic device can also be fabricated from commercially available reagents and parts at low cost. In addition, its compatibility with conventional and rapidly evolving computational methods (which are sometimes available as open-source software) is a strong advantage of the method. Finally, the method’s compatibility with quantitative phase imaging to provide both intensity and phase maps of single cells is a merit of the method, as this is not possible with other methods, further enhancing the utility of the method to label-free single-cell analysis.

On the other hand, the primary limitation of the method is (which is, in a sense, equivalent to the negative aspect of the primary advantage or the ‘yin and yang’ of the method) the so-called big data problem, caused by the massive amount of cellular data in the form of images generated by the method. This can be circumvented by use of a field-programmable gate array (FPGA) to continuously process and transfer the data2,17. The FPGA can help construct the images, extract features, and perform cell classification in real time without causing any interruptions. The high-throughput operation of the method also leads to an increased risk of clogging microchannels in the microfluidic device. Another limitation of the method is its inability to provide fluorescence images, because of which it cannot be used to perform intracellular protein localization and the translocation of transcription factors via fluorescent labeling, although single-point fluorescence measurements can be implemented concurrently to partly circumvent the limitation14,19.

### Comparison with other methods

A comparison in capabilities between optofluidic time-stretch microscopy and other imaging flow cytometry methods is summarized in Table 1, in which suitable applications of optofluidic time-stretch microscopy are shown. Currently, optofluidic time-stretch microscopy is the only imaging flow cytometry method that has a cell throughput comparable to that of conventional flow cytometry (~100,000 cells per s), indicating that it is suitable for analysis of large-volume samples that require high-throughput data acquisition, such as whole-blood and environmental samples. Another unique feature of optofluidic time-stretch microscopy is its compatibility with quantitative phase imaging16,21,28, as described above. A combination of optofluidic time-stretch microscopy and quantitative phase imaging provides a map of path-length shifts associated with each cell; this contains quantitative information about both the local thickness and refractive index of the cellular structure. On the other hand, its inability to provide fluorescence images limits its application, whereas other techniques such as time-delay integration7,8, fluorescence imaging by frequency-division multiplexing (FDM)70,71, and temporal-spatial conversion72 are suitable for analyzing cells whose fluorescence images have an essential role in the analysis. Another drawback of optofluidic time-stretch microscopy is its high implementation cost, as it requires a costly broadband pulse laser as an optical source, a long (>1 km) dispersive fiber for time stretch and a high-speed analog-to-digital converter (ADC) for signal acquisition. Low-cost implementation of these essential components will further extend the utility of optofluidic time-stretch microscopy.

### Level of expertise needed to implement the protocol

Optofluidic time-stretch microscopy of biological samples requires expertise in the areas of optics, microfluidics, electronics, digital signal processing, and biological sample preparation (Table 2). In our experience, a senior graduate student or postdoctoral fellow with training in experimental optics and digital signal processing can set up the optical time-stretch microscope and perform digital image processing and single-cell analysis. A more junior graduate student with microfabrication experience can fabricate the silicon molds for the microfluidic device in a clean-room facility, whereas lab experience at the undergraduate level is necessary to mold and fabricate microfluidic devices in polydimethylsiloxane (PDMS) from the silicon molds.

### Experimental design

#### Optofluidic time-stretch microscope (Steps 1–106)

An optofluidic time-stretch microscope is composed of (i) an optical time-stretch microscope for high-speed blur-free image acquisition, (ii) a microfluidic device for high-throughput cell focusing, and (iii) a computer for digital image processing, large-scale single-cell analysis, and advanced computational analysis. In the subsequent subsections, the principles of these primary subsystems and processes are described1,2,3,4 (Fig. 1). Note that the performance of the method for high-throughput imaging flow cytometry depends heavily on an accurate integration of the subsystems, as well as tight collaboration between developers and users in different areas of science and engineering (mainly optics, electronics, microfluidics, computer engineering, and bioengineering).

#### Optical time-stretch microscope (Steps 1–38)

A typical optical time-stretch microscope for optofluidic time-stretch microscopy is schematically shown in Fig. 2a1,3, whereas a picture of an embodied optical time-stretch microscope is shown in Fig. 2b. The microscope consists of several key components, including a broadband pulse laser, a pair of spatial dispersers, a pair of objective lenses, a temporal disperser, a photodetector, a digitizer, and a digital image processor. Each broadband pulse from the laser is incident on the first spatial disperser (typically a diffraction grating), which spatially maps the spectrum of the pulse into a 1D rainbow pattern. The 1D rainbow is focused via the first objective lens onto the microchannel in the microfluidic device in which the cells flow and are illuminated by the rainbow. Different frequency components of the pulse hit different spatial coordinates of a flowing cell, such that the intensity of the transmitted rainbow contains the 1D spatial profile of the cell. The rainbow is recombined via the second objective lens by the second spatial disperser (typically the same spatial dispersive element but placed in a mirror-like arrangement) into a single pulse. The image-encoded pulse is temporally broadened or time-stretched by the temporal disperser (typically a dispersive fiber) according to different transmission velocities of different frequency components of the pulse or the so-called group-velocity dispersion of the temporal disperser34. Consequently, the temporal waveform pattern of the time-stretched pulse agrees with its own spectrum (Fig. 3a)33. The time-stretched pulse is detected by the single-pixel photodetector and digitized by the digitizer. The pulse is repeated at a certain repetition rate such that, when the cell flows in a direction perpendicular to the 1D rainbow, consecutive pulses are used to scan the cell in 2D. In other words, a 2D image of the cell can be obtained by digitally stacking the 1D cross-sectional profiles of the cell.

Although the temporal disperser can be placed either before the first spatial disperser or after the second spatial disperser for performing optical time-stretch imaging, the former configuration is preferable for a few reasons. First, this configuration minimizes photodamage to the cells. Placing the temporal disperser ahead of the first spatial disperser helps attenuate the laser power incident on the cells because of the optical loss in the temporal dispersive element. Second, this configuration reduces the level of spectral distortion of the pulses. As optical time-stretch imaging is based on ultrashort pulses, their high peak intensity often causes unwanted non-linear effects in the temporal dispersive element, such as self-phase modulation, cross-phase modulation, and four-wave mixing, leading to spectral artifacts on the pulses and hence on the acquired images. Placing the temporal disperser before the spatial disperser helps calibrate the acquired images based on the spectra of the pulses. Finally, this configuration facilitates the alignment of the microscope components. From a practical point of view, to ensure good imaging quality, alignment is usually a necessary process whenever a new microfluidic device is placed between the objective lenses, which frequently happens because of the need for testing different samples. Placing the temporal disperser before the spatial disperser simplifies this alignment process because only the optical components after the microfluidic device need to be realigned.

The imaging performance of the optical time-stretch microscope is shown in Fig. 3b,c. The spatial resolution of the optical time-stretch microscope is fundamentally limited by the wavelength of the laser and the numerical aperture of the objective lens, and can be quantitatively measured with the standard USAF-1951 resolution chart. Figure 3b shows an image of the resolution chart in which the line pairs of group 9 element 3 can be clearly identified, indicating spatial resolution of >780 nm14. Figure 3c shows an image library of various cell types: MCF-7 cells (a breast cancer cell line)6, E. gracilis cells (a microalgal species)19, K562 cells (a leukemia cell line), and aggregated platelets5, which are imaged by the optical time-stretch microscope at a flow speed of 1–10 m/s, a speed at which conventional CCD and CMOS image sensors cannot image cells with high sensitivity. Here, each cell image consists of ~200 pixels in the flow direction and ~100 pixels in the lateral direction (rainbow direction). The difference between the numbers of pixels in these two directions indicates that the optofluidic time-stretch microscope is capable of imaging cells flowing at an even higher speed (>20 m/s). As different types of cells have different values of tolerance to the hydrodynamic pressure, it is important to properly choose the flow speed and hence the throughput for high cell viability.

#### Microfluidic device (Steps 39–64)

The microfluidic device73,74 plays an important role in optofluidic time-stretch microscopy by continuously positioning cells in a single narrow optical focal point. The focal positions of cells within the microchannel when they pass through the imaging region greatly affect the quality of the images. To acquire high-quality, blur-free images of cells in a high-speed flow, it is essential to use a microfluidic device to position cells along a uniform and narrow set of streamlines. In addition to maintaining cells in the same focal depth, the microfluidic device enables a uniform velocity for cells, which is important for the line-scan mode of optofluidic time-stretch microscopy. Non-uniform flow speeds would result in distorted cell images. To make sure that all cells line up in a single narrow focal stream, two types of microfluidic cell focusing can be used: hydrodynamic focusing (Fig. 4a) and inertial focusing (Fig. 4b); which type to use depends on the sample type and application. The procedure for fabricating a PDMS microfluidic device is shown in Figs. 5 and 6, and Supplementary Video 1.

Hydrodynamic focusing10,75 is a passive technique that provides continuous cell positioning in many commercial flow cytometers (Fig. 4a). It is generally implemented through the confinement of a slower-flowing sample stream by a faster-flowing sheath stream that envelops the sample stream from one or more sides. Once the streams of fluids, sample fluid and sheath fluid, begin flowing side by side and in the same direction under laminar flow conditions, the center stream (sample fluid) is focused and surrounded by the second streams (sheath fluids). Relative flow rates of the fluid streams can be manipulated to control the cross-sectional area of the focused flows. Usually, the sheath fluid is introduced into a straight microfluidic channel at a higher flow rate and occupies a larger proportion of the channel than the sample fluid, forcing the sample fluid in the center into a smaller cross-sectional area of the channel76,77. The principle of hydrodynamic focusing confines cells within the core stream within the interrogation optics and aligns the cells one by one when passing through the field of view of the optical time-stretch microscope. Although this technique is easy to implement, the use of a cell-free sheath flow with high flow rate78 limits the overall sample throughput.

Inertial focusing79,80,81 is a passive technique that has been used for parallel and precise cell positioning in confined channel flows at a moderate Reynolds number (Re) (~1 < Re < ~100) (Fig. 4b). Due to two inertial lift forces (i.e., shear-gradient lift and wall-effect lift forces) perpendicular to the main flow direction, cells migrate across streamlines, focus, and order deterministically at equilibrium positions between the channel centerline and the channel walls. The number of equilibrium positions in a simple channel depends on the symmetry of the channel (i.e., with a rectangular channel yielding two to four equilibrium positions depending on Re). Single-stream focusing of mammalian cells82 and microalgae cells varying in shape27 in a single focal plane has been achieved using a stepped channel, which consists of a low-aspect-ratio straight rectangular channel and a series of expansion steps in channel height. Basically, the combination of inertial focusing upstream and a pair of geometry-induced local helical secondary flows allows for the migration of cells to a single focal plane. Cells that are randomly distributed close to the inlet first migrate to two main positions along the long surface of the rectangular microchannel under the effect of inertial lift forces, then are diverted away from one of the long surfaces in response to the pair of helical secondary flows induced by the step, and finally are directed to a single equilibrium position. Compared with hydrodynamic focusing, inertial focusing requires only a single inlet channel and enables continuous, sheathless, single-stream cell focusing and ordering in a high-throughput manner. However, it may be problematic to measure highly heterogeneous samples, as the inertial lift forces and resultant focal positions are dependent on the properties of the cells (i.e., size, shape, and deformability80,83,84).

#### Sample preparation (Steps 78–81)

Optofluidic time-stretch microscopy requires cells in the sample to be non-adherent and suspended in solution. Phosphate-buffered saline (PBS) is a common suspension buffer. Single cells are required to be suspended at a concentration of 105–107 cells per mL to prevent the microchannels in the microfluidic device from clogging. To analyze cells from solid tissues such as liver and tumors, the tissues must be disaggregated mechanically or enzymatically to produce single cells. Further details of the sample preparation approach depend on the type of the sample. We provide sample preparation techniques for microalgal cells, blood cells, and cancer cells that have been tested by optofluidic time-stretch microscopy in the Supplementary Methods.

#### Digital image processing (Steps 82–103)

Once single-cell images are acquired by the optofluidic time-stretch microscope, they are subjected to digital image processing. Before single-cell analysis is performed, the acquired images need to be transformed into a numerical feature space that preserves the relevant information of the cells. Note that although each pixel in the image can be considered to be a numerical feature, the pixels contain only local information, such that a very complex and non-linear model is required85 to capture the cellular geometry or high-level cellular features from the pixel level. Furthermore, complex non-linear models such as convolutional neural networks (CNNs)86 are generally more difficult to train, as they have a large number of trainable parameters (requiring more training samples) and are more likely to overfit on the training data. For this reason, feature extraction is recommended. If the goal is to extract features that are interpretable and have biological meaning, CellProfiler, an open-source software for cellular image analysis, can be employed to extract human-interpretable numerical features87,88,89. On the other hand, if interpretability is not the primary concern, then CNNs pre-trained on natural images such as VGGNet90 or ResNet91 can be used as a feature extractor92.

Here, we describe the use of CellProfiler for feature extraction. CellProfiler is convenient for feature extraction but is limited in the functionality of segmentation. Due to the discrepancy in image generation between optofluidic time-stretch microscopy and conventional imaging, several unique types of noise (i.e., horizontal lines) that can be often seen on time-stretch images may not frequently appear in the images taken by conventional imagers. For this reason, in order to perform more accurate and robust segmentation to all images, cell segmentation is performed with MATLAB5,6. The quality of segmentation depends on the image quality. Noise reduction before segmentation can improve the accuracy of segmentation. Segmentation may not be properly completed when multiple cells are captured in the same image or if the cell is not completely captured in the field of view. In such a case, it is recommended to discard those images if their occurrence is not very frequent. The complete procedure for digital image processing is shown in Fig. 7.

#### Large-scale single-cell analysis (Steps 104–106)

When a large number of cell images are taken, statistical analysis can be conducted on each cell. Typically, >1,000 cell images are needed to obtain robust results, although it may vary case by case5. Computation cost may also become an issue when the sample size is very large. Depending on the size of the feature space, feature selection may be useful before analysis. This is because more computation is required to deal with a large number of features and it is probable that not all extracted features contain useful information for a given task. In feature selection, features that do not contribute to the discrimination of different types of cells are discarded, such that analysis on the resulting lower-dimensional representation is more efficient. As the goal of high-throughput imaging flow cytometry by optofluidic time-stretch microscopy is to differentiate between different cell types, a divergence measure is used to determine the ‘distance’ between distributions of different classes. At each given feature, a large divergence between the classes indicates a better separation between the classes on this dimension and thus this feature should be selected, and vice versa.

Although there are many divergences that one could choose from93,94, here we focus on the maximum mean discrepancy (MMD)95 because it is a non-parametric kernel-based divergence measure that captures non-linear difference between distributions. MMD is defined as the distance between the mean embedding of two distributions in a reproducing kernel Hilbert space (RHKS) (graphically illustrated in Fig. 8),

$MMD 2 H , X , Y = 1 m ( m - 1 ) ∑ i = 1 m ∑ j ≠ i m k x i , x j + 1 n ( n - 1 ) ∑ i = 1 n ∑ j ≠ i n k y i , y j + 2 m n ∑ i = 1 m ∑ j ≠ i n k x i , y j$
(1)

where H is the unit ball in a RHKS and k is a universal kernel such as the Gaussian kernel or the Laplacian kernel. $X∈ R d × m$ and $Y∈ R d × n$ correspond to samples from the two distributions of interest, which consist of d-dimensional extracted features with sample sizes m and n, respectively. The MMD score takes zero if and only if the distributions of X and Y are the same, whereas it takes a large non-negative number if X and Y are generated from different distributions. As the MMD can give a scalar output for multidimensional distributions, it can be used as an efficient tool for feature selection. Therefore, in the feature selection, a feature with a larger MMD score indicates that it is likely to have more contribution to the classification.

A machine learning classifier can be trained to differentiate between different cell types. Classifiers should be selected based on the complexity of the feature space and the learning task. For simple binary classification on CellProfiler-extracted features, a linear classifier performs reasonably well. Whereas for features that could exhibit non-linear dependency (such as features extracted from the first few layers of a pretrained CNN), non-linear classifiers, including kernel SVMs96 and neural networks97, are expected to have higher accuracy. Here, the classifier we choose is the soft-margin SVM, which aims to find a large-margin separating hyperplane by optimizing the objective:

$min w , ζ > 0 1 2 w 2 +C ∑ i ζ i suchthat y i w T x i ≥1- ζ i ,∀i$
(2)

where w is the normal vector of the hyperplane, xi is the feature vector of the ith instance, yi is the corresponding label, $ζ i =max ( 0 , 1 - y i ( w × x i + b ) )$, and C is the slack variable that provides a tradeoff between misclassification and margin width.

In this protocol, a relatively simple signal processing and cell analysis scheme is used, but more advanced computational methods can be used to further improve the efficiency and accuracy of a given task. For instance, if it is in one’s interest to further increase the throughput of imaging flow cytometry such that the chromatically dispersed pulses are overlapped, then compressed sensing techniques98 can be applied to solve the underdetermined system30 and recover the signal. Also, if the high throughput of time-stretch imaging results in a large number of training samples, it is possible to skip the image processing or feature extraction step and train a deep CNN on the acquired images99. Note that deep neural networks can also be applied in signal processing, as they achieve state-of-the-art performance with regard to signal denoising100,101, deblurring102, or super-resolution101,103. On the other hand, new variants of divergence or independence measure can be used to compute the significance level of each feature in the feature selection104. Therefore, it is potentially possible to interpret the statistical significance of drug-induced morphological changes.

## Materials

### Reagents

• KMPR photoresist (MicroChem, cat. no. KMPR 1035)

#### Caution

KMPR photoresist is highly flammable and toxic.

• SU-8 developer (MicroChem, cat. no.Y020100)

#### Caution

This liquid is highly flammable and toxic. Do not touch this reagent directly. Handle it in a fume hood with appropriate personal protective equipment.

• Isopropanol (Sigma-Aldrich, cat. no. 278475)

#### Caution

This liquid is highly flammable. Handle it in a fume hood with appropriate personal protective equipment.

• Acetone (Sigma-Aldrich, cat. no. 534064)

#### Caution

This solvent is highly flammable and toxic. Use a fume hood and wear appropriate personal protective equipment when handling it.

• Pressurized nitrogen gas (Jyotou Gas, >99.99 vol.%)

• PDMS base and curing agent (Dow Corning Sylgard 184 Silicone Elastomer Kit; Ellsworth Adhesives)

• Phosphate-buffered saline (PBS; pH 7.2; Gibco)

• Milli-Q ultrapurified water

• MCF-7 cells (DS Pharma Biomedical, cat. no. 86012803)

#### Caution

The cell lines used in your research should be regularly checked to ensure that they are authentic and are not infected with mycoplasma.

• Euglena gracilis cells (National Institute of Environmental Studies, strain no. NIES-48)

#### Caution

The cell lines used in your research should be regularly checked to ensure that they are authentic and are not infected with mycoplasma.

• K562 cells (National Institute of Biomedical Innovation, Health and Nutrition, cat. no. JCRB0019)

#### Caution

The cell lines used in your research should be regularly checked to ensure that they are authentic and are not infected with mycoplasma.

• Human blood

#### Caution

Informed consent must be obtained from blood donors. The protocol must be performed in compliance with appropriate national laws and institutional regulatory board guidelines, and an appropriate ethics review board must approve the protocol for the specific experimental setup. The experiments described in this protocol were approved by the International Ethics Committee of the Faculty of Medicine, the University of Tokyo.

### Equipment

• Cell-culture dish (Falcon, cat. no. 353003)

• 40-µm Cell strainer (BMS, cat. no. BC-AMS-14001)

• 2-mL Conical tube (Azone, cat. no. 1-1600-02)

• 10-µL Standard pipette tip (Rikaken, cat. no. RST-481SCRST)

• 200-µL Standard pipette tip (Rikaken, cat. no. RST-4820YRST)

• 1000-µL Standard pipette tip (Watson, cat. no. 122-806C)

• Femtosecond pulse laser (Spectra Physics, model nos. Tsunami 3941-50NS-UPG-FE and Millennia EV 10-TG-FE)

• Isolator (Thorlabs, model no. IO-3-780-HP)

• Mirror (Thorlabs, model no. BB1-E03)

• Kinematic mirror mount (Thorlabs, model no. KM100CP/M)

• Collimator (Thorlabs, model no. F260FC-780)

• Wave plate (Thorlabs, model nos. WPQ10M-808, WPH10M-808)

• Rotation mount (Thorlabs, model no. RSP1C/M)

• Dispersive fiber (Nufern, cat. no. 630-HP)

• Plano-convex lens (Thorlabs, model no. N-BK7)

• Lens mount (Thorlabs, model no. LMR1/M)

• Diffraction grating (Richardson Gratings, Newport, model no. 53-*-360R)

• Diffraction grating mount (Newport, model no. DGM-1)

• Objective lens (Olympus, model no. LUCPlanFLN 40×)

• Lens positioner (Newport, model no. LP-05A)

• Translation stage (Newport, model no. M-462-XYZ-M)

• Translation stage (Optosigma, model no. BSP-40100)

• Photodetector (New Focus, model no. 1590-B)

• Patch cable (Thorlabs, model nos. P1-630A-FC-1, FT400 EMT)

• Electric cable (Thorlabs, model no. CA2948)

• High-speed oscilloscope (Tektronix, model no. DPO71604B)

• Syringe pump (Harvard, model no. 70-4500 Pump 11Elite)

• CCD camera (Thorlabs, model no. DCC1545M)

• Neutral-density filter (Thorlabs, cat. no. ND20A)

• Flip mount (Thorlabs, model no. TRF90/M)

• XY translation mount (Thorlabs, model no. XYFM1/M)

• Post (Thorlabs, model no. TR100/M)

• Post holder (Thorlabs, model no. PH50/M)

• Optical power meter (Thorlabs, model nos. PM100D, S120C, S314A)

• Silicon wafer (2 inches in diameter, type-N, 1S polished; Silicon Sense)

• Silicon wafer (4 inches in diameter; Silicon Sense)

• Petri dish (55 mm in diameter; ASONE, cat. no. 1-8549-02)

• Petri dish (150 mm in diameter; Iwaki, cat. no. 1030-150)

• Adhesive tape (3M, cat. no. 810-1-18D)

• Glass slide (Matsunami, cat. no. S1111)

• Mask aligner (Mikasa, cat. no. MA-20)

• Spin coater (Mikasa, cat. no. MS-A100)

• Hot plate (ASONE, cat. no. ND-2)

• Centrifugal mixer (THINKY, cat. no. AR-100)

• Vacuum chamber (ASONE, cat. no. VL-ALN)

• Tweezer (ASONE, cat. no. 4WFG)

• Scalpel (Kai, cat. no. 532-A)

• Plasma cleaner (Harrick Plasma, cat. no. PDC-001-HP)

• Oven (EYELA, cat. no. NDO-420)

• Puncher (outer diameter, 0.035 inches; inner diameter, 0.027 inches; cutting edge diameter, 0.03 inches; Syneoco, cat. no. CR0350275N20R4)

• PEEK tubing (1/32 × 0.02 inches; IDEX Health & Science, cat. no. 1569L)

• Syringe (1 mL; Terumo, cat. no. SS-01T)

• Syringe (30 mL; Terumo, cat. no. SS-30ESz)

• Syringe needle (Instech Laboratories, cat. no. LS25)

• Stereomicroscope (Leica, cat. no. S8APO)

• Microscope (Olympus, cat. no. IX73)

• High-speed camera (Vision Research, cat. no. Phantom Miro eX4)

• 100–1,000 µL Pipette (Eppendorf, cat. no. 4920000083)

• 1,250-µL Low-retention filter tip (Greiner Bio-One, cat. no. 750265)

• 5–50-mL Liquid dispenser (Eppendorf, cat. no. 4967000057)

• 50-mL Conical centrifuge tube (Nunc, cat. no. 362696)

• Plant growth chamber (NK System, cat. no. TG-180-5L)

• Suspension culture flask (50 mL; Greiner Bio-One, cat. no. 690195)

• Clean bench (Showa, cat. no. S-1301WRV)

• Centrifuge (Thermo Fisher, cat. no. 75004263)

• 21-Gauge butterfly needle with lure adapter and holder (Nipro, cat. no. 32-380)

• Vacuum blood collection tube with 0.5 mL of 3.2% (vol/vol) sodium citrate (Venoject II; Terumo, cat. no. VP-CA050K70)

• 1.5-mL Microcentrifuge tube (Sorenson, cat. no. 11721)

• Pipet-Aid (Drummond, cat. no. 175705)

• 2-µL Micropipette (Thermo Fisher, cat. no. 4641010N)

• 20-µL Micropipette (Thermo Fisher, cat. no. 4641060N)

• 200-µL Micropipette (Thermo Fisher, cat. no. 4641080N)

• 1,000-µL Micropipette (Thermo Fisher, cat. no. 4641100N)

• Biosafety cabinet (Panasonic, model no. MHE-91AB3-PJ)

• CO2incubator (Panasonic, model no. MCO-5ACUV-PJ)

• Optical spectrum analyzer (Yokogawa, model no. AQ6370)

• Computer with 32 GB or more RAM

• CellProfiler v2.2.0 (Carpenter Lab, Broad Institute, http://forum.cellprofiler.org/t/cellprofiler-beta-2-2-0-has-been-released/3194)

• MATLAB v2015b or higher (MathWorks, https://www.mathworks.com/campaigns/products/trials.html?prodcode=ML)

• Glue (Cemedine, cat. no. AX-043)

• MATLAB script for image construction (Supplementary Data 1)

• AutoCAD design files for hydrodynamic and inertial-focusing microfluidic devices (Supplementary Data 2)

• MATLAB script for image segmentation (Supplementary Data 3)

### Equipment setup

#### Broadband pulse laser (Spectra Physics)

Set up the laser according to the user manual. Turn the pump laser on, set the output power to 5 W, and warm it up for ~1 h. Mode-lock the laser and tune the center wavelength to 790 nm, the bandwidth to 40 nm, and the output power to 650–700 mW. Monitor the laser spectrum on an optical spectrum analyzer and optimize it by tuning the optics of the laser cavity.

#### Oscilloscope (Tektronix)

Connect the photodetector to an input port of the oscilloscope with an electric cable and turn on the oscilloscope. Set the sampling rate (resolution) and bandwidth of the oscilloscope to 50 gigasamples (GS)/s and 16 GHz, respectively. Set the sampling mode to ‘sample’ and the acquisition mode to ‘run’. Move the trigger point to the center of the oscilloscope screen and turn the horizontal resolution knob to make three to five complete periods of the pulses appear on the screen. Move the ground level and turn the vertical resolution knob to make the waveforms occupy the full range, but not exceed the range of the screen. Estimate the time duration of a target cell flowing through the imaging area and turn the horizontal resolution knob to include a few events. Choose ‘width’ in the ‘advanced trigger’ menu and set the width range to 100 ps–1 ns. Turn the trigger level to a certain position to measure the changes of the waveforms in the trigger position on the screen. Press the ‘single’ button to capture the waveform of the cell and save the data for subsequent digital image processing. Although a high sampling rate (such as 50 GS/s) is not necessarily required to obtain images with high resolution, a higher sampling rate can, in practice, alleviate the requirement for the amount of temporal dispersion, leading to a higher signal-to-noise ratio and a higher upper limit on the repetition rate of the pulse laser.

#### Optical spectrum analyzer (Yokogawa)

Direct the laser beam to the input port of the optical spectrum analyzer with a fiber patch cable and turn on the analyzer. Set the center wavelength of the analyzer to that of the pulse laser. Set the spectral span of the analyzer to be a few times wider than the bandwidth of the pulse laser. Press the ‘SETUP’ button, choose ‘RESOLUTION’, and set the value to 0.5 nm. Press the ‘SWEEP’ button and choose ‘REPEAT’. Press the ‘LEVEL’ button, choose ‘LOG SCALE’, and set it to 10 dB/div. Choose ‘REF LEVEL’ and then tune the knob to optimize the spectrum on the monitor.

## Procedure

### System design and preparation of the components of the optical time-stretch microscope

Timing 2–3 d

1. 1

Choose an appropriate wavelength for the microscope.

#### Critical Step

In principle, a broadband pulse laser in any spectral range can be used for the optical time-stretch microscope. However, the wavelength of the laser fundamentally determines the spatial resolution of the microscope because of the diffraction limit, as well as the characteristics of the available optical components. Usually, there are three potential center wavelengths: 800 nm, 1 µm, and 1.55 µm.

2. 2

Design a specific configuration and layout for the optical time-stretch microscope based on the space available in the lab. Consider the typical schematic of the microscope shown in Fig. 2a.

#### Critical Step

The configuration and layout can be sketched on a piece of paper, but it is highly recommended to use a 3D design software such as SolidWorks (http://www.solidworks.com/sw/support/downloads.htm) to design the configuration with precise models of all the components (Thorlabs provides free models for many optical components: https://www.thorlabs.com/). Pay attention to the size of the components, especially the mounts, which are usually the bulkiest parts. Reserve enough space to install and tune the components. Make sure that the operating wavelength ranges of the components match the wavelength of the laser.

3. 3

Determine the specifications of all the necessary components, such as the broadband pulse laser, diffraction gratings, dispersive fiber, objective lenses, relay lenses, photodetector, and electrical cables.

4. 4

Purchase and prepare all the components. Regarding the optical source, use a commercially available laser or build a laser from scratch.

### Installation of the broadband pulse laser for the optical time-stretch microscope

Timing 1–3 d

1. 5

Install the broadband pulse laser on an optics table with a temperature controller, if needed.

2. 6

Mode-lock the laser and check its optical properties, such as power, spectrum, pulse width, and beam size. It is recommended that the spectrum of the laser be wider than 10 nm when it is mode-locked.

#### Caution

The output power of the laser is high enough to damage the eyes. Do not look into the laser and wear laser safety glasses to protect your eyes whenever the laser is on.

#### Critical Step

Check both the spectrum and temporal waveform of the output beam simultaneously to make sure that the laser is mode-locked.

troubleshooting

### Installation of the temporal disperser of the optical time-stretch microscope

Timing 1–2 d

1. 7

Check and adjust the power of the laser beam before coupling it into the dispersive fiber. If a high-power commercial pulse laser such as a Ti:Sapphire laser is used, it is recommended to install and use a glass rod before the dispersive fiber to broaden the temporal width of the laser pulses and decrease the peak power so that unwanted non-linear effects in the dispersive fiber can be avoided. If a homemade laser is used, the power of the laser may be insufficient and require amplification with an optical amplifier.

2. 8

Check the beam size of the laser beam after the laser and the beam size after a collimator that consists of one or more spherical or cylindrical lenses. Use a 4-f system to collimate and adjust the size of the laser beam, if necessary.

3. 9

Couple the laser beam into the dispersive fiber to temporally stretch its pulses.

#### Critical Step

The coupling efficiency should be higher than 50%.

troubleshooting

4. 10

Check whether the temporal waveform of the laser pulses on the oscilloscope is the same as its spectrum on the optical spectrum analyzer.

#### Critical Step

The amount of the temporal dispersion should be properly assigned to avoid overlap between adjacent pulses after time stretch.

troubleshooting

### Installation of the free-space optics of the optical time-stretch microscope

Timing 1–3 h

1. 11

Couple the laser beam out of the dispersive fiber to free space.

2. 12

Use a fiber-based or free-space polarization controller to control the polarization of the laser beam.

3. 13

Mount and align the first diffraction grating and direct the laser beam to the surface of the grating.

4. 14

Find the first-order diffracted laser beam with a laser-viewing card.

#### Critical Step

Be sure to check the first-order diffracted beam. It is the closest one to the reflected beam.

troubleshooting

5. 15

Rotate the first diffraction grating to maximize the power of the first-order diffracted laser beam and make it propagate horizontally along one row of the holes in the optics table.

6. 16

Put the other components of the microscope along the laser beam, including a 4-f system, a pair of objective lenses, another 4-f system, and the second diffraction grating. The distance between neighboring lenses should be the sum of their focal lengths. The distances between the diffraction gratings and the closest lenses should be the focal lengths of the lenses. Make sure the laser beam propagates through the center of all the optical components.

#### Critical Step

The distances between the components are very important and can influence the quality of the images acquired. The positions of the objective lenses are particularly critical. Mount the objective lenses on 3D translation stages for fine adjustment and use a ruler to determine the positions of all the remaining lenses.

7. 17

Install additional components for system optimization. Set a 45°-tilted flip mirror within the first 4-f system to introduce extra light such as a torch. Also, install a post holder right at the image plane between the lenses of the second 4-f system for the CCD camera.

8. 18

Install the holder of the sample or microfluidic device between the two objective lenses.

#### Critical Step

The holder should be placed on a 3D translation stage for fine adjustment.

9. 19

Recombine the spatially dispersed rainbow into a single beam with the second diffraction grating.

troubleshooting

### Installation of the photodetector of the optical time-stretch microscope

Timing 1–3 h

1. 20

Couple the laser beam into a patch cable after the second diffraction grating.

2. 21

Connect the patch cable to the photodetector.

3. 22

Amplify the optical signal if its power is too low.

#### Critical Step

The coupling efficiency should be higher than 50%.

4. 23

Connect the photodetector to the oscilloscope to see the temporal waveform of the laser pulses on the oscilloscope monitor.

troubleshooting

### Alignment of the optical time-stretch microscope

Timing 1–3 h

1. 24

Mount a 1951 US Air Force (USAF) resolution chart (https://en.wikipedia.org/wiki/1951_USAF_resolution_test_chart) as a test target between the objective lens pair.

2. 25

Turn off or block the laser and flip up the flip mirror between the lenses of the first 4-f system to introduce extra white light such as a torch.

3. 26

Install the CCD camera in the post holder between the lenses of the second 4-f system.

4. 27

Align the extra light to direct the light incident onto the CCD camera.

5. 28

Adjust the position of the target along the optical axis to obtain a clear image of the USAF 1951 chart (or a part of it) on the camera.

troubleshooting

6. 29

Flip down the flip mirror, remove the CCD camera, and turn the laser on to measure the temporal waveform on the oscilloscope monitor. Recouple the laser beam to the photodetector via the patch cable according to Steps 20–22, if necessary.

7. 30

Adjust the position of the USAF 1951 chart in the plane perpendicular to the optical axis to acquire the temporal waveform containing information of the line pairs of the chart on the oscilloscope monitor.

troubleshooting

8. 31

Adjust the polarization controller before the first diffraction grating, the position of the USAF 1951 chart, and the coupling before the photodetector to optimize the profile of the temporal waveform.

### Image construction and evaluation

Timing 1–3 h

Critical

Examples of MATLAB scripts for image construction are provided in Supplementary Data 1.

1. 32

Scan the USAF 1951 chart manually or with an autostage perpendicular to the optical axis step by step and record the temporal waveform at each step.

2. 33

After collecting all the data, create a 2D matrix and input the temporal waveforms of successive optical pulses into the successive rows of the matrix by using software such as MATLAB3.

3. 34

Plot the matrix as a figure to see an image of the USAF 1951 chart.

troubleshooting

4. 35

Remove artifacts caused by the profile of the spectra of the laser pulses. Use the profile of the spectra of the laser pulses in which there is no pattern in the background and subtract the background from the whole image.

troubleshooting

5. 36

Smooth or enhance the image with additional digital image processing, if necessary.

### Mask design and preparation for microfluidic device fabrication

Timing 1–3 d

1. 37

Draw a microfluidic device design in AutoCAD or another computer-aided design software. AutoCAD designs are presented in Supplementary Fig. 1. The AutoCAD design files are available in Supplementary Data 2.

#### Critical Step

Design the dimensions of the microchannel, especially the width and height of the microchannel, according to the size of the cells to guarantee good focusing performance5,6,15.

2. 38

Submit the design to a vendor for mask printing. Choose a film mask or a glass mask. If the narrowest channel width is <20 µm, transparency film masks (such as 175-µm-thick film (Fujifilm, cat. no. FFR-175S)) can be used, which have lower costs than glass masks.

### Master fabrication

Timing 1–2 h

Critical

See Supplementary Video 1 for an overview of the procedures for master fabrication.

Critical

Steps 39–48 should be performed in a clean-room environment. The grade of the clean-room facility should be higher than class 1000.

1. 39

Use negative photoresist (KMPR 1035) and standard photolithography methods (Fig. 5) to prepare a silicon wafer to serve as the master mold. The processing guidelines are available online (http://www.microchem.com/Prod-KMPR.htm).

2. 40

Spin-coat the negative photoresist onto the silicon wafer. Ramp up the rotation speed to 500 r.p.m. at a rate of 250 r.p.m./s and keep it spinning for 3 s. Then ramp up the rotation speed to 2,000 r.p.m. at a rate of 300 r.p.m./s and hold it at that speed for 30 s. The resultant thickness is ~45 µm.

#### Critical Step

Make sure there are no bubbles in the KMPR photoresist layer before or after spinning, so that the quality of the KMPR structures will be high.

3. 41

Soft-bake the spin-coated silicon wafer by placing it on a 100 °C hot plate for 15 min and then cool it to room temperature (18–25 °C).

#### Critical Step

Be sure to level the hot plate so that the photoresist layer will be uniform and cured evenly.

4. 42

Expose the wafer to UV light according to the specifications in the MicroChem KMPR 1000 data sheet available online (http://www.microchem.com/Prod-KMPR.htm) and the power of the UV light source. Expose the photoresist-coated wafer to UV light for 60 s.

5. 43

Bake the silicon wafer on a 100 °C hot plate for 3 min and then cool it to room temperature for 30 s.

6. 44

(Optional) Repeat Steps 40–43 to develop a two-layer KMPR master (Fig. 5b). Check the design of the inertial focusing channel in Supplementary Data 2 for details.

#### Critical Step

Be sure to include an alignment mark on the masks that interlock, so that the structures on the two different layers can be aligned well.

7. 45

Develop the photoresist by submerging the wafer in SU-8 developer with agitation for 3 min.

#### Caution

Perform Steps 45 and 46 in a fume hood with appropriate personal protective equipment, as the chemicals are highly flammable and toxic.

8. 46

Rinse the wafer for 10 s each with fresh developer solution, isopropanol, and then Milli-Q ultrapurified water.

9. 47

Dry the wafer with nitrogen.

10. 48

Check the structures under a microscope.

troubleshooting

#### Pause Point

The developed wafer can be stored at room temperature in a dust-free environment for no more than 1 year until further use.

### PDMS mold preparation

Timing 3–6 h

1. 49

Place the silicon wafer into a Petri dish.

2. 50

Mix the PDMS base with the PDMS curing agent homogeneously at a weight ratio of 10:1. Mixing can be performed manually, but it is better to use a centrifugal mixer.

#### Critical Step

Ensure that the weight ratio is accurate and mixing is complete, so that the mechanical properties of the cured PDMS will not be affected.

3. 51

Pour 3 g of the PDMS mixture into the Petri dish, with the silicon wafer secured in the center.

#### Critical Step

Carefully control the thickness of the PDMS mold, which should be <2 mm thick in order to acquire high-quality images.

4. 52

Degas the PDMS in a vacuum chamber for a minimum of 30 min.

troubleshooting

5. 53

Bake the dish at 60 °C in an oven for at least 2 h to cure the PDMS.

#### Pause Point

The cured PDMS can be stored at room temperature for no more than 1 month until further use.

### Microchannel assembly

Timing 2–3 h

1. 54

Cut and peel off the center of the cured polymer, so that the devices are exposed but the edges of the wafer are still secured by the thick PDMS layer.

troubleshooting

2. 55

Clean the flat side of the PDMS slab using a clean-room adhesive tape.

3. 56

Using a puncher, punch 760-µm holes for inlets and outlets.

#### Critical Step

The size and quality of the punch tips are essential when connecting with tubing. If care is not taken in selecting the size of the punch tips and punching the holes, leakage will occur when introducing the sample fluid into the microchannel.

troubleshooting

4. 57

Plasma-treat the PDMS slab and the ultraclean glass slides. The parameters of plasma treatment for the plasma cleaner referred to in the Equipment section are the following: plasma burst = 90 s, power = high, air pressure = 500 mTorr.

#### Critical Step

This step is important, as it determines the strength of the bonding of the PDMS slab to the glass. If the bonding is not strong, delamination will occur when flowing the sample through the microchannel.

troubleshooting

5. 58

Bond the PDMS to the glass slide. Gently apply pressure to the features to make sure that every part is well bonded.

6. 59

Place the PDMS-glass device on a hot plate for 30 min, with the PDMS facing up.

7. 60

Inspect the device under the microscope for delamination and check the channels for blockage.

#### Pause Point

The developed microfluidic devices can be stored at room temperature in a dust-free environment for no more than 1 month until further use.

### Microfluidic device priming

Timing 30 min

1. 61

Connect tubing to the inlet and outlet of the microfluidic device and fix it with glue.

2. 62

Cure the glue by baking it in an 80 °C oven for ~12 h. Photographs of fabricated microfluidic devices are shown in Supplementary Fig. 2.

#### Critical Step

The tubing must be carefully inserted into the holes.

3. 63

Prime the microfluidic device using a PBS wash solution as a sheath buffer before running the sample. Control the flow rate using syringe pumps.

4. 64

Inspect the microfluidic device under an inverted microscope equipped with a high-speed camera.

#### Critical Step

Check for any bubbles and debris. If bubbles are seen, try to push them out by gently pressing on the PDMS and increasing the pressure. Increasing the flow rate of the sheath buffer may help remove any bubbles and debris. If bubbles cannot be removed, use a new microfluidic device instead.

### Installation of the microfluidic device into the optical time-stretch microscope

Timing 0.5–1 h

Critical

See Supplementary Video 2 for an overview of the procedures for installation of the microfluidic device.

1. 65

Load the microfluidic device between the objective lenses of the optical time-stretch microscope.

2. 66

Fill the microfluidic channel with liquid for precise alignment of the microscope.

#### Critical Step

Make sure that the microfluidic channel is full of liquid or the alignment will not work when flowing the sample.

3. 67

Install the CCD camera between the objective lenses of the second 4-f system and tune the position of the first objective lens along the optical axis to optimize the alignment.

4. 68

Mark the position of a laser spot on the CCD camera and follow Steps 25–28 to obtain an image of the microfluidic channel.

5. 69

Adjust the position of the microfluidic device in the plane perpendicular to the optical axis, so that the laser spot will illuminate the microchannel.

6. 70

Re-do Steps 29 and 31 to measure and optimize the temporal waveform on the oscilloscope.

### Calibration for image acquisition

Timing 0.5–1 h

Critical

See Supplementary Video 2 for an overview of the calibration procedures.

1. 71

Launch a calibration sample (which may consist of known beads or cells of size and density similar to those of the sample) and sheath liquid (if a hydrodynamic-focusing device is used) on the syringe pumps.

2. 72

Set the volume rate for each syringe pump and run the pumps to achieve a flow rate of 1–10 m/s.

3. 73

Run the oscilloscope (Equipment setup) and wait until the beads or the cells in the sample arrive at the microchannel.

4. 74

Use the ‘single acquisition’ mode of the oscilloscope to capture the temporal waveform when the beads or the cells pass through the microchannel. Save the data for each event.

troubleshooting

5. 75

Construct images of the beads or cells according to Steps 33–36.

6. 76

Slightly adjust the position of the microfluidic device along the optical axis and check the quality of the acquired images to optimize the position of the microchannel.

troubleshooting

7. 77

Once the alignment is optimized, flush the microchannel with PBS or water.

### Sample preparation

Timing 1 d

1. 78

(Optional) To analyze cells from solid tissues such as liver and tumors, disaggregate them mechanically or enzymatically to produce single cells. Further details of the sample preparation depend on the type of the sample and are described in the Supplementary Methods.

2. 79

Suspend cells in an appropriate solution at a concentration of 105–107 cells per mL to prevent the microchannels in the microfluidic device from clogging.

3. 80

Prepare appropriate sheath liquid for the sample. It can be PBS or water, depending on the sample.

4. 81

Put the sample into a syringe.

### Image acquisition

Timing 2–4 h

Critical

See Supplementary Video 2 for an overview of the image acquisition procedures.

1. 82

Load the syringe on the syringe pump.

2. 83

Set the volume rate and run the syringe pump to start a high-throughput imaging flow cytometry experiment.

3. 84

Acquire images of events during the experiment. The events may be single cells, aggregated cells, or debris.

4. 85

(Optional) Use the ‘Fast frame’ function provided by the oscilloscope to acquire the data for multiple events each time.

5. 86

(Optional) Use an FPGA and advanced algorithms to keep recording and analyzing consecutive events in real time without losing any information between multiple saving and data transfer processes.

### Image segmentation

Timing 1–2 h

Critical

Multiple types of software can be used to implement image segmentation. Here, we provide a typical script in MATLAB format. See Supplementary Data 3 for details.

1. 87

Perform edge detection using the Canny method105 to detect the outline of each cell.

troubleshooting

2. 88

Perform morphological dilation followed by erosion to connect the segments of the outline of the cell as a closed loop.

3. 89

Remove noise by morphological closing.

4. 90

Fill the closed loop to make a mark that overlaps the whole cell.

5. 91

Perform morphological erosion or closing to remove branches on the mark and smooth the periphery of the mark.

6. 92

Set a threshold by area to remove small marks, which represent incorrectly segmented areas.

7. 93

Calculate the aspect ratio of the mark as another criterion to determine whether the segmentation has been correctly performed.

8. 94

If the mark passes all the above criteria, set the intensity of the background to 0.

9. 95

Save the segmented images in TIFF format.

troubleshooting

### Feature extraction

Timing 1–2 h

1. 96

2. 97

Run CellProfiler and load the segmented image files.

3. 98

Extract the features of the images. Consider different kinds of features, including geometry features, granularity features, intensity features, and texture features (see ref. 89 for more details).

4. 99

Save all the extracted features in a file.

### Feature selection

Timing 1–2 d

1. 100

Use equation (1) to calculate the MMD score for each feature of the dataset (Experimental design).

2. 101

Rank the features based on their MMD scores.

3. 102

Choose a reasonable number of features with large MMD scores to achieve good classification accuracy.

4. 103

After the feature selection, save the selected features in a file.

### Machine learning–based cell classification

Timing 1–2 d

1. 104

Divide the dataset into two groups. One is used as training data, whereas the other is used as test data.

2. 105

Train the classifier, which can be SVM-based or CNN-based, with the training data.

3. 106

Evaluate the classification accuracy with the test data.

troubleshooting

## Troubleshooting

Troubleshooting advice can be found in Table 3.

## Timing

Assuming that all components are readily available, a research team of three to four members with an intermediate level of experience with optics, electronics, microfluidics, digital signal processing, and sample preparation can complete this protocol in a time frame of 1 month. The throughput value discussed above means the ‘instantaneous’ throughput, which is calculated from the concentration of the sample and the flow speed regardless of the image acquisition mode, but because of the limited memory of the oscilloscope, there are a series of dead periods in which data recording has been stopped, which provide a practical limit on the throughput. Hence, the ‘average’ throughput for a long period of time (>1 s) may be <1,000 cells per s. This discrepancy between the ‘instantaneous’ and ‘average’ throughputs can be resolved by use of an FPGA with an ADC that performs data acquisition, image construction, image segmentation, and feature extraction continuously in real time. The 1–2 h needed for image segmentation and feature extraction include the time needed to build up a model. In practice, once the model is established, these steps can be implemented in real time.

• Steps 1–4, system design and preparation of components for the optical time-stretch microscope: 2–3 d

• Steps 5 and 6, installation of the broadband pulse laser for the optical time-stretch microscope: 1–3 d

• Steps 7–10, installation of the temporal disperser of the optical time-stretch microscope: 1–2 d

• Steps 11–19, installation of the free-space optics of the optical time-stretch microscope: 1–3 h

• Steps 20–23, installation of the photodetector of the optical time-stretch microscope: 1–3 h

• Steps 24–31, alignment of the optical time-stretch microscope: 1–3 h

• Steps 32–36, image construction and evaluation: 1–3 h

• Steps 37 and 38, mask design and preparation for microfluidic device fabrication: 1–3 d

• Steps 39–48, master fabrication: 1–2 h

• Steps 49–53, PDMS mold preparation: 3–6 h

• Steps 54–60, microchannel assembly: 2–3 h

• Steps 61–64, microfluidic device priming: 30 min

• Steps 65–70, installation of the microfluidic device into the optical time-stretch microscope: 0.5–1 h

• Steps 71–77, calibration for image acquisition: 0.5–1 h

• Steps 78–81, sample preparation: 1 d

• Steps 82–86, image acquisition: 2–4 h

• Steps 87–95, image segmentation: 1–2 h

• Steps 96–99, feature extraction: 1–2 h

• Steps 100–103, feature selection: 1–2 d

• Steps 104–106, machine-learning–based cell classification: 1–2 d

## Anticipated results

Optofluidic time-stretch microscopy enables imaging flow cytometry with a high throughput (>10,000 cells per s), allowing for large-scale multiparametric analysis of single cells. Typical acquired cell images are shown in Fig. 3c. In addition to providing cell images, it can simultaneously acquire fluorescence signals (but not fluorescence images) from labeled molecules by the addition of excitation lasers and detectors to optofluidic time-stretch microscopy, empowering morphological analysis with molecular or phenotypic specificity14. In the past decade, a number of unique applications of optofluidic time-stretch microscopy have been proposed and demonstrated, including the accurate classification of microalgal cells, the label-free detection of aggregated platelets, and the label-free classification of the drug response of leukemia cells, to name a few.

Here, we describe three sets of typical results (i.e., images, large-scale single-cell analysis) that can be obtained by optofluidic time-stretch microscopy. First, Fig. 9a shows images and corresponding fluorescence signals of E. gracilis cells cultured in nitrogen-sufficient and nitrogen-deficient conditions (Supplementary Fig. 3). As shown in the figure and the image libraries in Fig. 9b, nitrogen-sufficient cells appear mostly transparent, whereas nitrogen-deficient cells appear mostly opaque because of the high concentration of strong intracellular scatterers. The use of linear discriminant analysis of an image feature (specifically opacity in this case) and the fluorescence signal allowed the differently cultured E. gracilis cells to be classified with an accuracy of 99% (Fig. 9c). This value is higher than the accuracy of 96% achieved by either image feature or fluorescence analysis, proving the effectiveness of the multiparametric analysis19.

A second example in Fig. 10a shows images of single platelets (upper panels), aggregated platelets (middle panels), and white blood cells (lower panels), and their corresponding fluorescence signals, which indicate their cell types (Supplementary Fig. 4). The figure indicates good agreement between the images and the fluorescence signals. For morphology-based classification, the linear classification method based on the standard logistic regression model was used. The classifier was trained by optimization of three coefficient series that map the morphological features of a cell so that each cell (as shown in the image libraries in Fig. 10b) will probably be in one of the three classes, as shown in the 3D scatter plot in Fig. 10c. The accuracy of the classification based only on the extracted morphological information was >95%, indicating the ability to distinguish aggregated platelets in a label-free manner5.

Finally, Fig. 11a shows the image libraries of drug-treated and untreated breast cancer cells (MCF-7), clearly showing the fine structures in the cells with sufficient contrast (Supplementary Fig. 5). An SVM was used to classify the negative control and each drug-treated population. Figure 11b shows the histograms of the two populations in classification scores. The separation between the two populations becomes larger as the drug concentration increases up to 1 µM. This dose-dependent change was further supported by four trials of SVM classification as shown in Fig. 11c, indicating the possibility of label-free classification of drug-treated and untreated cells6. In these experiments, to guarantee reliable results, out-of-focus or blurry images should be excluded at the image processing stage. The focusing efficiency mainly depends on the size and shape of the cells and the dimensions of the microfluidic channel. Ideally, if the cells are homogeneous in size and shape, and if the Re of the flow is between 1 and 100 (or it has a flow speed ~0.375 m/s), the inertial-focusing channel can offer a high focusing efficiency (up to 99.77%)80,81. When a higher flow speed is required or the cells are highly heterogeneous in size and shape, the hydrodynamic-focusing channel is preferred, providing a lower focusing efficiency than that of the inertial-focusing channel, but one that is still good enough for image acquisition. The focusing efficiency also depends on the manufacturing quality or precision of the microfluidic device. If the focusing efficiency of one channel is not good, it is recommended to use another one. In our experiments, we tested the channels before the experiments and employed those with high focusing efficiency. The proportion of out-of-focus or blurry images to all the images should be <5%.

### Data and code availability

The data and code are available upon request. Further information on experimental design is available in the Nature Research Reporting Summary linked to this article.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

1. Goda, K., Tsia, K. K. & Jalali, B. Serial time-encoded amplified imaging for real-time observation of fast dynamic phenomena. Nature 458, 1145–1149 (2009). https://doi.org/10.1038/nature07980

2. Goda, K. et al. High-throughput single-microparticle imaging flow analyzer. Proc. Natl. Acad. Sci. USA 109, 11630–11635 (2012). https://doi.org/10.1073/pnas.1204718109

3. Lei, C., Guo, B., Cheng, Z. & Goda, K. Optical time-stretch imaging: principles and applications. Appl. Phys. Rev. 3, 011102 (2016). https://doi.org/10.1063/1.4941050

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Goda, K., Tsia, K. K. & Jalali, B. Serial time-encoded amplified imaging for real-time observation of fast dynamic phenomena. Nature 458, 1145–1149 (2009).

2. 2.

Goda, K. et al. High-throughput single-microparticle imaging flow analyzer. Proc. Natl. Acad. Sci. USA 109, 11630–11635 (2012).

3. 3.

Lei, C., Guo, B., Cheng, Z. & Goda, K. Optical time-stretch imaging: principles and applications. Appl. Phys. Rev. 3, 011102 (2016).

4. 4.

Lau, A. K., Shum, H. C., Wong, K. K. & Tsia, K. K. Optofluidic time-stretch imaging—an emerging tool for high-throughput imaging flow cytometry. Lab Chip 16, 1743–1756 (2016).

5. 5.

Jiang, Y. et al. Label-free detection of aggregated platelets in blood by machine-learning-aided optofluidic time-stretch microscopy. Lab Chip 17, 2337–2530 (2017).

6. 6.

Kobayashi, H. et al. Label-free detection of cellular drug responses by high-throughput bright-field imaging and machine learning. Sci. Rep. 7, 12454 (2017).

7. 7.

Basiji, D. A., Ortyn, W. E., Liang, L., Venkatachalam, V. & Morrissey, P. Cellular image analysis and imaging by flow cytometry. Clin. Lab Med. 27, 653 (2007).

8. 8.

Basiji, D. & O’Gorman, M. R. G. Imaging flow cytometry. J. Immunol. Methods 423, 1–2 (2015).

9. 9.

Han, Y., Gu, Y., Zhang, A. C. & Lo, Y. H. Review: imaging technologies for flow cytometry. Lab Chip 16, 4639–4647 (2016).

10. 10.

Shapiro, H. M. Practical Flow Cytometry 4th edn (John Wiley & Sons, Hoboken, NJ, USA, 2003).

11. 11.

Porichis, F. et al. High-throughput detection of miRNAs and gene-specific mRNA at the single-cell level by flow cytometry. Nat. Commun. 5, 5641 (2014).

12. 12.

Wu, J. L. et al. Ultrafast laser-scanning time-stretch imaging at visible wavelengths. Light Sci. Appl. 6, e16196 (2016).

13. 13.

Mahjoubfar, A. et al. Time stretch and its applications. Nat. Photonics 11, 341–351 (2017).

14. 14.

Ugawa, M. et al. High-throughput optofluidic particle profiling with morphological and chemical specificity. Opt. Lett. 40, 4803–4806 (2015).

15. 15.

Lei, C. et al. High-throughput label-free image cytometry and image-based classification of live Euglena gracilis. Biomed. Opt. Express 7, 2703–2708 (2016).

16. 16.

Chen, C. L. et al. Deep learning in label-free cell classification. Sci. Rep. 6, 21471 (2016).

17. 17.

Chan, A. C. et al. All-passive pixel super-resolution of time-stretch imaging. Sci. Rep. 7, 44608 (2017).

18. 18.

Lai, Q. T. K. et al. High-throughput time-stretch imaging flow cytometry for multi-class classification of phytoplankton. Opt. Express 24, 28170–28184 (2016).

19. 19.

Guo, B. et al. High-throughput accurate single-cell screening of Euglena gracilis with fluorescence-assisted optofluidic time-stretch microscopy. PLoS ONE 11, e0166214 (2016).

20. 20.

Mahjoubfar, A., Chen, C., Niazi, K. R., Rabizadeh, S. & Jalali, B. Label-free high-throughput cell screening in flow. Biomed. Opt. Express 4, 1618–1625 (2013).

21. 21.

Lau, A. K. S. et al. Interferometric time-stretch microscopy for ultrafast quantitative cellular and tissue imaging at 1 μm. J. Biomed. Opt. 19, 076001 (2014).

22. 22.

Wong, T. T. et al. Asymmetric-detection time-stretch optical microscopy (ATOM) for ultrafast high-contrast cellular imaging in flow. Sci. Rep. 4, 3656 (2014).

23. 23.

Tang, A. H. et al. Microfluidic imaging flow cytometry by asymmetric-detection time-stretch optical microscopy (ATOM). J. Vis. Exp. 124, e55840 (2017).

24. 24.

Tang, A. H. et al. Time-stretch microscopy on a DVD for high-throughput imaging cell-based assay. Biomed. Opt. Express 8, 640–652 (2017).

25. 25.

Wu, J. et al. Multi-MHz laser-scanning single-cell fluorescence microscopy by spatiotemporally encoded virtual source array. Biomed. Opt. Express 8, 4160–4171 (2017).

26. 26.

Goda, K. et al. High-throughput optical coherence tomography at 800 nm. Opt. Express 20, 19612–19617 (2012).

27. 27.

Li, M. et al. Inertial focusing of ellipsoidal Euglena gracilis cells in a stepped microchannel. Lab Chip 16, 4458–4465 (2016).

28. 28.

Guo, B. et al. High-throughput, label-free, single-cell, microalgal lipid screening by machine-learning-equipped optofluidic time-stretch quantitative phase microscopy. Cytom. Part A 91, 494–502 (2017).

29. 29.

Guo, B. et al. Optofluidic time-stretch quantitative phase microscopy. Methods 136, 116–125 (2017).

30. 30.

Lei, C. et al. GHz optical time-stretch microscopy by compressive sensing. Photonics J. 9, 3900308 (2017).

31. 31.

Yan, W., Wu, J., Wong, K. K. & Tsia, K. K. A high-throughput all-optical laser-scanning imaging flow cytometer with biomolecular specificity and subcellular resolution. J. Biophotonics 11, e201700178 (2017).

32. 32.

Guo, Q. et al. High-speed compressive microscopy of flowing cells using sinusoidal illumination patterns. Photonics J. 9, 1–11 (2017).

33. 33.

Goda, K. & Jalali, B. Dispersive Fourier transformation for fast continuous single-shot measurements. Nat. Photonics 7, 102–112 (2013).

34. 34.

Goda, K. et al. Hybrid dispersion laser scanner. Sci. Rep. 2, 445 (2012).

35. 35.

Lei, C. et al. Time-stretch high-speed microscopic imaging system based on temporally and spectrally shaped amplified spontaneous emission. Opt. Lett. 40, 946–949 (2015).

36. 36.

Chen, H. et al. Multiwavelength time-stretch imaging system. Opt. Lett. 39, 2202–2205 (2014).

37. 37.

Xing, F. et al. Serial wavelength division 1 GHz line-scan microscopic imaging. Photonics Res. 2, B31–B34 (2014).

38. 38.

Xing, F., Chen, H., Xie, S. & Yao, J. Ultrafast three-dimensional surface imaging based on short-time Fourier transform. IEEE Photonics Technol. Lett. 27, 2264–2267 (2015).

39. 39.

Guo, Q. et al. Fast time-lens-based line-scan single-pixel camera with multi-wavelength source. Biomed. Opt. Express 6, 3610–3617 (2015).

40. 40.

Xing, F., Chen, H., Xie, S. & Yao, J. Ultrafast surface imaging with an increased spatial resolution based on polarization-division multiplexing. J. Lightwave Technol. 33, 396–402 (2015).

41. 41.

Guo, Q. et al. Compressive sensing based high-speed time-stretch optical microscopy for two-dimensional image acquisition. Opt. Express 23, 29639–29646 (2015).

42. 42.

Chen, H. et al. Ultrafast web inspection with hybrid dispersion laser scanner. Appl. Opt. 52, 4072–4076 (2013).

43. 43.

Xing, F., Chen, H., Chen, M., Yang, S. & Xie, S. Simple approach for fast real-time line scan microscopic imaging. Appl. Opt. 52, 7049–7053 (2013).

44. 44.

Wang, G., Wang, C., Yan, Z. & Zhang, L. Highly efficient spectrally encoded imaging using a 45° tilted fiber grating. Opt. Lett. 41, 2398–2401 (2016).

45. 45.

Xu, Y., Ren, Z., Wong, K. K. Y. & Tsia, K. Overcoming the limitation of phase retrieval using Gerchberg-Saxton-like algorithm in optical fiber time-stretch systems. Opt. Lett. 40, 3595–3598 (2015).

46. 46.

Xu, J. et al. High-performance multi-megahertz optical coherence tomography based on amplified optical time-stretch. Biomed. Opt. Express 6, 1340–1350 (2015).

47. 47.

Zhang, C., Xu, Y., Wei, X., Tsia, K. K. & Wong, K. K. Y. Time-stretch microscopy based on time-wavelength sequence reconstruction from wideband incoherent source. Appl. Phys. Lett. 105, 041113 (2014).

48. 48.

Wei, X. et al. Breathing laser as an inertia-free swept source for high-quality ultrafast optical bioimaging. Opt. Lett. 39, 6593–6596 (2014).

49. 49.

Wei, X. et al. Broadband fiber-optical parametric amplification for ultrafast time-stretch imaging at 1.0 μm. Opt. Lett. 39, 5989–5992 (2014).

50. 50.

Wei, X. et al. Coherent laser source for high frame-rate optical time-stretch microscopy at 1.0 μm. IEEE J. Sel. Top. Quantum 20, 1100306 (2014).

51. 51.

Wong, T. T. W., Lau, A. K. S., Wong, K. K. Y. & Tsia, K. K. Optical time-stretch confocal microscopy at 1 μm. Opt. Lett. 37, 3330–3332 (2012).

52. 52.

Qiu, Y., Xu, J., Wong, K. K. Y. & Tsia, K. K. Exploiting few mode-fibers for optical time-stretch confocal microscopy in the short near-infrared window. Opt. Express 20, 24115–24123 (2012).

53. 53.

Zhang, C., Qiu, Y., Zhu, R., Wong, K. K. Y. & Tsia, K. K. Serial time-encoded amplified microscopy (STEAM) based on a stabilized picosecond supercontinuum source. Opt. Express 19, 15810–15816 (2011).

54. 54.

Tsia, K. K., Goda, K., Capewell, D. & Jalali, B. Performance of serial time-encoded amplified microscope. Opt. Express 18, 10016–10028 (2010).

55. 55.

Goda, K., Solli, D. R., Tsia, K. K. & Jalali, B. Theory of amplified dispersive Fourier transformation. Phys. Rev. A 80, 033827 (2009).

56. 56.

Tsia, K. K., Goda, K., Capewell, D. & Jalali, B. Simultaneous mechanical-scan-free confocal microscopy and laser microsurgery. Opt. Lett. 34, 2099–2101 (2009).

57. 57.

Goda, K., Tsia, K. K. & Jalali, B. Amplified dispersive Fourier-transform imaging for ultrafast displacement sensing and barcode reading. Appl. Phys. Lett. 93, 131109 (2008).

58. 58.

Mahjoubfar, A. et al. High-speed nanometer-resolved imaging vibrometer and velocimeter. Appl. Phys. Lett. 98, 101107 (2011).

59. 59.

Fard, A. M. et al. Nomarski serial time-encoded amplified microscopy for high-speed contrast-enhanced imaging of transparent media. Biomed. Opt. Express 2, 3387–3392 (2011).

60. 60.

Kim, S. H., Goda, K., Fard, A. & Jalali, B. Optical time-domain analog pattern correlator for high-speed real-time image recognition. Opt. Lett. 36, 220–222 (2011).

61. 61.

Goda, K. & Jalali, B. Noise figure of amplified dispersive Fourier transformation. Phys. Rev. A 82, 043821 (2010).

62. 62.

Goda, K., Mahjoubfar, A. & Jalali, B. Demonstration of Raman gain at 800 nm in single-mode fiber and its potential application to biological sensing and imaging. Appl. Phys. Lett. 95, 251101 (2009).

63. 63.

Goda, K., Solli, D. R. & Jalali, B. Real-time optical reflectometry enabled by amplified dispersive Fourier transformation. Appl. Phys. Lett. 93, 031106 (2008).

64. 64.

Chen, C. L., Mahjoubfar, A. & Jalali, B. Optical data compression in time stretch imaging. PLoS ONE 10, e0125106 (2015).

65. 65.

Asghari, M. H. & Jalali, B. Warped time lens in temporal imaging for optical real-time data compression. Chinese Sci. Bull. 59, 2649–2654 (2014).

66. 66.

Asghari, M. H. & Jalali, B. Discrete anamorphic transform for image compression. IEEE Signal Proc. Lett. 21, 829–833 (2014).

67. 67.

Bosworth, B. T. et al. High-speed flow microscopy using compressed sensing with ultrafast laser pulses. Opt. Express 23, 10521–10532 (2015).

68. 68.

Dai, B. et al. Data compression for time-stretch imaging based on differential detection and run-length encoding. J. Lightwave Technol. 35, 5098–5104 (2017).

69. 69.

Dai, B. et al. Ultrafast three-dimensional imaging system based on phase-shifting method and hybrid dispersion laser scanning. Photonics J. 7, 6900509 (2015).

70. 70.

Diebold, E. D., Buckley, B. W., Gossett, D. R. & Jalali, B. Digitally synthesized beat frequency multiplexing for sub-millisecond fluorescence microscopy. Nat. Photonics 7, 806–810 (2013).

71. 71.

Mikami, H. et al. Ultrafast confocal fluorescence microscopy beyond the fluorescence lifetime limit. Optica 5, 117–126 (2018).

72. 72.

Han, Y. Y. & Lo, Y. H. Imaging cells in flow cytometer using spatial-temporal transformation. Sci. Rep. 5, 13267 (2015).

73. 73.

Beebe, D. J., Mensing, G. A. & Walker, G. M. Physics and applications of microfluidics in biology. Annu. Rev. Biomed. Eng. 4, 261–286 (2002).

74. 74.

Duncombe, T. A., Tentori, A. M. & Herr, A. E. Microfluidics: reframing biological enquiry. Nat. Rev. Mol. Cell Biol. 16, 554–567 (2015).

75. 75.

Croslandtaylor, P. J. A device for counting small particles suspended in a fluid through a tube. Nature 171, 37–38 (1953).

76. 76.

Lee, G. B., Chang, C. C., Huang, S. B. & Yang, R. J. The hydrodynamic focusing effect inside rectangular microchannels. J. Micromech. Microeng. 16, 1024–1032 (2006).

77. 77.

Golden, J. P., Justin, G. A., Nasir, M. & Ligler, F. S. Hydrodynamic focusing—a versatile tool. Anal. Bioanal. Chem. 402, 325–335 (2012).

78. 78.

Park, H. Y. et al. Achieving uniform mixing in a microfluidic device: hydrodynamic focusing prior to mixing. Anal. Chem. 78, 4465–4473 (2006).

79. 79.

Di Carlo, D. Inertial microfluidics. Lab Chip 9, 3038–3046 (2009).

80. 80.

Di Carlo, D., Irimia, D., Tompkins, R. G. & Toner, M. Continuous inertial focusing, ordering, and separation of particles in microchannels. Proc. Natl. Acad. Sci. USA 104, 18892–18897 (2007).

81. 81.

Amini, H., Lee, W. & Di Carlo, D. Inertial microfluidic physics. Lab Chip 14, 2739–2761 (2014).

82. 82.

Chung, A. J., Gossett, D. R. & Di Carlo, D. Three dimensional, sheathless, and high-throughput microparticle inertial focusing through geometry-induced secondary flows. Small 9, 685–690 (2013).

83. 83.

Li, M., Munoz, H. E., Goda, K. & Di Carlo, D. Shape-based separation of microalga Euglena gracilis using inertial microfluidics. Sci. Rep. 7, 10802 (2017).

84. 84.

Hur, S. C., Henderson-MacLennan, N. K., McCabe, E. R. B. & Di Carlo, D. Deformability-based cell classification and enrichment using inertial microfluidics. Lab Chip 11, 912–920 (2011).

85. 85.

Bengio, Y. Learning deep architectures for AI. Found. Trends Mach. Learn. 2, 1–127 (2009).

86. 86.

Krizhevsky, A., Sutskever, I. & Hinton, G. E. Imagenet classification with deep convolutional neural networks. Commun. ACM 60, 84–90 (2017).

87. 87.

Carpenter, A. E. et al. CellProfiler: image analysis software for identifying and quantifying cell phenotypes. Genome Biol. 7, R100 (2006).

88. 88.

Kamentsky, L. et al. Improved structure, function and compatibility for CellProfiler: modular high-throughput image analysis software. Bioinformatics 27, 1179–1180 (2011).

89. 89.

Bray, M. A. et al. Cell painting, a high-content image-based assay for morphological profiling using multiplexed fluorescent dyes. Nat. Protoc. 11, 1757–1774 (2016).

90. 90.

Simonyan, K. & Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv Preprint at https://arxiv.org/abs/1409.1556 (2014).

91. 91.

He, K. M., Zhang, X. Y., Ren, S. Q. & Sun, J. Deep residual learning for image recognition. in Proc. 29th IEEE Conference on Computer Vision and Pattern Recognition: CVPR 2016 (eds. Agapito, L. et al.) 770–778 (IEEE, New York, 2016).

92. 92.

Yosinski, J., Clune, J., Bengio, Y. & Lipson, H. How transferable are features in deep neural networks? Adv. Neural Inf. Process. Syst. 27, 3320–3328 (2014).

93. 93.

Villani, C. Optimal Transport: Old and New (Springer Science & Business Media, Berlin, Germany, 2009).

94. 94.

Battiti, R. Using mutual information for selecting features in supervised neural net learning. IEEE Trans. Neural Network 5, 537–550 (1994).

95. 95.

Gretton, A., Borgwardt, K. M., Rasch, M., Schölkopf, B. & Smola, A. J. A kernel method for the two-sample-problem. Adv. Neural Inf. Process. Syst. 19, 513–520 (2006).

96. 96.

Schölkopf, B. & Smola, A. J. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond (The MIT Press, Cambridge, MA, USA, 2002).

97. 97.

LeCun, Y., Bengio, Y. & Hinton, G. Deep learning. Nature 521, 436–444 (2015).

98. 98.

Candes, E. J. & Tao, T. Near-optimal signal recovery from random projections: universal encoding strategies? IEEE. Trans. Inform. Theory 52, 5406–5425 (2006).

99. 99.

Litjens, G. et al. A survey on deep learning in medical image analysis. Med. Image Anal. 42, 60–88 (2017).

100. 100.

Xie, J., Xu, L. & Chen, E. Image denoising and inpainting with deep neural networks. Adv. Neural Inf. Process. Syst. 2012, 341–349 (2012).

101. 101.

Chang, J., Li, C. L., Póczos, B., Kumar, B. & Sankaranarayanan, A. C. One network to solve them all—solving linear inverse problems using deep projection models. arXiv Preprint at https://arxiv.org/abs/1703.09912 (2017).

102. 102.

Schuler, C. J., Hirsch, M., Harmeling, S. & Scholkopf, B. Learning to deblur. IEEE. T. Pattern Anal. 38, 1439–1451 (2016).

103. 103.

Rivenson, Y. et al. Deep learning microscopy. Optica 4, 1437–1443 (2017).

104. 104.

Yamada, M., Umezu, Y., Fukumizu, K. & Takeuchi, I. Post selection inference with kernels. arXiv Preprint at https://arxiv.org/abs/1610.03725 (2016).

105. 105.

Canny, J. F. A computational approach to edge detection. in Readings in Computer Vision: Issues, Problems, Principles, and Paradigms (eds. Fischler, M. A. & Firschein, O.) 184–203 (Morgan Kaufmann, San Francisco, 1987).

## Acknowledgements

This work was supported by the ImPACT Program of the Council for Science, Technology and Innovation (Cabinet Office, Government of Japan). The fabrication of the microfluidic devices was conducted at the University of Tokyo’s Center for Nano Lithography.

## Author information

### Affiliations

1. #### Department of Chemistry, The University of Tokyo, Tokyo, Japan

• Cheng Lei
• , Hirofumi Kobayashi
• , Yi Wu
• , Akihiro Isozaki
• , Hideharu Mikami
•  & Keisuke Goda

• Yi Wu
3. #### Department of Electrical Engineering, University of California, Los Angeles, Los Angeles, CA, USA

• Ming Li
•  & Keisuke Goda
4. #### Department of Bioengineering, University of California, Los Angeles, Los Angeles, CA, USA

• Ming Li
•  & Dino Di Carlo
5. #### Department of Clinical Laboratory Medicine, Graduate School of Medicine, The University of Tokyo, Tokyo, Japan

• Atsushi Yasumoto
•  & Yutaka Yatomi
6. #### Japan Science and Technology Agency, Kawaguchi, Japan

• Takuro Ito
• , Nao Nitta
• , Takeaki Sugimura
•  & Keisuke Goda

8. #### California NanoSystems Institute, University of California, Los Angeles, Los Angeles, CA, USA

• Dino Di Carlo
9. #### Jonsson Comprehensive Cancer Centre, University of California, Los Angeles, Los Angeles, CA, USA

• Dino Di Carlo
10. #### Department of Electrical Engineering and Information Systems, The University of Tokyo, Tokyo, Japan

• Yasuyuki Ozeki

### Contributions

C.L. and K.G. designed the protocol. C.L., H.K., and Y.W. performed the experiments. M.L. and A.I. helped fabricate the microfluidic devices. A.Y. and T.I. helped prepare the blood and microalga samples. H.M., N.N., and T.S. helped prepare the figures and tables. M.Y., Y.Y., D.D.C., Y.O., and K.G. supervised the project. All authors contributed to the writing of the manuscript.

### Competing interests

The authors declare no competing interests.

### Corresponding authors

Correspondence to Cheng Lei or Keisuke Goda.

## Integrated supplementary information

1. ### Supplementary Figure 1 Design of microfluidic devices.

Design of (a) hydrodynamic focusing and (b) inertial focusing microfluidic devices. Scale bar = 100 µm.

2. ### Supplementary Figure 2 Photographs of microfluidic devices.

Photographs of (a) hydrodynamic-focusing and (b) inertial-focusing microfluidic devices used in the experiments for cell focusing.

3. ### Supplementary Figure 3 Procedure for preparing an E. gracilis sample.

(I) Stock culture of E. gracilis NIES-48 in the plant growth chamber. (II) Inoculate the stock cells of E. gracilis to fresh AF-6. (III) To prepare fresh E. gracilis cells, inoculate 3 × 104 cells to fresh AF-6. (IV) To prepare lipid-accumulated E. gracilis cells, collect cells using a centrifuge, and then replace the culture medium with AF-6‒N (nitrogen nutrient omitted from AF-6) for rinsing. After rinsing, collect and resuspend cells in fresh AF-6‒N. All the cultures are incubated in the same conditions except for the culture media and cell density.

4. ### Supplementary Figure 4 Procedure for preparing a human blood sample.

(I) Prepare a 21-guage butterfly needle and a 4.5-mL vacuum plasma separator tube with 0.5-mL of 3.2% sodium citrate, Venoject II. (II) Mix the blood sample and the anti-coagulant thoroughly and slowly by gentle inversion. (III) Transfer 100 µL of the blood sample to a 1.5-mL tube immediately after mixing it. (IV) Add 500 µL of OptiLyse C Lysing Solution to the blood sample and mix it gently by tapping. (V) Incubate it for 10 min at room temperature (18–25 °C). (VI) Add 500 µL of DPBS to the blood sample and mix it gently by tapping. (VII) Leave the blood sample for 10 min at room temperature. This study was approved by the Institutional Ethics Committee of the Faculty of Medicine, the University of Tokyo (#11049-[5]). Written informed consents were obtained from the blood donors.

5. ### Supplementary Figure 5 Procedure for preparing a breast cancer cell sample.

(I) Incubate MCF-7 cells seeded in a 12-well plate for 24 h with multiple concentrations of paclitaxel. (II) Aspirate the cell medium in the 12-well plate, wash the cells with 1 mL of DPBS, and aspirate it again. (III) Add 100 µL of trypsin to the sample and incubate it for ~5 min at 37 °C. (IV) Add 1 mL of complete medium to the sample to dilute the cell suspension and mix it by pipetting up and down a few times with a micropipette to break up any clumps of cells. (V) Place a 40-µm cell strainer on top of a 2-mL conical tube. Pass cells through the cell strainer to remove clumps and debris. (VI) Put the single-cell suspension into a 1-mL syringe and load the syringe on a syringe pump.

## Supplementary information

1. ### Combined Supplementary Information

Supplementary Figures 1–5 and Supplementary Methods

3. ### Supplementary Data 1

MATLAB scripts for image construction

4. ### Supplementary Data 2

AutoCAD design files for hydrodynamic and inertial focusing microfluidic devices

5. ### Supplementary Data 3

MATLAB scripts for image segmentation

6. ### Supplementary Video 1

Procedures for microfluidic device fabrication

7. ### Supplementary Video 2

Procedures for high-throughput imaging flow cytometry by optofluidic time-stretch microscopy