Image Tools

Built-in tools that compute a new image from an image, an image series or a video: the FFT (the diffractogram) and the Fourier filter.

The FFT is included with every plan, Free too. The Fourier filter is included with the Pro and Lab plans. See Plans.

  1. How the tools work
  2. FFT view on an Image panel
    1. Keeping the FFT as a signal
  3. Fourier filter
  4. Changing and re-running a result
  5. Related pages

How the tools work

The tools accept 2D images, 2Dt video frames and 2Dts image series. A tool’s result is computed frame by frame, as it is shown: Nexus does not process a whole series up front, so a tool on a series of a thousand frames is ready at once and its result follows the timeline as you play or scrub.

A result is stored in the project as a recipe (the tool, its source and its settings), not as pixels. When you open the project again, Nexus computes it again from the source file.

FFT view on an Image panel

The header of an Image panel showing an image has an Image | FFT switch. Choose FFT to show the panel’s FFT instead of its image; choose Image to go back. On a narrow panel the switch is a single FFT button: pressed shows the FFT, pressed again shows the image.

The FFT view is a way of looking at the image. It follows the frame the panel is on and adds nothing to your Workspace. It is kept with the project, so a panel saved in its FFT view opens in it again.

What the FFT shows:

  • The magnitude of the 2D Fourier transform of the current frame, with the zero frequency in the centre: the diffractogram you know from DigitalMicrograph or ImageJ.
  • Spatial-frequency axes in 1/nm when the image is calibrated, and in 1/px otherwise.
  • Missing pixels (for example the empty border of a drift-corrected series) are filled with the mean of the frame, so they add no streak of their own.

The image must be at least 4 × 4 pixels and at most 8192 × 8192 pixels.

Keeping the FFT as a signal

To use the FFT in a script, an export or a panel of its own, keep it as a signal:

  1. Switch the panel to FFT.
  2. In the Selection tab, under FFT, click Add FFT to workspace as signal.

The FFT is added as a new signal, named after the image with (FFT) after it, in a folder of its own in the Workspace section of the Data tab. Like the FFT view, it is computed per frame from the image.

Fourier filter

The Fourier filter keeps part of an image’s spatial frequencies:

  • a Low-pass filter smooths the image,
  • a High-pass filter removes the slow background,
  • a Band-pass filter keeps a ring of frequencies.

To run it:

  1. Select an Image panel, or select an image signal in the Data tab.
  2. In the Selection tab, under Tools, click Fourier filter….
  3. Set the parameters and click Run.
Parameter Meaning Default
Filter Low-pass, High-pass or Band-pass: which frequencies pass Low-pass
Lower cutoff Frequencies below this are removed (high-pass and band-pass), in 1/px from 0 to 0.5 0.05
Upper cutoff Frequencies above this are removed (low-pass and band-pass), in 1/px from 0 to 0.5 0.25

The cutoffs are in cycles per pixel: 0.5 is the finest detail an image can hold. The filter has a soft edge, so the result does not ring.

The filtered image is added as a new signal, for example Lattice (low-pass 0.25), in a folder of its own in the Workspace section of the Data tab, and opens in a new Image panel below the panels already on the canvas. It stays off the timeline: it shares its source’s frames and times.

Changing and re-running a result

Select a tool result (or its folder) in the Data tab. The Selection tab shows its Tool Run section with the Tool and the Source signal and, for the Fourier filter, its Parameters.

  • Click Re-run to compute the result again with the recorded values. An FFT has no parameters, so it shows Re-run only when its result could not be recomputed.
  • If the source signal is no longer in the project, the result has no data. Reload or relink the source (see Projects), then re-run.

Running the same tool on the same image again creates a second, numbered folder rather than replacing the first. Only one tool runs at a time; the Tools buttons are disabled while one is running.