Open-3DSIM: an open-source three-dimensional structured illumination microscopy reconstruction platform

Open-3DSIM is an open-source reconstruction platform for three-dimensional structured illumination microscopy. We demonstrate its superior performance for artifact suppression and high-fidelity reconstruction relative to other algorithms on various specimens and over a range of signal-to-noise levels. Open-3DSIM also offers the capacity to extract dipole orientation, paving a new avenue for interpreting subcellular structures in six dimensions (xyzθλt). The platform is available as MATLAB code, a Fiji plugin and an Exe application to maximize user-friendliness.


Supplementary Note 1. Principle of Open-3DSIM
As shown in Fig. SN1(a), 3DSIM presents an intensity pattern in the xoy and xoz plane at the objective back focal plane. So, the illumination pattern sequence , ( , , ) can be expressed as 1 : Where 0 denotes the intensity of illumination, denotes the modulation depth of the focal plane. = , = (1− ) are the spatial frequency of pattern in the xoy and xoz plane, and = arcsin ( / ) is the polar angle of incidence, is the numerical aperture, is the excitation wavelength, is the refractive index of the medium inside the illuminated specimen, = + is the pattern vector in the xoy plane, and are the unit vectors in x and y direction, and are the angle and phase of the illumination pattern respectively.
Where −1 [•] denotes 3D inverse Fourier transform. So, the frequency domain of the initial superresolution image _0 ( ) as shown in Fig. SN1(b) can be expressed as: In the reconstruction of SIM, there are several typical problems: (1) Traditional parameter estimation may be wrong under low SNR or low modulation depth 2, 3 ; (2) The peak of high frequency componets may result in honeycomb artifacts 2 ; (3) The abnormal spectrum may cause sidelobe artifacts 4 ; (4) The noise in high-frequency part may cause hammerstroke artifacts 2 ; and (5) The traditional blur of high-frequency part will decrease the weak information in sample 5 .
To sovle these problems, we firstly proposed an adaptive parameter estimation method as shown in Fig. 1(a). This method can greatly improve the correctness of parameter estimation under low SNR using both 1 st and 2 nd frequency componets.
Then, to reduce the honeycomb artifacts (typical honeycomb artifacts can be seen in the OMX result in Extended Data Fig. 2(b), the first spectrum optimization of Open-3DSIM is to use a notchfilter to suppress the high-frequency peaks. respectively. To make the notch-filter applicable to samples with different layers and different wavelengths, the notch-filter is designed according to , and , which will greatly improve the universality and user-friendliness of Open-3DSIM with a fixed preset and .
However, as shown in Extended Data Fig. 2(a), the combination of notched frequency components will still cause sidelobe artifacts because of the patchy features in the combined frequency domain. And the excessive notch will cause the loss of high-frequency signal, so we designed a spatial sum of · ℎ as ℎ to design the filter for spectrum optimization.
Where ( ) is the weight coefficient of different Fourier orders. It is noteworthy that the ideal spectrum of 3DSIM is smooth and even in the 3D domain. We think combined OTF (petal-shaped) is the ideal spectrum to be approached, and the directly combined notched spectrum is like the distribution of ℎ . Thus, we adopt the first filter called 1( ) = ℎ + 1 2 to correct the abnormal frequency _1 ( ) to _2 ( ).
Where is the apodization function in the 3D frequency domain, 1 is the parameter to design 1( ). As shown in Extended Data Fig. 2(a), applying 1( ) can greatly suppress the patchy features and high-frequency noise, so the ability to suppress artifacts is enhanced, but weak information is decreased because of the reduction in the edge of the petal-shaped spectrum. As a result, some weak information may be disappeared. What's more, with the involvement of 1 , the approach to the ideal spectrum and the compensation for the previous notch-filter is not complete. So, we adapt an extra filter called 2( ) = ℎ + 2 2 to continuously approach the ideal spectrum and retain weak information of the reconstructed image. The final spectrum _3 ( ) can be expressed as: The format of 2( ) is the same as 1( ) , but with a relatively smaller 2 (Extended Data Fig. 3(a)(b)), the proportion of high-frequency component can be increased. So, the final super-resolution 3DSIM image can be finally expressed as:

Supplementary Note 3. The effect of spectrum optimization
In Open-3DSIM, we construct two-step spectrum optimization to reduce artifacts and improve the resolution. The notched image (fourier inverse transform of directly combined notched spectrum) and the image filtered after Filter1 and after Filter2 are listed at the top of Extended Data Fig. 2(a), and the partially enlarged views of the xoy plane are listed on the center line. Note that the notched image has observable artifacts as the white arrow shows, but after two filters, the artifact has been greatly suppressed. And after Filter2, the resolution improved as the white profiles shown. The partially enlarged views of the xoz are shown at the bottom and can be seen that the resolution in the xoz plane has increased too. What's more, the frequency domain of the reconstructed images has been closer to the ideal petal-shaped uniform distribution with the use of filters.
What's more, we use the actin filament in Fig. 2(a) to compare the spectrum between different algorithms. It can be seen from Extended Data Fig. 2(b) that under the condition of an extremely low SNR, the high-frequency of the OMX spectrum is missing and the high-frequency spike is prominent, resulting in serious honeycomb artifacts. The high-frequency peak of SIMnoise is prominent, but the high-frequency center is sunk, resulting in the reduction of proportion between high and low frequency components, causing defocused backgrounds and abnormal spectrum.
Through spectrum optimization, Open-3DSIM also maintains a uniform petal-shaped spectrum even under extremely low SNR, thus achieving good reconstruction results.

Supplementary Note 4. Guide for choosing parameters of spectrum optimization
In our work, we set all reconstructions with edegetaper (edge smoothing) and attenuation (att in eq(9)) equal to 0. To preserve edge and high-frequency information, we also recommend users keep the default settings. However, for the original image with lots of edge information, a reasonable set of some Edegetaper (typically 1-10 pixels for 512×512 images) can help to reduce the artifacts; In the case of serious high-frequency noise, a reasonable set of Attenuation between 0 and 0.5 will help to reduce the noise. Notchwidth1( to construct OTFnotch) and Notchwidth2( to construct notchfilter) are notch range parameters related to image size, and Notchdepth1( to construct OTFnotch) and Notchdepth2( to construct notch-filter) are constant notch depth. All reconstructions in this article maintain the default parameters of these four variables, and users are also recommended to keep the default parameters. However, in the process of spectrum analysis after reconstruction, if honeycomb artifacts caused by an insufficient notch (obvious high-frequency modulation point) are found, Notchdepth2 and Notchwidth2 can be appropriately increased, and Notchdepth1 and Notchwidth1 can be appropriately reduced.
To the users, we set 1 and 2 to help users to adjust parameters. As shown in Extended Data Fig. 3(a), Filter1 generally presents a low-pass filter while Filter2 presents a high-pass filter. Larger 1 will make Filter1 more obvious in suppressing the high-frequency information in the OTF of each spectrum, and smaller 2 will enhance the high-frequency part of the petal-shaped spectrum (Extended Data Fig. 4(b)).
We also use the actin filament in Extended Data Fig. 2 as an example, and the well-adjusted parameter is 1 = 0.5 and 2 = 0.1 in Extended Data Fig. 3(c). Filter1 is mainly used for spectrum editing after abnormal reorganization in cooperation with the previous notch-filter. When 1 is larger, the suppression of high-frequency noise at various spectral levels is more obvious, and the ability to suppress sidelobe artifacts is enhanced (Extended Data Fig. 3(f)). But the high-frequency information may be suppressed too. Filter2 is mainly used to preserve weak signals, but low w2 will amplify high-frequency noise and make the image too sharp with hammerstroke artifacts (Extended Data Fig. 3(d, e)). Users can adjust 2 to achieve a balance between resolution and hammerstroke artifacts. We suggest that for the image with a high SNR, we can appropriately reduce 2 to magnify high-frequency information, and for the image with a low signal-to-noise ratio, we can appropriately increase w1 to suppress noise and artifact.
What's more, we list a table to list of parameters of our results as shown in Supplementary   Table 1. In general, we set 1 = 0.5 and 2 = 0.1 to balance noise and artifacts and retain weak information. And the parameters usually do not need users to adjust, which brings great convenience.

Supplementary Note 5. Comparison between single-layer and multi-layer SIM reconstruction
To illustrate the necessity and motivation to develop the multi-layer SIM, we compare the reconstruction results of WF, HiFi-SIM, and Open-3DSIM as shown in Extended Data Fig. 4(a, b).
Although HiFi-SIM achieves a good effect of artifact removal and fidelity, it is still restricted to single-layer. When it comes to thick samples with serious defocused backgrounds, the reconstructed results of HiFi-SIM have more defocused backgrounds and defocused artifacts with no improvement in xoz resolution. By comparison, Open-3DSIM can better remove the defocus or artifacts, and improve the xoz resolution.
What's more, we did a quantitative evaluation of the z-axis resolution of multi-layer 3D SIM and single-layer 3DSIM. As shown in Extended Data Fig. 4(c, d), taking the Argolight pentagon pattern and 100nm fluorescent beads of 488nm excitation wavelength as examples, we take 10 spatial points on Argolight and beads to make the intensity-pixel curve (processing with spline interpolation) on the z-axis as shown in Extended Data Fig. 4(e, f). It can be seen that the halfheight and full-width in the z-axis of WF, single-layer 3D SIM, and multi-layer 3D SIM are 1218nm, 1412nm, and 765nm for Argolight, respectively. And the half-height and full-width in the z-axis of WF, single-layer 3D SIM, and multi-layer 3D SIM are 596nm, 525nm, and 387nm for beads, respectively. At the same time, we use the PSFj plugin to quantitatively analyze the resolution of beads, and get that the resolution of the xoy plane and z-axis of WF is 251nm, 717nm, the resolution of the xoy plane and z-axis of single-layer 3DSIM is 120nm, 708nm, and the resolution of the xoy plane and z-axis of multi-layer 3DSIM is 118nm, 344nm. Therefore, from a quantitative point of view, we show that 3DSIM achieves double 3D resolution compared with WF and double zresolution compared with single-layer 3DSIM.
We would like to stress that our comparison here to illustrate the advantages of multi-layer 3DSIM in improving z-axis resolution compared with single-layer 3DSIM. 2DSIM (or single-layer 3DSIM) has lower phototoxicity and faster imaging speed. On the contrary, multi-layer 3DSIM has the ability of whole-cell imaging with resolution improvement on z-axis. Users should reasonably select the required imaging method according to their needs.

Argolight
To prove the fidelity and performance of Open-3DSIM, we took photos of Algolight in the OMX system and compared the reconstruction performances of different algorithms in Extended Data Fig. 7. It can be seen that Open-3DSIM has an excellent performance in artifact and background removal compared with SIMnoise and OMX. In addition, Open-3DSIM resolution is significantly improved compared with SIMnoise due to the recovery of the high-frequency domain.

various samples
Although SIMnoise obtains good reconstruction results by optimizing the wiener filter, Open-3DSIM transforms iterative optimization into parameter-based frequency domain optimization, which can better remove the effects of artifacts and further improve the resolution as shown in Extended Data Fig. 8(a). We use image decorrelation method 1 to quanlify the resolution of different algorithms, finding that the resolutions in Extended Data Fig. 8(a) of SIMnoise and Open-3DSIM are 130.68nm and 111.24nm. But we also want to stess that the spectrum of Open-3DSIM is still limited in the petal-shaped spectrum without any deconvolution process to guarantee its high fidelity.
The improvement of resolution is caused by the elimination of partial artifacts and background, as well as the reasonable proportion of redistribution between high-frequency and low-frequency spectrums.
And Open-3DSIM outperforms OMX-SIM in the respect of artifact removal and fidelity under low SNR in Extended Data Fig. 8(b). We also test the three algorithms on the nuclear pore complex under high SNR. We find that after raising the contrast, we can still see the excellent artifact suppression ability and optical slicing effect of Open-3DSIM in Extended Data Fig. 8(c).

Supplementary Note 11. Dipole orientation imaging
We also introduce the function of fluorescent dipole orientation imaging in Open3DSIM, so that users can obtain the polarization information directly and conveniently after reconstruction in Extended Data Fig. 10(a). It is worth noting that structured light often has the problem of uneven light intensity in three directions, so it needs dense beads to correct the light intensity 1 as shown in Extended Data Fig. 10(b). More samples of filament action in U2OS are shown in Extended Data Fig. 10(c) above, and the result shows accurate and correct dipole orientation imagings.
Supplementary Table 1. Parameters and data origin used in our work. Table SN1. Parameters and data origin used in our work.