SoMedianFilterProcessing engine More...
#include <ImageViz/Engines/ImageFiltering/SmoothingAndDenoising/SoMedianFilterProcessing.h>
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 |
Deprecated | |
| |
enum | KernelType { SEPARABLE = 0, STANDARD = 1 } |
SoDEPRECATED SoSFEnum | kernelType |
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:
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 separable mode performs a Median filtering considering the lines and then the columns.
SoGaussianFilterProcessing, SoRecursiveExponentialFilterProcessing, SoBoxFilterProcessing.
computeMode | MODE_AUTO |
neighborhood3d | CONNECTIVITY_26 |
kernelType | STANDARD |
inImage | NULL |
elementSize | 3 |
kernelMode | ITERATIVE |
InteractiveFiltering, InteractiveFloodFill, DenoisingImage2D
SoMedianFilterProcessing::SoMedianFilterProcessing | ( | ) |
Constructor.
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 ITERATIVE
SoDEPRECATED SoSFEnum SoMedianFilterProcessing::kernelType |
Kernel type for median filter.
Use enum KernelType. Default is STANDARD
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.