Author: Bob Dougherty Installation: Download Iterative_Deconvolve_3D.class or Iterative_Deconvolve_3D.java to the plugins folder. (Windows users right-click to download.) Description: Plugin for 2D and 3D non-negative, iterative, deconvolution. Based in part on the DAMAS algorithm by Thomas F. Brooks and William M. Humphreys, Jr., NASA-Langley Research Center. Also includes a regularized Wiener filter as a preconditioning step. Called DAMAS3 in aeroacoustics. Reference: Dougherty, R.P., "Extensions of DAMAS and benefits and limitations of deconvolution in beamforming", AIAA Paper 2005-2961, May, 2005. Previous versions: The earlier plugins Iterative Deconvolution and Iterative Deconvolution 2 are limited to 2D images. Iterative Deconvolve 3D can operate with 2D images, but one of the earlier plugins may still be preferred for this case because Iterative Deconvolution is more efficient with memory and Iterative Deconvolution 2 uses a different algorithm. Forward 2D and 3D convolution has been packaged as a separate plugin, Convolve 3D. PSFs: 3D PSF stacks based on diffraction theory are available from Diffraction PSF 3D. A simpler, Gaussion, PSF plugin is linked on the Convolve 3D page. Measured PSFs can also be used. Usage: There are two input images or stacks, the "image" and the PSF. The numbers of pixels and slices are not required to be powers of 2 or match between or within the two stacks. The spacings of the pixels, dx and dy, and the slices, dz, should be agree between the PSF and the image stack, i.e., dx_image = dx_psf, dy_image = dy_psf, and dz_psf = dz_image. It is permissible to input a single-slice PSF and a multiple-slice image stack. This should produce 2D deconvolution for each slice in the image stack, but it would be more efficient to process the images separately because extra work in done in the z-directon. The other input parameters are:
- The output title.
- Normalize PSF. This affects the scaling of the result. It should be consistent between Convolve 3D and this plugin.
- Inputs in decibels are permitted. This is uncommon in optical image processing, but is the norm in acoustics.
- Select "Show iteration" to watch the image converge, or save some memory by not choosing this.
- Select "Log mean pixel value to track convergence" to obtain a record of the convergence in the Results window.
- The anti-ringing feature attempts to reduce artifacts from features near the boundary of the imaging volume. It should probably be selected, since it is not likely to make the results worse, but it needs improvement.
- Detect divergence stops the iteration if the changes appear to be increasing. Increase the low pass filter size if this problem occurs.
- The Wiener filter gamma regularization parameter, expressed as a fraction of the largest Fourier coefficent of the PSF. Experiment with values in the range of about 1 to 0.001. It is intended to speed the convergence, but can produce spurious artifacts. Setting this parameter to zero turns off the Wiener filter, giving a method similar to the original 2D plugin, "Iterative Deconvolution (DAMAS2)." Feedback to date suggests this may be the best setting.
- The low pass filter settings, in pixels, provide a way to smooth the results and accelerate convegence. Choose 0 to disable this function.
- The maximum number of iterations should usually be set to a large number, such as 100. Enter zero to choose regularized Wiener filter deconvolution without the iterative step. This may produce some negative pixel values.
- The parameter x in "Terminate if mean delta less than x%" is used to stop the iteration if the image is not changing. A reasonable value to input is 0.01.
![]()
Example: If necessary, first install (and compile and restart ImageJ) Gaussian_PSF_3D and Convolve 3D. When ready, create a new macro, paste the text below into it, and Run Macro. It requires about 84 iterations and perhaps an hour of computer time. The number of iterations can be reduced by relaxing the convergence criteria: terminate=0.050 or by incresasing the low pass filter sizes. When it is complete, the deconvolved stack, Deconvolved_84, should look fairly similar to the original, much sharper than the blurred stack, Convolved. The first and last slices of the deconvolved stack are much darker than the corresponding original slices, and the second and 25th are brighter. This is due to the zero-fill option used in the convolution step, together with the fact that the slices contain significant image data all way to the to ends of the stack. This effect could be reduced, at the expense of decreasing the resolution, by increasing the low pass filter setting in z. (Choosing Mirror for the convolution boundary treatment can result in an excellent reconstruction, since this is the nearly the same boundary treatment used for deconvolution, but this would be cheating.) Any significant differences between Deconvolved_84 and mri-stack.tif, other than those noted, indicate a bug or an installation problem. run("MRI Stack (528K)");
run("Gaussian PSF 3D", "width=30 height=30 number=20 dc-level=255 horizontal=2 vertical=2 depth=2");
run("Convolve 3D", "image=mri-stack.tif point=PSF extension=[Zero Pad] normalize output=Convolved");
run("Iterative Deconvolve 3D", "image=Convolved point=PSF output=Deconvolved normalize show log perform detect wiener=0.000 low=0.1 z_direction=0.3 maximum=100 terminate=0.010");
![]()
This shows slice 5 of the original stack, the blurred stack after the convolution (simulating a fictitious optical blurring), and the deconvolved result. History: Version 0: 5/1/2005. Beta release.
Version 1: 5/2/2005. Improved performance for 2D images. Option to not show iterations.
Version 2: 5/29/2005. Added low pass filter, like Iterative Deconvolution/DAMAS2.
Version 3: 5/30/2005. Improved user interface and recommended settings. Corrected filters.
Version 3.1 5/30/2005. Convolution-based anti-ringing feature.
Version 4: 6/3/2005. Corrected a scaling error in the iteration. Provided an option to turn off the Wiener filter. Added divergence detection. Changed the defintion of the low pass filter parameters (multiplied by 2) to better match Iterative Deconvolution.
Version 5: 6/3/2005. Corrected a bug in the low pass filter in the z direction.
Version 5.1 6/3/2005. Improved test for 0 gamma (no Wiener filter). Renamed low pass fiter parameter for z in dialog.
Version 5.2 6/4/2005. Changed the recommended low pass filter settings from 4 to 1 pixels.License: Copyright (c) 2005, OptiNav, Inc.
All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of OptiNav, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ImageJ: ImageJ can be freely downloaded from the ImageJ web site.