Skip to content

Paramount-Digital-Federation/hslci_imaging

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

hslci_imaging

Computational analysis workflow with supplementary software integration and support scripts for performing high throughput quantitative phase imaging (QPI) experiments using the custom-built high-speed live cell interferometry (HSLCI) system, as demonstrated in Tebon et al. 2023 (https://doi.org/10.1038/s41467-023-38832-8) and described in detail in the source paper, Wang et al. 2026 (https://doi.org/10.1038/s41596-026-01375-5). This code repository contains MATLAB scripts corresponding to two major components of the protocol for using HSLCI to image organoids and 3D cancer models: HSLCI operation (Stages 2.2-2.3 in Wang et al. 2026) and phase map recovery (Stage 3.1 in Wang et al. 2026).

The code for HSLCI operation enables the user to interface with all hardware and software components of the HSLCI system and collect imaging data for high throughput QPI experiments using a MATLAB-scripted graphical user interface (GUI), as described in Wang et al. 2026. The relevant MATLAB code files are all accessible from the directory "code\MATLAB\data_collection". HSLCI data collection involves repeated down-and-back imaging scans along rows of wells ("columns" in the code) of glass-bottom assay plates. Interferogram image files captured during each individual scan, or "subcolumn," are indexed in the order they are acquired and saved to a user-inputted directory in binary (.bin) files.

The code for phase map recovery takes a user-inputted directory with the .bin files containing time-series interferogram images captured using the HSLCI data collection scripts, and for each indexed imaging FOV contained with each imaging subcolumn, outputs time-series phase shift image stacks in .mat files. These .mat files are saved in the format required for the custom multistep HSLCI data analysis pipeline (https://github.com/uclahs-soragnilab/hslci_pipeline), which was previously published with Tebon et al. 2023. The relevant MATLAB code files are all accessible from the directory "code\MATLAB\phase_recovery".

In addition to code used for HSLCI operation and phase map recovery, this code repository also contains 3D printer files that are used for preparing plates of bioprinted organoids and 3D models for HSLCI imaging and other downstream experiments, as described in detail in the source paper (Stages 1.1-1.3 and Box 1 in Wang et al. 2026).

Contents

System Requirements

The phase recovery workflow is optimized for multi-core systems. Higher CPU number results in increased performance.

Recommended memory: 16+ GB RAM. Lower memory systems also work, but at the expense of greater processing times.

OS: Code was tested and validated on Windows 10 Enterprise Version 22H2, OS build 19045. MATLAB has cross-platform support for Mac and Linux operating systems, and scripts and workflows should be readily adaptable with minimal changes.

Required non-standard hardware: HSLCI optical imaging system, as shown in the source publications. This hardware includes custom-built optics and a custom-built circuit with an an Arduino Nano and a Teensy 3.6 microcontroller for system control.

Installation Guide

This software installation guide corresponds to Equipment setup, HSLCI setup steps 3-4 in the source publication, Wang et al. 2026.

A single computer is sufficient for both data collection and analysis. However, we highly recommend independent computers for the data collection and phase recovery workflows to enable data processing and analysis without interrupting data collection.

First, with all hardware components set up as instructed in the source publication (Equipment setup, HSLCI setup steps 1-2 in Wang et al. 2026), install all listed software components on the local machine, following all installation instructions provided by the software manufacturers as applicable.

The MATLAB code has been tested on MATLAB R2018b (MathWorks), version 9.5. MATLAB product requirements (software has been tested on the following versions):

  • Simulink (Version 9.2, R2018b)
  • Bioinformatics Toolbox (Version 4.11, R2018b)
  • Control System Toolbox (Version 10.5, R2018b)
  • Curve Fitting Toolbox (Version 3.5.8, R2018b)
  • DSP System Toolbox (Version 9.7, R2018b)
  • Data Acquisition Toolbox (Version 3.14, R2018b)
  • Image Acquisition Toolbox (Version 5.5, R2018b)
  • Image Processing Toolbox (Version 10.3, R2018b)
  • Instrument Control Toolbox (Version 3.14, R2018b)
  • Optimization Toolbox (Version 8.2, R2018b)
  • Parallel Computing Toolbox (Version 6.13, R2018b)
  • Signal Processing Toolbox (Version 8.1, R2018b)
  • Statistics and Machine Learning Toolbox (Version 11.4, R2018b)
  • Symbolic Math Toolbox (Version 8.2, R2018b)

Required software (software has been tested on the following versions):

  • SID4Bio (v2.4.2.93), commercially available from Phasics
  • SID4 SDK (v7.4.1), commercially available from Phasics
  • eBUS SDK (v3.1.7), commercially available from Phasics
  • DC4100 Series 4 channel LED Driver (version 2.2.44.95), commercially available from ThorLabs
  • ThorLabs Advanced Positioning Technology (APT) software (version 3.21.3)
  • ThorCam (version 3.2.0.0)
  • Arduino IDE (version 2.1.1)
  • Teensyduino (version 1.59)

Next, unzip the archive or pull from GitHub to the local machine. This process should take less than 1 minute.

Connect the Teensy 3.6 to the local machine with a USB cable and use the Arduino IDE program with the Teensyduino add-on to upload the script "matlab_serial_Teensy_code.ino" to the microcontroller. This script is accessible from the directory "code\Teensy 3.6".

Connect the Arduino Nano to the local machine with a USB cable and use the Arduino IDE program to upload the script "pulseGenerator_8fps_nano.ino" to the microcontroller. This script is accessible from the directory "code\Arduino Nano". As written, this Arduino script enables synchronized triggering of the camera and LED strobe illumination at a rate of 8 frames per second over the duration of each scan of the plate.

Finally, prior to running the imaging scripts on MATLAB, unplug the microcontrollers from the local machine and connect the feedback control box to the local machine with a USB cable.

Running the Imaging Scripts

Required inputs in MATLAB

Open MATLAB, navigate to the local copy of the code archive, and add the directory "code\MATLAB\data_collection" to the MATLAB path, along with all subdirectories.

To set up a plate of organoids for imaging, follow the Protocol instructions in the source publication through Stage 2.2, optics adjustment to optimize IR laser signal for autofocusing during raster scanning. This includes running the GUI initialization script (script_initCELL_EXPLORER.m) in MATLAB (Stage 2.2, step 62). Imaging should not be initiated without ensuring that the sample plate is flat within the plate holder and equilibrated in temperature, and that the autofocus system robustly maintains the user's desired focal height (Stage 2.2, steps 60-75).

The following guidance corresponds to Stage 2.3 (imaging bioprinted plates of organoids using HSLCI), steps 76-81 in the source publication, Wang et al. 2026.

In MATLAB, open the GUI initialization script (script_initCELL_EXPLORER.m) and change the integer in the following line to match the USB serial port number corresponding to the connection between the local machine and the feedback control box:

```
ARDUINO_DAQ = arduinoserial_Int('COM5'); % line 242
```

If necessary to prevent the translation stages to automatically run the plate or plate holder into the objective or another static structure during subsequent experiments, in script_initCELL_EXPLORER.m, change the numbers in the following lines of code to the desired stage movement coordinate limits corresponding to the x-, y-, and z-translation stages; all numbers used in these lines represent movement coordinates in millimeters. For movements in the x-direction, change the following lines:

```
min = single(4.5); % line 158
max = single(69.5); % line 159
```

```
min = single(4.5); % line 217; must match value used in line 158
max = single(69.5); % line 218; must match value used in line 159
```

For movements in the y-direction, change the following lines:

```
min = single(0); % line 185
max = single(99); % line 186
```

For movements in the z-direction, change the following lines:

```
min = single(30); % line 209
max = single(50); % line 210
```

```
zmax = single(50); % line 219; must match value used in line 210
```

Then, in the GUI initialization script (script_initCELL_EXPLORER.m), change the line specifying the exposure time in microseconds, if necessary. The default value is 50000; we recommend an exposure time of 50 ms when imaging at 8 fps.

```
H_SRC2.ExposureTimeRaw = 50000; % line 315; must be less than H_SRC2.ProgFrameTimeAbs
```

In MATLAB, open the GUI reinitialization script (script_reinitializeSID4Bio.m) and make the identical change to the analogous line specifying the exposure time in microseconds, if necessary.

```
H_SRC2.ExposureTimeRaw = 50000; % line 37; must be less than H_SRC2.ProgFrameTimeAbs
```

In MATLAB, open Obj40xCfg.m, the hardware-interfacing configuration script called by the GUI initialization script. In this configuration script, if necessary, change the line specifying the duration of LED strobe illumination (in microseconds) during each image capture. We recommend an illumination duration of 167 µs when imaging at 8 fps.

```
config.PHASICS_STROBE_uS = 167; % line 53
```

In the configuration script Obj40xCfg.m, if necessary or desired, change the line specifying the number of interferograms to be captured by the HSLCI camera during each imaging scan.

```
config.NUM_IMAGES = 140; %number of image captures per scan; line 14
```

In Obj40xCfg.m, if desired, change the lines specifying the default speed settings of the x-, y-, and z- translation stages (in mm/s) when initializing the imaging GUI.

```
config.V1 = 4.000 ;     % line 28
config.V2 = config.V1 ; % line 29
config.V3 = 1.000;      % line 30
```

In Obj40xCfg.m, if desired, change the lines specifying the default acceleration settings of the x-, y-, and z- translation stages (in mm/s^2) when initializing the imaging GUI.

```
config.ACCEL1 = 0.500;  % line 31
config.ACCEL2 = config.ACCEL1; % line 32
config.ACCEL3 = 4.000;  % line 33
```

In Obj40xCfg.m, if desired, change the lines specifying the default movement step size settings of the x-, y-, and z-translation stages (in mm) when initializing the imaging GUI.

```
config.JOG_STEP_SIZE_MOTOR1 = 0.050;   % line 34
config.JOG_STEP_SIZE_MOTOR2 = 0.050;   % line 35
config.JOG_STEP_SIZE_MOTOR3 = 0.005;   % line 36
```

In Obj40xCfg.m, the save directories for interferograms must be inputted in the analogous format as in lines 113-114. Create these directories if they do not already exist, as they must exist prior to imaging. We recommend saving in external hard drives with a capacity of >12 TB.

```
config.SAVE_DIR = 'E:\2022_08_14_SARC0139_print_tx_test_BW\'; %line 113; have to create folder first
config.SAVE_DIR_LOCAL = 'D:\2022_08_14_SARC0139_print_tx_test_BW\'; %line 114; have to create folder first
```

In Obj40xCfg.m, change the line specifying the save directory and default filename of reference interferograms acquired by the HSLCI imaging GUI, if desired. Reference interferograms should be saved as tiff files and the filename must therefore end with the string ".tiff".

```
config.REFERENCE_FILE = 'C:\\CAPTURE\\References\\REF.tiff'; % line 127
```

If it is necessary to adjust the signal range of imaged interferograms (which can be visualized using the "Video Preview" window of the imaging GUI), change the camera gain parameter in the configuration script Obj40xCfg.m.

```
config.PHASICS_GAIN = 910; % line 54
```

In MATLAB, open script_loopTest.m, the main imaging script. This script commands the HSLCI platform to run a user-programmed series of imaging scans on a sample plate.

To maximize the number of imaging fields of view (FOVs) with interpretable data when imaging organoids in a 96-well sample plate, as described in detail in the source paper, each of the six interior columns of wells(columns B, C, D, E, F, and G, between wells 2 and 11) is programmed to be scanned four times by default. These four subcolumns are grouped into two sets of two subcolumns by default, as visualized in Figure 2g of Wang et al. 2026. Imaging scans are performed in order, starting from the subcolumn closest to column A and ending with the subcolumn closest to column H, by default. Within each grouping of imaging scans, the first scan is programmed to initiate from well 2 (well B2, C2, D2, E2, F2, or G2) and terminate after scanning well 11 (well B11, C11, D11, E11, F11, or G11), while sequential scans are performed in opposite directions parallel to the long axis of the plate (for example, the second subcolumn of each set of scans is programmed to initiate from well 11 and terminate after scanning well 2). At the conclusion of the final scan of each imaging loop, imaging continues from the first scan of the subsequent imaging loop, such that data collection is performed continuously for a user-programmed numnber of imaging loops, and unique FOVs across the interior 60 wells of the 96-well sample plate are repeatedly imaged. Following each individual imaging scan, a binary file containing interferograms acquired during that scan is saved with the filename format "logfile_column_[uppercase letter of the row in the 96-well plate that was scanned and imaged]_[subcolumn number]loop[loop number].bin". Examples of these input files are not included in this repository due to their large file sizes, but are available upon request from the authors.

In the imaging script, script_loopTest.m, change the line specifying the number of imaging loops, or full sets of programmed plate scans across the entire sample plate at a single time point. This number should be large enough to enable repeated imaging of the plate over the experimental duration desired by the user. In the default configuration described previously, each imaging loop of 24 scans across the sample plate should take approximately 10 minutes. For 3 days of continuous imaging loops, as described in the source publication, the default value for this parameter is 432.

```
LOOPS_TOTAL = 432; %total number of imaging loops; line 9  
```

In script_loopTest.m, specify the columns of wells (lettered rows are called "columns" in the code) to be scanned and imaged by uncommenting the lines corresponding to every lettered row of the plate that will be repeatedly imaged, commenting out the lines corresponding to every lettered row of the sample plate that is not intended for imaging, and changing the following line (line 16) to a character array listing, in order, the rows of the sample plate intended for imaging.

```
columnsToImage = 'BCDEFG'; % line 16
```

In script_loopTest.m, input the number of groups of subcolumns for each column of wells to be scanned and imaged. For imaging organoids as described in detail in the source paper, imaging scans for each column are performed in two groups of subcolumns by default (see Figure 2g of Wang et al. 2026), so the default value for this parameter is 2. Each column has two sets of starting coordinates, one corresponding to the group of imaging subcolumns closer to column A, and the other corresponding to the group of imaging subcolumns closer to column H. (Imaging can alternatively be performed in one group of subcolumns for each column, such that each column only has one set of starting coordinates from which the first of config.NUM_COL scans starts, by setting this parameter equal to 1.)

```
subColGroups = 2; % line 20
```

In MATLAB, open the hardware-interfacing configuration script, Obj40xCfg.m, again. In Obj40xCfg.m, input the number of full scans of the y-translation stage that are performed successively from the starting coordinates for each grouping of imaging scans (encoded in the structure array "wells40x" saved in the MATLAB file "wells.mat"). We recommend setting this parameter to an even number. For imaging organoids as described in detail in the source paper, the default value for this parameter is 2; imaging scans for each column are performed in two groups of two subcolumns by default (see Figure 2g of Wang et al. 2026).

```
config.NUM_COL = 2; % line 13
```

In the configuration script Obj40xCfg.m, if necessary or desired, change the line specifying the lateral (y-)shift in mm between adjacent scans or subcolumns that are performed successively from each starting position. The default value for this parameter is 0.5; we recommend a value of 0.5 for imaging organoids as described in detail in the source paper.

```
config.shift = 0.5; % line 12
```

In MATLAB, open the main imaging script, script_loopTest.m, again. In this script, if necessary or desired, change the starting and ending y-coordinates for movements of the y-translation stage during programmed plate scans. These changes must be made in the sections of code corresponding to each column of wells intended for imaging.

```
POSITION_S2_INITIAL = 0; % lines 59, 75, 91, 107, 123, and 139
POSITION_S2_FINAL = 99; % lines 63, 79, 95, 111, 127, and 143
```

In MATLAB, open script_TrigMoveBinary.m, the hardware-interfacing configuration script called by the imaging script. In this script, if necessary or desired, change the lines specifying the speed and acceleration/deceleration of y-translation stage movements during each imaging scan.

```
ACCN = 6.0; %acceleration of y-translation stage at the start of each scan and deceleration at the conclusion of each scan, in mm/s^2; line 21
MAX_VEL = 6; %y-translation stage movement speed during imaging, in mm/s; line 22
```

In script_TrigMoveBinary.m, if necessary or desired, change the line specifying the movement step size for the z-translation stage during imaging scans, in mm. We recommend a value of 0.025 for this parameter. While the imaging script is running, the feedback control box jogs the z-translation stage up and down by this distance to compensate for the spatial limits of the piezo (about 100 µm) during autofocusing of the objective.

```
RUN_STEPSIZE = 0.025; % line 23
```

Document and save changes to all of the above scripts. Re-run the GUI initialization script, script_initCELL_EXPLORER.m, after making the necessary changes to the above scripts.

Immediately prior to initiating each HSLCI imaging experiment, the starting coordinates of the first scan in each grouping of scans (by default, subcolumns 1 and 3 for each column that is programmed to be imaged) must be configured such that the first group of imaging paths (subcolumns 1 and 2 by default) overlaps with areas of wells containing bioprinted organoids on the side closer to column A, and the second group of scans (subcolumns 3 and 4 by default) overlaps with areas of wells containing bioprinted organoids on the opposite side closer to column H.

In MATLAB, open the MATLAB workspace file "wells.mat" from the subdirectory "code\MATLAB\data_collection\collection_scripts". In this file, the structure array "well40x" encodes the starting x- and z- coordinates for automated plate scans during imaging (the starting y-coordinates are encoded by the variable POSITION_S2_INITIAL in the main imaging script, script_loopTest.m). These starting x- and z- coordinates must be edited (and can be edited by using inputs that match the following format) and saved in the MATLAB workspace file "code\MATLAB\data_collection\collection_scripts\wells.mat".

well40x(1).B.S1 = 12.5; %starting x-coordinate for first scan of the first group of scans corresponding to column B
well40x(1).B.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column B
well40x(2).B.S1 = 16.0; %starting x-coordinate for first scan of the second group of scans corresponding to column B
well40x(2).B.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column B
well40x(1).C.S1 = 21.5; %starting x-coordinate for first scan of the first group of scans corresponding to column C
well40x(1).C.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column C
well40x(2).C.S1 = 25; %starting x-coordinate for first scan of the second group of scans corresponding to column C
well40x(2).C.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column C
well40x(1).D.S1 = 30.5; %starting x-coordinate for first scan of the first group of scans corresponding to column D
well40x(1).D.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column D
well40x(2).D.S1 = 34; %starting x-coordinate for first scan of the second group of scans corresponding to column D
well40x(2).D.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column D
well40x(1).E.S1 = 39.5; %starting x-coordinate for first scan of the first group of scans corresponding to column E
well40x(1).E.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column E
well40x(2).E.S1 = 43; %starting x-coordinate for first scan of the second group of scans corresponding to column E
well40x(2).E.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column E
well40x(1).F.S1 = 48.5; %starting x-coordinate for first scan of the first group of scans corresponding to column F
well40x(1).F.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column F
well40x(2).F.S1 = 52; %starting x-coordinate for first scan of the second group of scans corresponding to column F
well40x(2).F.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column F
well40x(1).G.S1 = 57.5; %starting x-coordinate for first scan of the first group of scans corresponding to column G
well40x(1).G.S3 = 37.5; %starting z-coordinate for first scan of the first group of scans corresponding to column G
well40x(2).G.S1 = 61; %starting x-coordinate for first scan of the second group of scans corresponding to column G
well40x(2).G.S3 = 37.5; %starting z-coordinate for first scan of the second group of scans corresponding to column G

Then, close all MATLAB windows, clear all variables from the MATLAB workspace, and re-run the GUI initialization script, script_initCELL_EXPLORER.m, while ensuring that the variable well40x is called with the correct user-inputted coordinates. Document and save changes to all of the above scripts.

Finally, from this point, continue following the step-by-step instructions in the source publication for setting up imaging experiments on the HSLCI (Procedure 2.3, steps 82-90 in Wang et al. 2026). These instructions culminate in running the main imaging script, script_loopTest.m.

In the specified output folder, the imaging script should output binary files containing interferograms captured during each imaging scan on the HSLCI, and indexed in the order of image acquisition. The number of interferograms saved in each binary file is specified by the variable config.NUM_IMAGES (the default is 140 interferograms per scan), while the output folder is specified by the variables config.SAVE_DIR and config.SAVE_DIR_LOCAL, all within the configuration script Obj40xCfg.m.

Running the Phase Recovery Scripts

Required inputs in MATLAB

Open MATLAB, navigate to the local copy of the code archive, and add the directory "code\MATLAB\phase_recovery" to the MATLAB path, along with all subdirectories.

The following guidance corresponds to Stage 3.1 (phase map recovery), steps 126-130 in the source publication, Wang et al. 2026.

In MATLAB, open the camera manufacturer's hardware-interfacing script, script_SDK64_PhasicsINT.m. Edit the following line to a file path corresponding to a digital rights management file provided by the manufacturer during installation of SID4 SDK (Phasics):

```
PROFILE  = 'C:\Program Files (x86)\SID4_SDK_x86\Examples\UserProfiles\SID4-533\SID4-533.txt'; % line 7
```

Then, edit the reference image filename to point to the desired reference interferogram, and run script_SDK64_PhasicsINT.m.

```
referenceFile = 'H:\2022_08_14_SARC0139_print_tx_test_BW\References\2022_08_14_reference3_BW.tiff'; % line 39
```

For imaging organoids as described in detail in the source paper, imaging scans for each column are performed in two groups of subcolumns by default (see Figure 2g of Wang et al. 2026). Each column has two sets of starting coordinates, one corresponding to the group of imaging subcolumns closer to column A, and the other corresponding to the group of imaging subcolumns closer to column H. Due to non-negligible differences in the optical contribution of the imaging setup between imaging FOVs on either side of the empty center of each well, the inputted reference interferogram must be from the same side of the well relative to the interferograms from which phase maps are being reconstructed. In other words, the reference interferogram used for recovering phase maps from FOVs in the imaging subcolumns closer to column A (subcolumns 1 and 2 by default) must be acquired from a cell- and debris-free area of a well that is closer to column A, and the reference interferogram used for recovering phase maps from FOVs in the imaging subcolumns closer to column H (subcolumns 3 and 4 by default) must be acquired from a cell- and debris-free area of a well that is closer to column H.

In MATLAB, open the phase map recovery script, processFilesHSLCI_stack.m, and the phase map recovery function that it calls, read_unwrapColumn_stack.m.

In the main phase map recovery function, read_unwrapColumn_stack.m, edit the input directory to the file path containing the .bin files with the interferograms captured during a single HSLCI imaging experiment.

```
freadDir = 'M:\2022_08_14_SARC0139_print_tx_test_BW\'; %include the file separator; line 17
```

In read_unwrapColumn_stack.m, edit the save directory for output time-series phase image stacks (.mat files), and create this save directory if it does not already exist. We recommend saving in external hard drives with a capacity of >12 TB.

```
SAVE_DIR = 'O:\Raw_Data\2022_08_14_SARC0139_print_tx_test_BW\'; %include the file separator; line 18
```

In read_unwrapColumn_stack.m, if necessary, also edit the number of interferograms saved in each .bin file, corresponding to individual imaging scans, in the input directory. The default value for this parameter is 140.

```
numImages = 140; %number of images per loop of a subcolumn; line 22
```

In the phase map recovery script, processFilesHSLCI_stack.m, change the following lines to match the experimental parameters used to acquire the images in the input directory:

```
numLoops = 432; %number of imaging loops; line 13
numSubCol = 4; %total numbered imaging subcolumns to unwrap for each column of wells that was imaged, regardless of how these subcolumns were grouped during imaging; line 14
yyyy_mm_dd = '2022_08_14'; %date of experiment; input folder must also contain date in this format; line 15
cellLine = 'SARC0139'; %identifier for the cells or organoids used in the experiment; input folder must also contain this string, with matching capitalization; line 16
```

In processFilesHSLCI_stack.m, specify the imaged columns of wells (lettered rows are called "columns" in the code) to be processed for phase recovery by uncommenting the lines corresponding to every lettered column of the sample plate that was imaged, and commenting out the lines corresponding to every lettered column of the sample plate that was not imaged (or that you do not wish to process for phase recovery).

Then, in processFilesHSLCI_stack.m, change the integer specifying whether the group of imaging subcolumns closer to column A, or the group of imaging subcolumns closer to column H are to be processed through the phase map recovery scripts.

```
subColGroup = 1; %[] if uprocessing all subcolumns with the same reference; line 18
%1 if processing top leg subcolumn with top leg reference (closer to row A)
%2 if processing bottom leg subcolumn with bottom leg reference (closer to row H)
```

In the main phase map recovery function, read_unwrapColumn_stack.m, edit the switch-case statement to process interferograms that correspond to imaging FOVs within each well, and to ignore interferograms that correspond to imaging FOVs in between wells of the imaged sample plate (lines 127-721). Interferogram image files captured during each individual scan, or "subcolumn," are indexed in the order they are acquired and saved to .bin files. This section of the function read_unwrapColumn_stack.m maps the indexed interferograms within each .bin file to each well of the sample plate that was imaged. For example:

        if WHICH_COL == 'B'
        switch direction
    case 1
    if strcmp(WHICH_WELL, '2')
    ROW = [11:16];
    elseif strcmp(WHICH_WELL, '3')
    ROW = [23:28];
    elseif strcmp(WHICH_WELL, '4')
    ROW = [35:40];
    elseif strcmp(WHICH_WELL, '5')
    ROW = [47:52];
    elseif strcmp(WHICH_WELL, '6')
    ROW = [59:64];
    elseif strcmp(WHICH_WELL, '7')
    ROW = [71:76];
    elseif strcmp(WHICH_WELL, '8')
    ROW = [83:88];
    elseif strcmp(WHICH_WELL, '9')
    ROW = [95:100];
    elseif strcmp(WHICH_WELL, '10')
    ROW = [107:112];
    elseif strcmp(WHICH_WELL, '11')
    ROW = [119:124];
    elseif strcmp(WHICH_WELL, '12')
    ROW = [131:136];
    end
        end
        end

The integer following each case statement represents the subcolumn number of the input .bin files, or the order in which the corresponding imaging scan was performed within the specified column of wells (By default, imaging scans are performed in order, starting from the subcolumn closest to column A and ending with the subcolumn closest to column H). The above section of code indicates that when imaging column B, subcolumn 1, interferograms #11-16 correspond to FOVs within well B2, interferograms #23-28 correspond to FOVs within well B3, interferograms #35-40 correspond to FOVs within well B4, and so on.

Individual case statements corresponding to each subcolumn of each imaged column of the sample plate can be generated by running the script findrowsfromVideoBinary.m.

Then, in read_unwrapColumn_stack.m, edit the if-else statement that indexes the processed interferograms corresponding to FOVs within each well (lines 53-101). This section of the code is required to ensure that the output time-series phase shift image stack corresponding to each indexed imaging FOV (specified in the switch-case staetment, lines 127-721) is saved with a filename that reflects the well and the order within the well that was imaged. For example:

if strcmp(column, 'B') == 1
    if direction == 2   %if the input .bin file is from imaging column B, subcolumn 2
        wellIndex = [0 6 6 6 6 6 6 6 6 6 6 6];  %integers in array are total number of FOVs corresponding to wells B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, and B12 that are saved from imaging column B, subcolumn 1
    elseif direction == 3   %if the input .bin file is from imaging column B, subcolumn 3
        wellIndex = [0 12 12 12 12 12 12 12 12 12 12 12];   %integers in array are total number of FOVs corresponding to wells B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, and B12 that are saved from imaging column B, subcolumns 1 and 2
    elseif direction == 4   %if the input .bin file is from imaging column B, subcolumn 4
        wellIndex = [0 19 19 19 19 19 19 19 19 20 19 19];   %integers in array are total number of FOVs corresponding to wells B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, and B12 that are saved from imaging column B, subcolumns 1, 2, and 3
    end
end

The format of each of the above arguments must be identical to the examples shown.

Document and save changes to all of the above scripts.

Finally, run the main phase map recovery script, processFilesHSLCI_stack.m. In the user-determined output folder (specified by the variable SAVE_DIR in the function read_unwrapColumn_stack.m), the phase map recovery script should output time-series phase shift image stacks in .mat files corresponding to each imaging field of view.

Additional Files

CAD File for 3D-printed well masks

The computer-aided design (CAD) file used for generating the 3D-printed resin masks required for seeding cells into 96-well plates (Reagent setup, Printing masks for patterned oxygen plasma treatment, in Wang et al. 2016) is accessible in the directory "code\96-well bioprinting". This file, "plasmamask_8_6100um_4100um_2700um.stl", can be used as an input in Preform (v3.41.0.427, FormLabs) as described in the source paper, or modified as desired using Inventor (Autodesk), Fusion (Autodesk), or other CAD software.

Bioprinter instruction files

The included printer instruction text files (file extension .gcode) are intended to be run using the Bio X bioprinter (CELLINK) with the temperature-controlled printhead installed in module 3, the rightmost printhead slot as viewed by the user.

G-code print instructions used for seeding cells into 96-well plates (Cellvis, cat. no. P96-1.5H-N), as described in detail in the source paper (Stages 1.1-1.3 in Wang et al. 2026), are included in the directory "code\96-well bioprinting". The name of the instruction file is "Cellvis_3.9mm_squares_PH3.gcode".

G-code print instructions used for seeding cells into 8-well rectangular plates (Thermo Scientific, cat. no. 167064), as described in detail in the source paper (Box 1 in Wang et al. 2026), are included in the directory "code\8-well bioprinting". The name of the instruction file is "8w_4ring.gcode".

To run these bioprinter instruction files from the Bio X bioprinter's UI as described in the source paper, first copy the desired files from this archive to a USB drive, and then insert this USB drive into the bioprinter. Alternatively, analogously formatted print instructions can be generated as desired by the user using a text editor or the DNA Studio software (v4, CELLINK) before being visualized and initiated using the bioprinter's UI.

License

This project is covered under the GNU General Public License, version 2.0 (GPL-2.0).


License Author: Bowen Wang (bowenwang410@g.ucla.edu), Graeme Murray (graeme.f.murray@gmail.com), Daniel Guest (dancguest@gmail.com), Jason Reed (jcreed@vcu.edu), Peyton Tebon (peyton.tebon@gmail.com), Michael Teitell (mteitell@mednet.ucla.edu) hslci_imaging is licensed under the GNU General Public License version 2. See the file LICENSE for the terms of the GNU GPL license. hslci_imaging enables the user to operate the high-speed live cell interferometry system through a MATLAB-scripted GUI, and to output phase maps from the raw imaging data. Copyright (C) 2026 University of California Los Angeles (“Teitell Lab”) All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

Computational analysis workflow with supplementary software integration and support scripts for performing high throughput quantitative phase imaging (QPI) experiments using the custom-built high-speed live cell interferometry (HSLCI) system.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • G-code 65.6%
  • MATLAB 32.7%
  • C++ 1.7%