By use of the Selective filtering menu the user can interactively remove selected Fourier components. This may be useful for creating a nicer image, enhancing structures or assisting the unit cell detection
The Fourier components/pixels to be removed can be selected by:
· The circle marker.
· The rectangle maker.
· The oblique marker tool.
· The right color bar markers or the associated Threshold scroll bars in the Fourier menu, which will select the Fourier components outside the min-max range / color range. This is described further in the Fourier Amplitude Threshold Filtering section below

The rectangular marker tool can be selected for the Fourier menu or from the tool bar menu. Its functionality is different from its zoom functions in the spatial images. To draw a rectangle click the mouse to define the first corner then move the mouse while keeping it pressed to define the opposite corner. When the mouse is released the rectangle is defined. After having defined one or more rectangles the associated Fourier components can be set to zero by pressing "Exclude AOI". Alternatively the outside area can be set to zero by pressing "Include only". The marked areas can also be excluded automatically whenever a new shape is drawn by setting the "Auto Exclude" checkbox on.
When the oblique marker is active in the Fourier image it is used for marking areas of interest (AOI). This marker tool is convenient for marking an array of Fourier peaks, not parallel to the horizontal or vertical axes. The corners of the parallelogram are defined by mouse clicks: The first mouse click defines the first corner, the following mouse release determines the second corner and on the second mouse click/release the third and fourth corner are defined.
The circle marker tool marks the area of interests by circles and can be operated in three modes defined by following checkboxes:
Snap: When Snap is set on the circle center is roughly defined by the first mouse click while its radius is defined by the mouse position when releasing the mouse button. The circle will then automatically be re-positioned so that its center is positioned at the highest Fourier component inside the manual drawn circle.
Fixed Radius: When this option is set on the circle will have a fixed radius given by the numeric field and the Center at Origin option will be set off. The position of the circle is defined by the mouse pointer and the Snap option.
Center at Origin: When this checkbox is set the drawn circle will always have the center at the origin (DC) and the Fixed Radius will be set off. You may use this function to perform low-pass, high-pass or band-pass filtering. To perform a low-pass filter mark the cutoff frequency by the circle marker and press Include Only
Filtering by "Including" or "Excluding" Marked Areas
After having defined area of interest (AOI) by the marker tools described above it is possible to set the associated Fourier components to zero by the Exclude AOI button or set the exterior area to zero by the Include Only button. The areas can also be excluded automatically whenever a new area is marked by setting the "Auto Exclude" checkbox on. In combination with "Auto Inverse" checkbox it is possible to monitor the effect on filtered spatial image immediately.
Below is seen an example with some regions marked on the left Fourier image and the right image shows the effect of excluding those regions. Note, that it is important to keep the symmetric property of the Fourier image, which is why SPIP also excludes the mirrored regions.

Note, that the Auto Exclude, and Auto Inverse settings also can be set by right mouse clicks in the Fourier image window without having the Fourier menu active.
When excluding areas it will work as a mask that is multiplied with the defined Band Filter and the resulting filter image can be monitored by setting "Show Filter" on. Likewise the resulting Fourier image after applying the filter can be view by setting "Show FFT Filtered" on.
Pressing the "Clear markers" button will clear the markers and reestablish the excluded areas.
The following shows an example of including only some Fourier components.

The main window holds a repetitive structure and has also a specific orientation. The effect of this can be seen in the full Fourier transform where the highest peaks form lines, oriented perpendicular to the spatial line structures. It is possible remove all Fourier components not associated with the lattice structure using the "Oblique marker tool" to mark the relevant lattice peaks and pressing the "Include only" button. The filtered result created by the Inverse Fourier function should then give a better impression of the repetitive features of the image and the distances of the side-extensions of the single elements are more distinct.
By the right Color Bar markers in the Fourier image or the corresponding Min and Max threshold scroll bars of the Fourier menu it is possible to define Fourier components to be removed based on their magnitude. Components having values lower than the min value or higher than the max value will be set to zero.
When clicking on the Inverse FFT button the filtered image will be shown. Note that it is not necessary to perform and inverse FFT if you want to detect unit cells without the excluded Fourier pixels. Checking the "Auto Inverse" will cause a computation of the filtered result while changing the threshold values.
When Min threshold value is set low it will mainly affect the white noise and you may regard the technique as a white noise filter. The scaling defined in the Output tab will change the sensitivity of this function. If the Min threshold is set high then only the most prominent Fourier components will be appear in the filter result image. This is demonstrated in the following example.
