I am trying to write a macro to generate PSFs and then run deconvolution for a set of z-stacks. A new PSF has to be generated for each stack because of the different slice number in each stack. The macro appears to be running fine (generating a new PSF, using the PSF & the image in the deconvolution plugin, running up to 100 iterations of deconvolution), however 1) the temporary deconvolutions (images generated each iteration) are not displayed as is done when running the plug-in outside of the macro and 2) the final deconvoluted image is not displayed and I therefore cannot save it into my output folder.
Any suggestions? Thanks so much in advance if anyone is able to help!
Here is the macro so far in IJM language (new to programming, but have written a few successful batch processing macros in ImageJ)