Package: napari-generic-SIMulator
napari-generic-SIMulatorA napari plugin to simulate raw-image stacks of Structured illumination microscopy (SIM).The simulation is originally based on the paperGPU-accelerated real-time reconstruction in Python of three-dimensional datasets from structured illumination microscopy with hexagonal patternsby
Hai Gong, Wenjun Guo and Mark A. A. Neil (https://doi.org/10.1098/rsta.2020.0162).The calculation can be GPU-accelerated if the CUPY (tested with cupy-cuda11x) is installed. In addition, the TORCH package can complete the acceleration both on CPU if TORCH is installed, and on GPU if TORCH is compiled with the CUDA (tested with torch v1.13.1+cu117) enabled.Currently applies to:conventional 2-beam SIM data with 3 angles and 3 phases3-beam hexagonal SIM data with 7 phases, as described in the paper3-beam hexagonal SIM data with 5 phases at right-anglesconventional 3-beam 3-D data with 3 angles and 5 phasesThisnapariplugin was generated withCookiecutterusing@napari'scookiecutter-napari-plugintemplate.InstallationYou can installnapari-generic-SIMulatorviapip:pip install napari-generic-SIMulatorTo install latest development version :pip install git+https://github.com/Meizhu-Liang/napari-generic-SIMulator.gitThis plugin is compatible withnapari 0.4.17or above, older versions of napari would show errors ininterpolation.UsageOpen napari and create the viewer.Launch two widgets:Point cloud generatorandSIM data generatorinPlugin.The two widgets can be tabbed together.Choose the type and other parameters of point cloud as a sample inPoint cloud generator.The point cloud can be displayed in three dimensions, and be saved and loaded as .pcd files.https://user-images.githubusercontent.com/74197598/227589232-9006842b-6706-48b7-9f2b-fe93c6698503.mp4Adjust parameters in SIM data generator to simulate a raw image stack.Apart from basic parameters such as the refractive index, the wavelengths and so on, the z scanning can be eitherz drift: the conventional SIM (imaging a raw stack at the same z-position) orz step: the drifting case in
the papaer mentioned above (imaging only one raw image at a z-position).The parameters used in the simulation can be saved with the image stack by clickingsave tif with tags. Tags (of current or of one stack dragged into napari viewer) can be printed in Python byprint tags.Three-dimensional point spread function (PSF), optical transfer function (OTF) andilluminationpatterns applied in the simulation can be showed by buttons. Note the all of these correspond the generated raw-image stack, so keep the parameters the same before showing thePSF(orOTFandillumination).https://user-images.githubusercontent.com/74197598/227588321-ad3c8f17-1c61-4079-9e34-9b1f990714c1.mp4https://user-images.githubusercontent.com/74197598/227586957-b76ad56e-44d5-4d9b-a1cc-2cfd08ca5400.mp4https://user-images.githubusercontent.com/74197598/227585827-64531265-b4fb-48a9-9698-7f263f22d718.mp4The raw image stacks can be then processed by napari-sim-processor (https://www.napari-hub.org/plugins/napari-sim-processor).ContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theBSD-3license,
"napari-generic-SIMulator" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.