In order to perform the deconvolution of 3D images acquired on modern microscopes, we use the complete software package DeconvolutionLab2 instead of using the framework of ImageAccess as usual.
DeconvolutionLab2 is an open-source software package that includes several standard algorithms of deconvolution. It can be run in two modes:
DeconvolutionLab2 has a bunch of functionalities that allows one to validate the algorithms by running convolution and deconvolution on known synthetic datasets and synthetic PSF.
1. Introduction to the DeconvolutionLab2 Java library
Below, we provide an example of code. Test this method on siemens-star-3D using the plugin Experiment Example.
public static void example() { // Get a RealSignal object r from a open image of ImageJ RealSignal r = Lab.getImage("siemens-star-3D.tif"); if (r == null) { IJ.error("No open image."); return; } // Create a RealSignal object, here a Gaussian function with 3 different sigmas (sigma_x, sigma_y, sigma_z) RealSignal h = new Gaussian(1, 2, 4).generate(r.nx, r.ny, r.nz); // Display h as 3 orthogonal section from the center Lab.showOrthoview(h, "h"); // Create a operator Simulation = convolution and additive gaussian noise of mean = 0 and standard deviation = 5 Simulation sim = new Simulation(0, 5, 0); // Run the simulation with h as PSF. The method .noPopup() hides the final stack ouput RealSignal y = sim.noPopup().run(r, h); // Display y as a 2D planar montage of all z-slices Lab.showPlanar(y, "y"); // Run the deconvolution operator RIF, regularization factor = 0.001 RegularizedInverseFilter rif = new RegularizedInverseFilter(0.001); RealSignal xrif = rif.noPopup().run(y, h); Lab.showOrthoview(xrif, "RIF"); IJ.log("SNR RIF " + Assessment.snr(xrif, r)); // Run the deconvolution operator Landweber, 10 iterations, step = 1 // The methods .setReference(r).setStats() enables a table of the SNR after every iteration Landweber lw = new Landweber(10, 1); lw.setReference(r).setStats(); RealSignal xlw = lw.run(y, h); Lab.showOrthoview(xlw, "LW"); IJ.log("SNR LW " + Assessment.snr(xlw, r)); }
2. Inverse Crime
A naive way to evaluate the deconvolution chain is to convolve (multiplication in the Fourier domain) an image with a PSF and then deconvolve it using a simple stabilised division in the Fourier domain. This last operation is the role of the Naive Inverse Filter (NIF).
Using the same input image r siemens-star-3D and the same PSF h (Gaussian(1, 2, 4)) of the Question 1, code the method inverseCrime() that generates the 3 following outputs:
This method has to also display the 3 outputs as orthoview and computes the SNR with respect to the ground-truth image r. Conclude on the Naive Inverse Filter and fill the report.
3. Wiener Inverse Filter
In presence of noise, a solution is to use a Regularized Inverse Filter where a hyper-parameter λ controls the regularisation regime.
In this experiment, we ask to find a good regularization factor λ for different levels of noise n using the algorithm TikhonovRegularizedInverseFilter(λ) depending of the noise of the input image. The input image y_{n} is artificially created with the following commands:
RealSignal r = new Cube(10, 0.01).generate(36, 36, 36); RealSignal h = new Gaussian(1, 1, 1).generate(r.nx, r.ny, r.nz); Simulation sim = new Simulation(0, n, 0); RealSignal yn = sim.noPopup().run(r, h); Lab.showPlanar(yn, "y" + n);
Code the method inverseFilter() which loops over λ from 0 to 1 (step = 0.05) to find λ given the best SNR(r, x_{n}).
This method has to also display the output x_{n} as planar and computes the SNR with respect to the ground-truth image r. Run the experiment for n = 0, 0.25, 0.5, 0.75 and 1 using the plugin Inverse Filter. Fill the report.
4. Comparison of algorithms
In this experiment, we ask to compare five algorithms of deconvolution and find their parameter given the best SNR.
Algorithm | Symbol | Type | Parameter | Constraint |
Regularized Inverse Filter | RIF | Direct | λ Laplacian regularization factor |
None |
Tikhonov Regularized Inverse Filter | TRIF | Direct | λ Tikhonov regularization factor |
None |
Richardson Lucy | RL | Iterative | Number of iteration (niter) | None |
Landweber | LW | Iterative | Number of iteration (niter) The step γ is always set to 1.8 |
None |
LandweberPositivity | LW+ | Iterative | Number of iteration (niter) The step γ is always set to 1.8 |
Non-negative |
The input image y is artificially created with the following commands:
RealSignal r = Lab.getImage("siemens-star-3D.tif"); RealSignal h = new BesselJ0(1, 2, 0.001, 0.00001).generate(96, 96, 96); Simulation sim = new Simulation(0, 0.1, 5); RealSignal y = sim.noPopup().run(r, h); Lab.showOrthoview(y, "y");
Code the method comparison() which search the best λ (a power of 10 is enough precision) for RIF and TIRF and the best niter (maximum 300 iterations) for RL, LW and LW+. In order to compare algorithms, the method .setReference(r).setStats(); computes automatically the SNR of the deconvolved image and the reference image r (after every iterations for iterative algorithm).
5. Save Sherlock Holmes!
The question can be done using the ImageJ commands and the GUI of DeconvolutionLab, no need to code.
Sherlock Holmes is not satisfied! Dr. Watson took a picture with hand-motion blur. Help Sherlock Holmes to retrieve the hidden quote in the image quote-motion-blur.
6. Deconvolution of a real biological specimen
The question can be done using the ImageJ commands and the GUI of DeconvolutionLab, no need to code.
Try to solve the deconvolution task as well as you can on the real biological sample. Because in real life the ground-truth is unknown, the only quality criterion is your visual appreciation.
The acquired data (one fluorescence FITC channel, green) is data-FITC and the microscope PSF is PSF-FITC. Fill the report.