ffilter

Overview

ffilter applies a cylindrically symmetric filter to two-dimensional or three-dimensional data. The filter can be one of the following:

The program has a command line interface and a graphical front end. The parameters needed for either are listed below under the Topics list. Certain operations, such as selecting a region to process and starting processing from the graphical interface, are described in BatchRegion.html since several applications use the same mechanism for those operations.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format

Related Priism Topics

Batch processing | Deconvolution | Filter2D (spatial) | Filter3D (spatial) | Filter 2D (frequency) | Filter 3D (frequency) | Priism


OTF file

When the OTF file name is none, then either a bandpass filter or the product of a Gaussian smoothing filter and an enhancing filter is applied to the input. Otherwise, the OTF file is read to calculated a cylindrically symmetric transfer function. This transfer function is either inverted, if the enhancement factor is non-zero, or taken as is. It is then combined with the smoothing filter and applied to input.

The OTF file should be in the same format as a CTF file for decon, i.e. it should be an image file with one or more wavelengths and one section per wavelength. The x dimension of the section corresponds to the z frequency axis with the zero frequency term at an x index of zero, the positive Nyquist frequency at an x index of nx / 2, and the negative frequencies in increasing order after that. The y axis corresponds to the radial frequency and only the positive frequency components are present. The x and y pixel spacings in the header should be in units of cycles / u where u is the unit chosen for the x and y spacings in the input file (u is typically microns for OM data and nanometers for EM data). If the input has a wavelength that doesn not match a wavelength in the OTF file, the OTF for the closest available wavelength is stretched by a factor of

     closest_wavelength / input_wavelength

and then interpolated to the frequencies present in the input.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Bandpass

One of the filter options is a bandpass filter with a flat frequency between the two cutoff frequencies, and a Gaussian rolloff with a sigma of one-tenth the range between the cutoff frequencies. The cutoff frequencies are specified in terms of the spatial resolution limits, res1 and res2. Use the Bandpass (res min,max) field in the graphical interface or -bandpass=res1:res2 to set the resolution limits. When both resolution limits are zero (which is the default), tbe bandpass filter is not used.

The bandpass parameters are ignored when an OTF file is specified.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Enhancement

When the bandpass filter is not used and an OTF is not supplied, there is the option to apply an enhancement filter whose frequency response is

     1.0 - exp(r^2 / (2 * (1.001 - s)^2))

where r is the magnitude of the frequency and s is the value supplied in the Enhancement field in the graphical user interface or with the -enhance=s option on the command line.

When an OTF is supplied, a non-zero value for the enhancement factor signals that the filter should be the inverse filter with a frequency response at kr and kz of the form:

    1.0 / (OTF(kr, kz) + s)

where s is the enhancement factor.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Smoothing

When the bandpass filter is not used, there is the option to apply a Gaussian smoothing filter. The sigma, in cycles per pixel, for the filter in the frequency domain is

     0.05 + .3 * (1 - s)

where s is the value set in the Smoothing field in the graphical interface or by -smooth=s on the command-line. When s is zero, no smoothing filter is applied.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Mixing input/filtered

A constant term, c, can be added to each element of the filter in the frequency domain; the effect of this is to add the input data scaled by the constant to the filtered result. In the graphical interface, set the constant by changing the value in the field labeled Fraction original image; on the command line set it with -fraction=c.

Adding the constant to the filter takes place before the filter is normalized or adjusted to preserve the mean.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Two-dimensional

To force the filtering to be done a section by section basis rather than on each 3D volume, turn on the Force Processing as 2D data toggle in the graphical interface or supply -twod on the command-line.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Border rolloff

To smooth (taper) the data for each section to reduce the sharpness of the transitions at the edges of a section, there is the option to smooth n pixels along each edge. The value of n is set from the Border rolloff field in the Special Parameters menu of the graphical interface or with -apodize=n on the command-line.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Z size

When performing 3D filtering, the data can be padded with additional sections to improve performance (z sizes which are divisible by small primes are more efficient) and to change edge effects. n, the total z size (stack plus padding) is set by the Size for Z transforms field in the graphical interface and by -nzpad=n on the command-line.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Normalize CTF

When the Normalize CTF toggle is on in the graphical interface or -norm is supplied as an option on the command-line, the filter is scaled so the average frequency response is one. This is done before the filter is modified to preserve the mean.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Preserve mean

Turning on the Preserve mean toggle in the Special Parameters menu or supplying an -orig option on the command line will alter the filter so the mean of each 3D stack (or 2D section for two-dimensional processing) is unchanged by the filtering process.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format


Output format

By default, the filter output is saved in the same pixel format as the input. In the graphical interface, turn on the Force floating-point toggle in the Special Parameters menu to force the output to be written in a floating-point format. On the command-line, add -mode2 to the list of options.

Topics

Overview | OTF file | Bandpass | Enhancement | Smoothing | Mixing input/filtered | Two-dimensional | Border rolloff | Z size | Normalize CTF | Preserve mean | Output format