Howto search a diffracting region with the live FFT, and then save that region as a new image.
- Start up giplt and then use the following two commands to load the image and display it in a viewer:
i=gui.LoadImage() v=Viewer(i)
- In the viewer, under the menu Windows, remove the Zoom and Overlay, and add the LiveFFT subwindow.
- In the smaller, LiveFFT viewer, make sure to select a subregion (not containing the origin!) and re-normalize (left-click and drag with the mouse, then press N, just as you would in the main image viewer). This may need to be repeated after the following steps.
- Right-click on the LiveFFT image to access the submenu, where you can set its size (bottom menu point). Note that depending on your local workstation, sizes above 256 or 512 may slow things down.
- You can convert the LiveFFT viewer into an independent top-level window by dragging it on its title frame, and then resize this window if your FFT size is too large.
- In the main viewer window, right-click to access its submenu, and then activate the Draw FFT Box option.
- As you move the mouse around in the main viewer, and keep the Shift key pressed, the LiveFFT window will update accordingly. Or, simply move the mouse to a region, and press Shift briefly to get an update of the LiveFFT window only at that time.
- Once you have found the region you would like to extract from the original image, make a single click with the left mouse button at the center of that region, then use this command sequence to cut out this subregion and save it (adjusting the size and filename as required)
s = i.Extract(Extent(Size(1024,1024),Point(v.GetClickedPosition()))) SaveImage(s,"cut_out.tif")
