Supplementary Code for "Imaging biological tissue with high-throughput single-pixel compressive holography"
Creators: name: Wu, Daixuan
Publisher: name: Zenodo
Year: 2021

description: This file contains two subfolders, of which the names are 'preparation for Hadamard-like patterns', 'holographic reconstruction', and 'data acquisition'. These three subfolders include the relevant codes that perform completely different functionalities during the demonstration of single-pixel holographic imaging. Here, we introduce their functionalities, respectively. -------------------------------------------------------------------<br> Preparation of the Hadamard-like patterns (MATLAB)<br> ------------------------------------------------------------------- The file 'DMD_hadamard256.m' in this file folder is used to generate Hadamard-like patterns with orders up to 256 × 256. Hadamard-like patterns with different orders can be generated as well by adjusting the parameter 'number' in this file. The execution of this file with commercialized software MATLAB generates a sequence of Hadamard-like patterns in the format of .txt binary files. To minimize phase drifting caused by environmental disturbance during the experiment, the first order of Hadamard-like patterns (DC signal) is inserted after every 16 modulation patterns as the tracking base. Therefore, 73,728 patterns are generated in a sequence and it takes about 25 minutes to finish this one-time preparation. A DMD (Texas Instrument DLP7000&amp;DLPC410) is employed to project Hadamard-like patterns to the sample. The software and the control board of the DMD are provided by Vialux company (model number Vialux V7001). The Hadamard-like patterns in the format of .txt binary files can be uploaded to the random-access memory (RAM) in advance. Unfortunately, we are unable to provide a series of .txt files of Hadamard-like patterns in this folder as it occupies a large memory of about 50 Gbit (less than the 64Gbit of the RAM of the DMD). After execution of this MATLAB file, the regenerated .txt binary files would be collected in the default document 'data_image256_3_3_8bitplane_russia_persuitbasis2_txt'. -------------------------------------------------------------------<br> Holographic reconstruction (MATLAB)<br> ------------------------------------------------------------------- This folder contains five subfolders and we introduce them in order:<br> *) 'stained tissue from mouse tails': The codes for holographic reconstruction of stained tissue from mouse tails;<br> *) 'unstained tissue from mouse brains': The codes for holographic reconstruction of unstained tissue from mouse brains;<br> *) 'large-fov resolution target (amplitude)': The codes for verification of amplitude resolution in large-FOV mode;<br> *) 'high-resolution resolution target (amplitude)': The codes for verification of amplitude resolution in high-resolution mode;<br> *) 'high-resolution resolution target (phase)': The codes for verification of phase resolution in high-resolution mode; In these subfolders, the self-built codes and reconstructive results for holographically imaging the biological samples and resolution target are archived, respectively. These five subfolders have similar contents, including the main MATLAB file of 'singlepixel_dataprocessing_complex.m' for holographic reconstruction, supporting subfunctions for reconstruction, holographic results and some corresponding stastical production. Here we introduce them in sequence:<br> *) singlepixel_dataprocessing_complex.m: This file reads the measured raw data and calls all the supporting subfunctions to reconstruct holographic images using compressive sensing with different sampling ratios. Subfunctions such as correcting system-induced phase contaminations and phase drifting during the data acquisition process are included. The total execution time of each main file takes about 1~1.5 hours, including holographic reconstruction with and without the sample, removing phase contaminations, and the denoising process. *) smoothfit.m: A custom-designed fitting function to correct the phase drifting during data acquisition. *) imaging-amplitude.fig: The amplitude image reconstructed in this example. *) imaging-phase.fig: The phase image reconstructed in this example. *) mcolor2.mat: A custom-designed colormap of phase distribution in consideration of phase wrapping. *) BM3D.m: A denoising algorithm that employs block-matching 3D (BM3D) filtering. *) BM3DSHARP.m: A denoising algorithm that employs block-matching 3D (BM3D) filtering. *) file folder of 'results': A folder contains output results including many intermediate variables generated during the reconstruction process. For example, it contains holographic output with and without compressive sensing, crude images before correcting phase contaminations, computed field coefficients of each pattern, and the corresponding statistical property. Note that these files in the folder 'results' will be rewritten when running 'singlepixel_dataprocessing_complex.m'. -------------------------------------------------------------------<br> data acquisition (C++ code)<br> ------------------------------------------------------------------- This file folder contains only one subfolder, which are named 'joint_256bitplane8'. Given the restrictions of copyrights of public software, we can just provide the main C++ code file that is implemented in Visual Studio C++ project. *) File folder of 'joint_256bitplane8':<br> This folder includes some necessary files of the Visual Studio C++ project to control both the DMD and the DAC. In this project, the execution of an integrated C++ source file named 'joint_256bitplane8.cpp' enables the DMD to display the desired Hadamard-like patterns with full speed and the DAC to acquire data subsequently. After preloading all the desired Hadamard-like patterns onto the DMD, it takes about 3 seconds to finish the data acquisition once.<br> Please visit the website https://visualstudio.microsoft.com/zh-hans/ to download the Visual Studio 2019 community version.