## 2 Materials and Methods
### Image Analysis and Statistics  
Image analysis was performed in customized Matlab R2019b (MathWorks, Natick, MA, USA) algorithm developed by our laboratory. The analysis process consists of segmentation, the interconnection of matching cells in adjacent time frames and extraction of the analyzed dynamical and morphological cell features. For cell segmentation in each frame, [PERSON]'s Iterative Thresholding (LIT) method [33] was combined with Empirical Gradient Thresholding (EGT) technique [34]. EGT was shown to be a very robust and parameter-free foreground cell segmentation method (semantic segmentation) across various microscopical modalities [35]. On the other hand, LIT is a powerful technique for single-cell separation (instance segmentation), which is specifically designed for QPI images. LIT iteratively separates objects in \"intensity valley\" if the mass of separated objects is larger than the selected cell mass threshold. Our segmentation procedure is summarized in Figure 2.  
Figure 1: **Blue light doses used in the experiment. ** Resulting blue light doses 0, 24 (**a**) and 208 (**b**) mJ/cm\({}^{2}\) were achieved by the combination of time exposition and light intensity. The intensity of fluorescence light is shown in mW/cm\({}^{2}\). Exposure time was 500 and 1000 ms, respectively. Figure 2: **Block diagram of the cell segmentation algorithm. ** The process consists of two main steps–foreground segmentation (semantic segmentation) and single-cell separation (instance segmentation). Foreground segmentation uses EGT algorithm [34], where the result is refined with additional thresholding and object/hole filtering. Single-cell separation uses LIT algorithm [33]. Input parameters to individual steps are shown with dashed arrows. FSM, Foreground Segmentation Mask; QPI, Quantitative Phase Imaging. QPI image foreground can be segmented with simple thresholding; however, we found that a combination of EGT and thresholding can lead to even better results. First, EGT (with default setting) is used for foreground segmentation and its resulting foreground segmentation mask (FSM) is further improved by the inclusion of pixels brighter then _foreground_threshold_1_ and exclusion of pixels darker than _foreground_threshold_2_. Furthermore, holes smaller than _hole_area_threshold_ and objects smaller than _mass_threshold_ are removed. In LIT, each grayscale foreground object masked by FSM (containing one or more cells) is iteratively thresholded, where the threshold increases in every iteration. When thresholding creates two (or more) objects and newly created objects have a larger mass than _mass_threshold_, they are used as new individual objects, which can be further split with the increasing threshold (and the original object will not be used). Finally, the object in FSM is separated by watershed lines, which are created by the application of the watershed algorithm [36] on Euclidean distance transform [37] of masks of objects created with thresholding. In original LIT [33], threshold grows until it reaches maximum image intensity, which leads to over-segmentation in some cases, thus we have introduced a _maximal_LIT_threshold_ parameter and iterations are stopped when the threshold reaches this value. Parameters _foreground_threshold_1_, _foreground_threshold_2_ and _maximal_LIT_threshold_ were set for all cell lines to value 0.07, 0.4 and 2, respectively. _Hole_area_trehold_ and _mass_trehold_ were manually adjusted for each cell line (but stay fixed for all light doses). Sufficiently, precise tracking of individual cells during the whole sequence is a very hard problem [23]; however, for analysis of our dynamical features statistics across the whole-cell set, we require only to correctly cross-connect cells between each two consecutive time frames and larger tracks are not required.