8.4 Editor: Digital Image Filters

Description:

This editor provides digital image filters for 3D image data sets, such as smoothing, unsharp masking, or morphological operations. Some filters operate in 3D while others are applied to two-dimensional slices. In the latter case, the orientation of the 2D slices can be selected via an option menu. Currently, the following filters are supported:

Figure 52: Editor for applying digital image filters.

Ports:

Filter
Specifies the filter and its domain. It allows you select whether the filter should be applied to the XY, XZ, or YZ slices or to the entire three-dimensional image.

Action
Pressing button Apply starts the computation. The Undo button allows to undo the last filter operation.

8.4.1 Minimum Filter

The minimum filter replaces the value of a pixel by the smallest value of neighboring pixels covered by a NxN mask. The size of the mask can be adjusted via the input field kernel size. A value of 3 denotes a 3x3 mask (respectively 3x3x3 in 3D). If applied to a binary label field the minimum filter implements a so-called erosion operation. It reduces the size of a segmented region by removing pixels from its boundary.

8.4.2 Maximum Filter

The maximum filter replaces the value of a pixel by the largest value of neighboring pixels covered by a NxN mask. The size of the mask can be adjusted via the input field kernel size. A value of 3 denotes a 3x3 mask (respectively 3x3x3 in 3D). If applied to a binary label field the maximum filter implements a so-called dilation operation. It enlarges the size of a segmented region by adding pixels to its boundary.

8.4.3 Unsharp Masking

This filter sharpens an image using an unsharp mask. The unsharp mask is computed by a Gaussian filter of size kernel size.

Then, the smoothed image is subtracted from the original image such that only high contrast remains. The weighted difference of the original image (weight: ) and the blurred image (weight: ) is calculated afterwards using the sharpness parameter c. It determines the relation between original and blurred image effectively controlling the amount of sharpness. can be adjusted via a text input field and should be in the range of 0.6 to 0.8. A value of 1 leaves the image unchanged.

8.4.4 Laplacian Zero-Crossing Filter

The Laplacian filter is a rotation invariant edge detection filter. The algorithm finds zero crossings of the second derivation, i.e. changes of the sign of the first derivation of the "image function" which may indicate an edge.

8.4.5 Median Filter

The median filter is a simple edge-preserving smoothing filter. It may be applied prior to segmentation in order to reduce the amount of noise in an image. The filter works by sorting pixels covered by a NxN mask according to their grey value. The center pixel is then replaced by the median of these pixels, i.e., the middle entry of the sorted list. The size of the pixel mask may be adjusted via the text field labeled kernel size. A value of 3 denotes a 3x3 or mask (respectively 3x3x3 in 3D). An odd value is required.

8.4.6 Gauss Filter

The Gauss filter smooths or blurs an image by performing a convolution operation with a Gaussian filter kernel. The text fields labeled kernel size allow to change the size of the convolution kernel in each dimension. A value of 3 denotes a 3x3 kernel (respectively 3x3x3 in 3D). Odd values are required. The text fields labeled sigma allow to adjust the width of the Gauss function relative to the kernel size.

8.4.7 Sobel Filter

The Sobel-Filter is a rotation variant edge detection filter. It convolutes the image with 4 different filter kernels representing horizontal, vertical and two diagonal orientations. Each kernel is constituted of a combination of gaussian smoothing and the differentiation in the proper orientation.

8.4.8 Histogram Filter

This filter performs a so-called contrast limited adaptive histogram equalization (CLAHE) on the data set. The CLAHE algorithm partitions the images into contextual regions and applies the histogram equalization to each one. This evens out the distribution of used grey values and thus makes hidden features of the image more visible. Parameter Clip Limit determines the contrast limit for the CLAHE algorithm.

8.4.9 Edge-Preserving Smoothing

This is a smoothing filter that models the physical process of diffusion. Similarly to the Gaussian filter, it smooths out the difference between grey levels of neighbouring voxels. This can be interpreted as a diffusion process, in which energy between voxels of high and low energy (grey value) is leveled. In contrary to the Gaussian filter, it does not smear out the edges because the diffusion is reduced or stopped in the vicinity of edges. Thus, edges are preserved.

Note that in the 3D modus the computation can take rather long time if the data is large. A faster preview is always possible by switching to the 2D mode.

The stop time determines how long the diffusion runs. The longer it runs, the smoother the image becomes. The time step determines how accurately this process is sampled.

The contrast parameter determines how much the diffusion process depends on the image gradient, i.e., how much the smoothing is stopped near edges. A value of 0 makes the diffusion independent of the image gradient and smooths out the edges, a large value prevents smoothing in all edge-like regions.

In order to make the diffusion process more stable, the image is prefiltered by a Gaussian filter with parameter sigma. All features of size sigma are removed. This allows to remove noise from the image. But a too large value may also remove relevant features.

8.4.10 Lanczos Filter

The Lanczos filter can be used to sharpen images. It performs a convolution with a Lanczos kernel:



The kernel size in each dimension can be adjusted using the parameter inputs kernel size. A value of 3 denotes a 3x3x3 kernel. Odd values are required.

Parameter Sigma determines the effective size of the Lanczos function. For large values of Sigma the effect of the filter will be a smoothing rather than a sharpening.

8.4.11 Sigmoid Filter

This filter operates on single voxels (kernel size 1) and is used to raise a specific intensity range. This us useful as preprocessing step in image segmentation. The intensity range is described by its center and it width . The target image range is given by the interval [min, max].



8.4.12 Brightness and Contrast Filter

This filter modifies the image brightness by adding an offset to the image values. The contrast is modified by multiplying the difference from the voxel values to the average image intensity.

where is the average (brightness) value in the image.

8.4.13 Moments Filter

This filter calculates the -th centralized moment of the data in a gliding window. The centralized moments of order are defined by:

The second moment () is therefore the local variance in the data. For some data sets this can be used to mask out noisy regions or to detect edges.

Because of the -th power involved the computation you may want to use CastField to do a conversion of your data set to floats or doubles first.