SoMedianFilterProcessing Class Reference
[Smoothing And Denoising]

ImageViz SoMedianFilterProcessing engine More...

#include <ImageViz/Engines/ImageFiltering/SmoothingAndDenoising/SoMedianFilterProcessing.h>

Inheritance diagram for SoMedianFilterProcessing:
SoImageVizEngine SoEngine SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  KernelMode {
  ITERATIVE = 0,
  CUBE = 1,
  BALL = 2
}

Public Member Functions

 SoMedianFilterProcessing ()

Public Attributes

SoSFEnum computeMode
SoSFEnum neighborhood3d
SoSFImageDataAdapter inImage
SoSFInt32 elementSize
SoSFEnum kernelMode
SoImageVizEngineOutput
< SoSFImageDataAdapter,
SoImageDataAdapter * > 
outImage

Detailed Description

ImageViz SoMedianFilterProcessing engine

The SoMedianFilterProcessing engine smoothes the image using morphological operators.

For an introduction to image filters, see section Images Filters.

This module uses morphological operators to set the pixel value to the median for the defined neighborhood. The SoMedianFilterProcessing usually works well when images contain non-Gaussian noise and/or very small artifacts. It does not cause blurring to the same extend as the SoBoxFilterProcessing, but does take considerably longer to execute.

The gray levels of all pixels in the neighborhood are sorted from the smallest value to the largest one. The central pixel in the sort is then the median value, i.e. the value for which there are as many lower gray levels as higher ones. The process may be iterated.

To explain this, consider the array:

$\left[\begin{array}{ccc} 12 & 17 & 15 \\ 20 & 14 & 16 \\ 18 & 19 & 14 \end{array}\right]$

The sorted gray level values will be: 12 14 14 15 17 18 19 20.
The median value is 16, and it will be the value of the output pixel.

The Median filtering considers the lines and then the columns.

SEE ALSO

SoRecursiveExponentialFilterProcessing, SoBoxFilterProcessing.

FILE FORMAT/DEFAULT


Library references: medianfilter medianfilter3d

See related examples:

InteractiveFiltering, InteractiveFloodFill, DenoisingImage2D


Member Enumeration Documentation

Enumerator:
ITERATIVE 

This mode performs an iterative median filtering of the input image.

In 2D: iteratively, a pixel is assigned to the median value in a 3x3 neighborhood around the corresponding pixel in the previous iteration. The same goes in 3D but the neighborhood is controlled by the 3D connectivity (6-, 18- or 26-direct neighbors). In ITERATIVE mode the elementSize field represents the number of iterations. The ITERATIVE mode is recommended to be used with 2D image with an elementSize lower than 3. For greater values, ITERATIVE mode is faster than SQUARE mode but doesn't change significantly the results, while SQUARE mode applies the filter in the effective window size.

CUBE 

This mode specifies a square neighborhood in 2D or a cube neighborhood in 3D.

In 2D, it will produce a square of side 2 x elementSize + 1 pixels. In 3D, it will produce a cube with of size 2 x elementSize + 1 voxels.

BALL 

This mode specifies a disk neighborhood in 2D or a sphere neighborhood in 3D.

In 2D, it will produce a disk with of diameter 2 x + 1 pixels. In 3D, it will produce a spshee of diameter 2 x elementSize + 1 voxels.


Constructor & Destructor Documentation

SoMedianFilterProcessing::SoMedianFilterProcessing (  ) 

Constructor.


Member Data Documentation

Select the compute Mode (2D or 3D or AUTO) Use enum ComputeMode.

Default is MODE_AUTO

The half size of the structuring element.

A structuring element always has an odd side length (3x3, 5x5, etc) which is defined by 2 * elementSize + 1. Default value is 3.

The input grayscale image.

Default value is NULL. Supported types include: grayscale binary label image.

The shape of the 3D neighborhood.

Use enum KernelMode. Default is CUBE

In 3D configuration (see computeMode), the neighborhood connectivity defines the connectivity considered for processing adjacent voxels.

Use enum Neighborhood3d. Default is CONNECTIVITY_26.

The output image.

Default value is NULL. Supported types include: grayscale binary label color image.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/