Image Processing

Various kinds of simple filters can be applied with these controls. The filter will always be applied to the current section. Note that many of these filters can be applied to a whole image stack through the Clip program.

Image data are always analyzed as 8-bit bytes, even when they have been loaded into the program as 16-bit integers. In the latter case, the current setting of the Low and High sliders in the Information window determines how data are scaled to bytes. For best results, be sure that the Low and High sliders are set so that images have a good contrast with a fairly wide range between the Black and White sliders. Using the autocontrast function generally leaves the sliders in positions that will allow good scaling when processing.


General Controls
Fourier Filtering
Fourier Transforms
Smoothing
Median Filtering
Anisotropic Diffusion

General Controls

Single-click in the list of filters to select the current filter to be applied to the data; in some cases there will be further parameters to select.

Pressing the Apply button or the a hot key will apply the current filter to the ORIGINAL image data. Double-clicking in the filter list is the same as pressing the Apply button.

Pressing the More button or the b hot key will apply the filter to the CURRENT image data, as modified by previous filter operations.

Pressing the Reset button, applying a filter to a different section, closing the window with Done, or flipping the data volume will all restore the original image data for a section, unless you press the Save button. Save will permanently replace the image data in memory with the processed data.

If Autoapply is checked, the program will automatically apply the current filter to a new section when the section is changed. This will happen only if the section being left has been filtered.

Fourier Filtering

The Fourier filter is done by taking Fourier transforms and its parameters are the radius and sigma parameters used in several other IMOD programs. Namely, the Low frequency sigma is the sigma of an inverted Gaussian starting at the origin, used to attenuate low frequencies. Low pass filtering is done with a Gaussian starting at the High-frequency cutoff and with a sigma given by the High-frequency falloff. The units are cycles per pixel, ranging from 0 to 0.5. The same filtering can be done at the command line with "mtffilter -high sigma -low cutoff,falloff", where "sigma", "cutoff", and "falloff" are the values used in this panel.

Fourier Transforms

To take a Fourier transform (FFT), the program will pad the image into a square array slightly larger than the original image, taper the image at its edges to minimize edge artifacts, take the FFT, apply log scaling, and clip out the portion that fits into the original image size. For a non-square image, the FFT will thus be isotropic (X and Y scales the same) but truncated in one dimension. The panel will show the range of frequencies that appear in the X and Y dimensions. Binning can be used to see the whole transform for a non-square image, and also to reduce noise and execution time. With binning, the smaller FFT will be embedded into a black background.

To do an FFT of a subregion, turn on Use Zap window subarea. If the rubber band is on in the active Zap window, the FFT will be taken of the area inside the rubber band. Otherwise, the area used will be the portion of the image showing in the window.

The Compute frequency button can be used to determine the frequency at a particular location in the FFT. First, click on that location with the first mouse button, or deposit a model point there, then press the button. If you are in model mode and there is a current model point, its position will be used; otherwise the current image position is used. The current image position is rounded to the nearest pixel while a model point can provide subpixel accuracy if needed. The program will compute the frequency in reciprocal pixels then divide by the pixel size in the model header to get the frequency that is show (e.g., reciprocal nanometers). The inverse of this value is also shown to provide a resolution value in real space units.

The panel also shows the scale that is used to convert from pixels in the FFT to frequency units.

Smoothing

Smoothing replaces each pixel by a weighted sum of neighboring pixels. The image is multiplied by a small square matrix of weighting values, called a kernel. The standard smoothing filter uses a 3x3 kernel with weights:
    1  2  1
    2  4  2
    1  2  1
A Gaussian function can be used for the weights if a standard deviation for the Gaussian is set in the Kernel sigma spin box. Initially this box shows None, which means that the standard kernel will be used. The latter gives the same result as a kernel sigma of 0.85 pixel. The lowest sigma value available is 0.5 pixel, since values below this give insignificant filtering. Note that this sigma specifies pixels in real space, unlike the sigmas in Fourier filtering. The program uses a 3x3 kernel for sigma up to 1.0, a 5x5 kernel for sigma up to 2.0, and a 7x7 kernel for higher sigma values. The computation will take longer with the larger kernels.

The Rescale to match min/max makes the rescaling that happens after many kinds of filtering optional for smoothing. This rescaling may make the intensities vary from section to section, since it is based on the minimum and maximum rather than a more robust measure like standard deviation. Such variation can be a problem when using the Edit - Contour - Auto window because it would make the threshold vary unpredictably, so it is recommended that this option be turned off if smoothing is used with autocontouring.

Median Filtering

Median filtering replaces each pixel by the median value of neighboring pixels, where the Size parameter determines the size of the block of pixels. The default is to do the filtering in 3D, and take the median in a cube of voxels. Filtering in 2D, considering only the pixels on the current section, can be done if you turn off Compute median in 3D cube. With 2D filtering, you can iterate by pressing More. However, with 3D filtering, pressing More will not have much effect and will not be the same as iterative filtering in 3D, because only the central slice has been filtered.

Anisotropic Diffusion

This panel provides parameters for running a simple anisotropic diffusion algorithm using the Perona and Malik filtering method, based on a program by Alejandro Canterero. The gradients in this method are simply pixel-to-pixel differences. The ratio between these pixel-to-pixel differences and the threshold K determines how much diffusion is allowed between pixels. Note that much better results will generally be achieved with Nad_eed_3d, There is an interface for using that method in eTomo, available through the File-Parallel Processing menu entry.

The Edge Stopping Function radio buttons allow you to choose between the Rational edge stopping function and the Tukey biweight stopping function, which correspond to options -cc 2 and -cc 3, respectively, in Clip. The Tukey biweight will preserve more local structure than the rational edge stopping function.

The Iterations value controls how many iterations are run when Apply or More is pressed. The total number of iterations done is also reported. The routine will give the identical result if a certain number of iterations are done with multiple steps using More rather than all at once.

The K entry sets a threshold for the edge stopping function; when the number is too low virtually nothing will happen. The rational edge function may require smaller values than the Tukey biweight. The unscaled value is the number that should be specified with the -k option in Clip to achieve the same filtering on the raw data from the image file as is seen on the scaled byte data in 3dmod.

The Lambda value controls the so-called time-step; if images become noisier this probably needs to be reduced.

Help Index