LIP Suite-HanningFFT_IFFT

Category: Image Manipulation
Author:
Description: Installation: Copy the "IPU_Ext_LIP.gtk" into the DM plug-in folder, typically at "C:Program FilesGatanDigitalMicrographPlugIns", and then restart DigitalMicrograph. A script to build the plug-in file is also provided. Please make sure the plug-in is named such that it can be loaded after the "IPU.gtk" plug-in. Installed script commands will be located in the “IPU->Live” menu. Description: Perform desired image processing to a source image by attaching image data changed, slice changed, ROI changed and/or component changed listeners to the source image. Key stroke listeners can also be added to the result image display to pause/restart listener as well as changing processing parameters. It is also possible to display/pose UIFrame dialog to provide additional control of processing parameters. Efforts have been made to have the script to run as efficient as possible and to make sure all objects can be destructed properly once the process is terminated. ---- Module #1: Hanning FFT: Apply a Hann window function to a source image and then perform FFT. The result FFT image will be free of "cross streaking" often seen in a direct FFT. If a rectangle ROI is presented and selected in the source image, processing will be performed on the area selected by this ROI only. Image to be processed is restricted to be of equal dimensions and "even" number of pixels (i.e. width = height = 2n, n= integer). However, it does not need to be in size of power of 2 since IPU is used to do FFT. The script will automatically mitigate this issue by either adding a ROI of proper size to the source image or adjusting the selected ROI to proper size. The FFT size restriction is needed to ensure that quantitative information extracted later is accurate (for example, "Amplitude and Phase" by Ruben Bjorge). -----Module #2: Inverse FFT: Perform inverse FFT of a complex source image. If a rectangle ROI is presented and selected in the source image, IFFT will be performed on the area enclosed by this ROI only. The result image is of complex data type, not real data type. Enforce the size of image and/or ROI to be "square" and "even" (i.e. in multiples of 2). "Fourier mask" aware. Adding, changing and/or deleting Fourier masks to the source image will be recognized automatically and the result image will be processed immediately. Default filter length of mask is set to 5 pixel, and mask is set to be "transparent" (keep masked area). An UIFrame dialog can be called up to control the Fourier mask settings (type 's' key while the inverse FFT image is at front).
Comments: The area selecting ROI of the source image sometimes will not get restored to its original attributes when the LIP is terminated. Clicking on this ROI or other windows in DM will cause the ROI attributes to be updated.
Acknowledgements: Special thanks to Bernhard Schaffer for providing the idea of catching image closing event by a dummy key listener.
Script version: 1.5
DM/GMS version: 1.4.3 or newer
Script written as a function: No
Source: Show code
Download Source Code: Download
Download Zip File: Download