# Simple Filters

## Overview

The SimpleFilters module provides a simple interface to hundreds of basic and advanced filters from ITK.

The algorithms available include binary morphology, grayscale morphology, denoising, thresholding, image intensity manipulation, region growing, FFT, and many advanced algorithms.

## Panels and their use

**Filters**section at the top enables the selection of one of the hundred of filters available. The**Search**text box is use quickly find a filter based on it’s name.**Parameters**section dynamically changes based of the Filter selected above, it presents a list of input filter and parameters which the filter needs. Along with the output image for the filter.**Apply**button at the bottom runs the filter.**Cancel**button can be used to stop a running filter.**Restore Defaults**button revert the filter parameters to their initial settings.**LabelMap**checkbox indicates if the selected output volume is a labelmap. This can be used for verifying if the selected output volume is appropriate for storing the filtering result.

Note

Most filters which take more than one image as input expect that all the inputs are of the same pixel type, and the images occupy the same physical space.

Tip

Many filters only work on `float`

pixel type. When an `integer`

image is used as input, the `Exception thrown... Pixel type: ... integer is not supported...`

error message is displayed. To use such filters, the pixel type can be converted to `float`

using Cast Scalar Volume module.

## Filters

Filter name | Description |
---|---|

AbsImageFilter | Computes the absolute value of each pixel. |

AbsoluteValueDifferenceImageFilter | Implements pixel-wise the computation of absolute value difference. |

AcosImageFilter | Computes the inverse cosine of each pixel. |

AdaptiveHistogramEqualizationImageFilter | Power Law Adaptive Histogram Equalization. |

AddImageFilter | Pixel-wise addition of two images. |

AndImageFilter | Implements the AND bitwise operator pixel-wise between two images. |

AntiAliasBinaryImageFilter | A method for estimation of a surface from a binary volume. |

ApproximateSignedDistanceMapImageFilter | Create a map of the approximate signed distance from the boundaries of a binary image. |

AsinImageFilter | Computes the sine of each pixel. |

Atan2ImageFilter | Computes two argument inverse tangent. |

AtanImageFilter | Computes the one-argument inverse tangent of each pixel. |

BilateralImageFilter | Blurs an image while preserving edges. |

BinShrinkImageFilter | Reduce the size of an image by an integer factor in each dimension while performing averaging of an input neighborhood. |

BinaryClosingByReconstructionImageFilter | binary closing by reconstruction of an image. |

BinaryContourImageFilter | Labels the pixels on the border of the objects in a binary image. |

BinaryDilateImageFilter | Fast binary dilation. |

BinaryErodeImageFilter | Fast binary erosion. |

BinaryFillholeImageFilter | Remove holes not connected to the boundary of the image. |

BinaryGrindPeakImageFilter | Remove the objects not connected to the boundary of the image. |

BinaryMagnitudeImageFilter | Computes the square root of the sum of squares of corresponding input pixels. |

BinaryMedianImageFilter | Applies a version of the median filter optimized for binary images. |

BinaryMinMaxCurvatureFlowImageFilter | Denoise a binary image using min/max curvature flow. |

BinaryMorphologicalClosingImageFilter | binary morphological closing of an image. |

BinaryMorphologicalOpeningImageFilter | binary morphological opening of an image. |

BinaryNotImageFilter | Implements the BinaryNot logical operator pixel-wise between two images. |

BinaryOpeningByReconstructionImageFilter | binary morphological closing of an image. |

BinaryProjectionImageFilter | Binary projection. |

BinaryReconstructionByDilationImageFilter | binary reconstruction by dilation of an image |

BinaryReconstructionByErosionImageFilter | binary reconstruction by erosion of an image |

BinaryThinningImageFilter | This filter computes one-pixel-wide edges of the input image. |

BinaryThresholdImageFilter | Binarize an input image by thresholding. |

BinaryThresholdProjectionImageFilter | BinaryThreshold projection. |

BinomialBlurImageFilter | Performs a separable blur on each dimension of an image. |

BitwiseNotImageFilter | Implements pixel-wise generic operation on one image. |

BlackTopHatImageFilter | Black top hat extract local minima that are smaller than the structuring element. |

BoundedReciprocalImageFilter | Computes 1/(1+x) for each pixel in the image. |

BoxMeanImageFilter | Implements a fast rectangular mean filter using the accumulator approach. |

BoxSigmaImageFilter | Implements a fast rectangular sigma filter using the accumulator approach. |

CannyEdgeDetectionImageFilter | This filter is an implementation of a Canny edge detector for scalar-valued images. Based on John Canny's paper "A Computational Approach to Edge Detection""" |

CastImageFilter | Casts input image's pixels to output pixel type. |

CheckerBoardImageFilter | Combines two images in a checkerboard pattern. |

ClampImageFilter | Casts input pixels to output pixel type and clamps the output pixel values to a specified range. |

ClosingByReconstructionImageFilter | Closing by reconstruction of an image. |

ComplexToImaginaryImageFilter | Computes pixel-wise the imaginary part of a complex image. |

ComplexToModulusImageFilter | Computes pixel-wise the Modulus of a complex image. |

ComplexToPhaseImageFilter | Computes pixel-wise the modulus of a complex image. |

ComplexToRealImageFilter | Computes pixel-wise the real(x) part of a complex image. |

ComposeImageFilter | ComposeImageFiltercombine several scalar images into a multicomponent image. |

ConfidenceConnectedImageFilter | Segment pixels with similar statistics using connectivity. |

ConnectedComponentImageFilter | Label the objects in a binary image. |

ConnectedThresholdImageFilter | Label pixels that are connected to a seed and lie within a range of values. |

ConstantPadImageFilter | Increase the image size by padding with a constant value. |

ConvolutionImageFilter | Convolve a given image with an arbitrary image kernel. |

CosImageFilter | Computes the cosine of each pixel. |

CropImageFilter | Decrease the image size by cropping the image by an itk::Sizeat both the upper and lower bounds of the largest possible region. |

CurvatureAnisotropicDiffusionImageFilter | Performs anisotropic diffusion on a scalar image using the modified curvature diffusion equation (MCDE). |

CurvatureFlowImageFilter | Denoise an image using curvature driven flow. |

CyclicShiftImageFilter | Perform a cyclic spatial shift of image intensities on the image grid. |

DanielssonDistanceMapImageFilter | This filter computes the distance map of the input image as an approximation with pixel accuracy to the Euclidean distance. |

DerivativeImageFilter | Computes the directional derivative of an image by convolution with a derivative operator of user-specified order. |

DilateObjectMorphologyImageFilter | dilation of an object in an image |

DiscreteGaussianDerivativeImageFilter | Calculates image derivatives using discrete derivative Gaussian kernels. |

DiscreteGaussianImageFilter | Blurs an image by separable convolution with discrete gaussian kernels. |

DivideFloorImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

DivideImageFilter | Pixel-wise division of two images. |

DivideRealImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

DoubleThresholdImageFilter | Binarize an input image using double thresholding. |

EdgePotentialImageFilter | Computes the edge potential of an image from the image gradient. |

EqualImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

ErodeObjectMorphologyImageFilter | Erosion of an object in an image. |

ExpImageFilter | Computes the exponential function of each pixel. |

ExpNegativeImageFilter | Computes the function exp(-K.x) for each input pixel. |

ExpandImageFilter | Expand the size of an image by an integer factor in each dimension. |

ExtractImageFilter | Decrease the image size by cropping the image to the selected region bounds. |

FFTConvolutionImageFilter | Convolve a given image with an arbitrary image kernel using multiplication in the Fourier domain. |

FFTNormalizedCorrelationImageFilter | Calculate normalized cross correlation using FFTs. |

FFTShiftImageFilter | Shift the zero-frequency components of a Fourier transform to the center of the image. |

FastApproximateRankImageFilter | A separable rank filter. |

FastMarchingImageFilter | Solve an Eikonal equation using Fast Marching. |

FlipImageFilter | Flips an image across user specified axes. |

ForwardFFTImageFilter | Base class for forward Fast Fourier Transform. |

GaborImageSource | Generate an n-dimensional image of a Gabor filter. |

GaussianImageSource | Generate an n-dimensional image of a Gaussian. |

GeodesicActiveContourLevelSetImageFilter | Segments structures in images based on a user supplied edge potential map. |

GradientAnisotropicDiffusionImageFilter | Performs anisotropic diffusion on a scalar image using the classic Perona-Malik, gradient magnitude based equation. |

GradientImageFilter | Computes the gradient of an image using directional derivatives. |

GradientMagnitudeImageFilter | Computes the gradient magnitude of an image region at each pixel. |

GradientMagnitudeRecursiveGaussianImageFilter | Computes the Magnitude of the Gradient of an image by convolution with the first derivative of a Gaussian. |

GradientRecursiveGaussianImageFilter | Computes the gradient of an image by convolution with the first derivative of a Gaussian. |

GrayscaleConnectedClosingImageFilter | Enhance pixels associated with a dark object (identified by a seed pixel) where the dark object is surrounded by a brighter object. |

GrayscaleConnectedOpeningImageFilter | Enhance pixels associated with a bright object (identified by a seed pixel) where the bright object is surrounded by a darker object. |

GrayscaleDilateImageFilter | gray scale dilation of an image |

GrayscaleErodeImageFilter | gray scale dilation of an image |

GrayscaleFillholeImageFilter | Remove local minima not connected to the boundary of the image. |

GrayscaleGeodesicDilateImageFilter | geodesic gray scale dilation of an image |

GrayscaleGeodesicErodeImageFilter | geodesic gray scale erosion of an image |

GrayscaleGrindPeakImageFilter | Remove local maxima not connected to the boundary of the image. |

GrayscaleMorphologicalClosingImageFilter | gray scale dilation of an image |

GrayscaleMorphologicalOpeningImageFilter | gray scale dilation of an image |

GreaterEqualImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

GreaterImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

GridImageSource | Generate an n-dimensional image of a grid. |

HConcaveImageFilter | Identify local minima whose depth below the baseline is greater than h. |

HConvexImageFilter | Identify local maxima whose height above the baseline is greater than h. |

HMaximaImageFilter | Suppress local maxima whose height above the baseline is less than h. |

HMinimaImageFilter | Suppress local minima whose depth below the baseline is less than h. |

HalfHermitianToRealInverseFFTImageFilter | Base class for specialized complex-to-real inverse Fast Fourier Transform. |

HausdorffDistanceImageFilter | Computes the Hausdorff distance between the set of non-zero pixels of two images. |

HistogramMatchingImageFilter | Normalize the grayscale values between two images by histogram matching. |

HuangThresholdImageFilter | Threshold an image using the Huang Threshold. |

IntensityWindowingImageFilter | Applies a linear transformation to the intensity levels of the input Imagethat are inside a user-defined interval. |

IntermodesThresholdImageFilter | Threshold an image using the Intermodes Threshold. |

InverseDeconvolutionImageFilter | The direct linear inverse deconvolution filter. |

InverseFFTImageFilter | Base class for inverse Fast Fourier Transform. |

InvertIntensityImageFilter | Invert the intensity of an image. |

IsoContourDistanceImageFilter | Compute an approximate distance from an interpolated isocontour to the close grid points. |

IsoDataThresholdImageFilter | Threshold an image using the IsoData Threshold. |

IsolatedConnectedImageFilter | Label pixels that are connected to one set of seeds but not another. |

IsolatedWatershedImageFilter | Isolate watershed basins using two seeds. |

JoinSeriesImageFilter | Join N-D images into an (N+1)-D image. |

KittlerIllingworthThresholdImageFilter | Threshold an image using the KittlerIllingworth Threshold. |

LabelContourImageFilter | Labels the pixels on the border of the objects in a labeled image. |

LabelOverlayImageFilter | Apply a colormap to a label image and put it on top of the input image. |

LabelToRGBImageFilter | Apply a colormap to a label image. |

LabelVotingImageFilter | Performs pixelwise voting among an arbitrary number of input images, where each of them represents a segmentation of the same image. |

LandweberDeconvolutionImageFilter | Deconvolve an image using the Landweber deconvolution algorithm. |

LaplacianImageFilter | This filter computes the Laplacian (i.e., the 2nd spatial derivative) of a scalar-valued image. |

LaplacianRecursiveGaussianImageFilter | Computes the Laplacian of Gaussian (LoG) of an image. |

LaplacianSegmentationLevelSetImageFilter | Segments structures in images based on a second derivative image features. |

LaplacianSharpeningImageFilter | This filter sharpens an image using a Laplacian to to enhance rapid intensity change and therefore the edges. |

LessEqualImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

LessImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

LiThresholdImageFilter | Threshold an image using the Li Threshold. |

Log10ImageFilter | Computes the log10 of each pixel. |

LogImageFilter | Computes the log() of each pixel. |

MagnitudeAndPhaseToComplexImageFilter | Implements pixel-wise conversion of magnitude and phase data into complex voxels. |

MaskImageFilter | Mask an image with a mask. |

MaskNegatedImageFilter | Mask an image with the negative of a mask. |

MaskedFFTNormalizedCorrelationImageFilter | Calculate masked normalized cross correlation using FFTs. |

MaximumEntropyThresholdImageFilter | Threshold an image using the MaximumEntropy Threshold. |

MaximumImageFilter | Implements a pixel-wise operator Max(a,b) between two images. |

MaximumProjectionImageFilter | Maximum projection. |

MeanImageFilter | Applies an averaging filter to an image. |

MeanProjectionImageFilter | Mean projection. |

MedianImageFilter | Applies a median filter to an image. |

MedianProjectionImageFilter | Median projection. |

MinMaxCurvatureFlowImageFilter | Denoise an image using min/max curvature flow. |

MinimumImageFilter | Implements a pixel-wise operator Min(a,b) between two images. |

MinimumMaximumImageFilter | Computes the minimum and the maximum intensity values of an image. |

MinimumProjectionImageFilter | Minimum projection. |

MirrorPadImageFilter | Increase the image size by padding with replicants of the input image value. |

ModulusImageFilter | Computes the modulus (x % dividend) pixel-wise. |

MomentsThresholdImageFilter | Threshold an image using the Moments Threshold. |

MorphologicalGradientImageFilter | gray scale dilation of an image |

MorphologicalWatershedFromMarkersImageFilter | Morphological watershed transform from markers. |

MorphologicalWatershedImageFilter | Watershed segmentation implementation with morphological operators. |

MultiplyImageFilter | Pixel-wise multiplication of two images. |

N4BiasFieldCorrectionImageFilter | Implementation of the N4 bias field correction algorithm. |

NaryAddImageFilter | Pixel-wise addition of N images. |

NaryMaximumImageFilter | Computes the pixel-wise maximum of several images. |

NeighborhoodConnectedImageFilter | Label pixels that are connected to a seed and lie within a neighborhood. |

NoiseImageFilter | Calculate the local noise in an image. |

NormalizeImageFilter | Normalize an image by setting its mean to zero and variance to one. |

NormalizeToConstantImageFilter | Scales image pixel intensities to make the sum of all pixels equal a user-defined constant. |

NormalizedCorrelationImageFilter | Computes the normalized correlation of an image and a template. |

NotEqualImageFilter | Implements pixel-wise generic operation of two images, or of an image and a constant. |

NotImageFilter | Implements the NOT logical operator pixel-wise on an image. |

OpeningByReconstructionImageFilter | Opening by reconstruction of an image. |

OrImageFilter | Implements the OR bitwise operator pixel-wise between two images. |

OtsuMultipleThresholdsImageFilter | Threshold an image using multiple Otsu Thresholds. |

OtsuThresholdImageFilter | Threshold an image using the Otsu Threshold. |

PasteImageFilter | Paste an image into another image. |

PatchBasedDenoisingImageFilter | Derived class implementing a specific patch-based denoising algorithm, as detailed below. |

PermuteAxesImageFilter | Permutes the image axes according to a user specified order. |

PhysicalPointImageSource | Generate an image of the physical locations of each pixel. |

PowImageFilter | Computes the powers of 2 images. |

ProjectedLandweberDeconvolutionImageFilter | Deconvolve an image using the projected Landweber deconvolution algorithm. |

RankImageFilter | Rank filter of a greyscale image. |

RealAndImaginaryToComplexImageFilter | ComposeImageFiltercombine several scalar images into a multicomponent image. |

RealToHalfHermitianForwardFFTImageFilter | Base class for specialized real-to-complex forward Fast Fourier Transform. |

ReconstructionByDilationImageFilter | grayscale reconstruction by dilation of an image |

ReconstructionByErosionImageFilter | grayscale reconstruction by erosion of an image |

RecursiveGaussianImageFilter | Base class for computing IIR convolution with an approximation of a Gaussian kernel. |

RegionOfInterestImageFilter | Extract a region of interest from the input image. |

RegionalMaximaImageFilter | Produce a binary image where foreground is the regional maxima of the input image. |

RegionalMinimaImageFilter | Produce a binary image where foreground is the regional minima of the input image. |

RelabelComponentImageFilter | Relabel the components in an image such that consecutive labels are used. |

RenyiEntropyThresholdImageFilter | Threshold an image using the RenyiEntropy Threshold. |

ResampleImageFilter | Resample an image via a coordinate transform. |

RescaleIntensityImageFilter | Applies a linear transformation to the intensity levels of the input Image. |

RichardsonLucyDeconvolutionImageFilter | Deconvolve an image using the Richardson-Lucy deconvolution algorithm. |

STAPLEImageFilter | Simultaneous Truth and Performance Level Estimation (STAPLE) algorithm for generating one segmentation from a set of segmentations. |

ScalarChanAndVeseDenseLevelSetImageFilter | Dense implementation of the Chan and Vese multiphase level set image filter. |

ScalarConnectedComponentImageFilter | A connected components filter that labels connected regions in an arbitrary image. |

ScalarImageKmeansImageFilter | Classifies the intensity values of a scalar image using the K-Means algorithm. |

ScalarToRGBColormapImageFilter | Implements pixel-wise intensity->rgb mapping operation on one image. |

ShanbhagThresholdImageFilter | Threshold an image using the Shanbhag Threshold. |

ShapeDetectionLevelSetImageFilter | Segments structures in images based on a user supplied edge potential map. |

ShiftScaleImageFilter | Shift and scale the pixels in an image. |

ShrinkImageFilter | Reduce the size of an image by an integer factor in each dimension. |

SigmoidImageFilter | Computes the sigmoid function pixel-wise. |

SignedDanielssonDistanceMapImageFilter | Computes the signed distance map of the input image as an approximation with pixel accuracy to the Euclidean distance. |

SignedMaurerDistanceMapImageFilter | This filter calculates the Euclidean distance transform of a binary image in linear time for arbitrary dimensions. |

SimilarityIndexImageFilter | Measures the similarity between the set of non-zero pixels of two images. |

SimpleContourExtractorImageFilter | Computes an image of contours which will be the contour of the first image. |

SinImageFilter | Computes the sine of each pixel. |

SliceImageFilter | Slices an image based on a starting index and a stopping index, and a step size. |

SmoothingRecursiveGaussianImageFilter | Computes the smoothing of an image by convolution with the Gaussian kernels implemented as IIR filters. |

SobelEdgeDetectionImageFilter | A 2D or 3D edge detection using the Sobel operator. |

SqrtImageFilter | Computes the square root of each pixel. |

SquareImageFilter | Computes the square of the intensity values pixel-wise. |

SquaredDifferenceImageFilter | Implements pixel-wise the computation of squared difference. |

StandardDeviationProjectionImageFilter | Mean projection. |

SubtractImageFilter | Pixel-wise subtraction of two images. |

SumProjectionImageFilter | Sum projection. |

TanImageFilter | Computes the tangent of each input pixel. |

TernaryAddImageFilter | Pixel-wise addition of three images. |

TernaryMagnitudeImageFilter | Pixel-wise addition of three images. |

TernaryMagnitudeSquaredImageFilter | Pixel-wise addition of three images. |

ThresholdImageFilter | Set image values to a user-specified value if they are below, above, or between simple threshold values. |

ThresholdMaximumConnectedComponentsImageFilter | Finds the threshold value of an image based on maximizing the number of objects in the image that are larger than a given minimal size. |

ThresholdSegmentationLevelSetImageFilter | Segments structures in images based on intensity values. |

TikhonovDeconvolutionImageFilter | An inverse deconvolution filter regularized in the Tikhonov sense. |

TileImageFilter | Tile multiple input images into a single output image. |

TriangleThresholdImageFilter | Threshold an image using the Triangle Threshold. |

UnaryMinusImageFilter | Computes the negative of each pixel. |

ValuedRegionalMaximaImageFilter | Transforms the image so that any pixel that is not a regional maxima is set to the minimum value for the pixel type. |

ValuedRegionalMinimaImageFilter | Transforms the image so that any pixel that is not a regional minima is set to the maximum value for the pixel type. |

VectorConfidenceConnectedImageFilter | Segment pixels with similar statistics using connectivity. |

VectorConnectedComponentImageFilter | A connected components filter that labels the objects in a vector image. |

VectorIndexSelectionCastImageFilter | Extracts the selected index of the vector that is the input pixel type. |

VectorMagnitudeImageFilter | Take an image of vectors as input and produce an image with the magnitude of those vectors. |

VotingBinaryHoleFillingImageFilter | Fills in holes and cavities by applying a voting operation on each pixel. |

VotingBinaryImageFilter | Applies a voting operation in a neighborhood of each pixel. |

VotingBinaryIterativeHoleFillingImageFilter | Fills in holes and cavities by iteratively applying a voting operation. |

WarpImageFilter | Warps an image using an input displacement field. |

WhiteTopHatImageFilter | White top hat extract local maxima that are larger than the structuring element. |

WienerDeconvolutionImageFilter | Restores an image convolved with a blurring kernel while keeping noise enhancement to a minimum. |

WrapPadImageFilter | Increase the image size by padding with replicants of the input image value. |

XorImageFilter | Computes the XOR bitwise operator pixel-wise between two images. |

YenThresholdImageFilter | Threshold an image using the Yen Threshold. |

ZeroCrossingBasedEdgeDetectionImageFilter | This filter implements a zero-crossing based edge detecor. |

ZeroCrossingImageFilter | This filter finds the closest pixel to the zero-crossings (sign changes) in a signed image. |

ZeroFluxNeumannPadImageFilter | Increase the image size by padding according to the zero-flux Neumann boundary condition. |

## Information for developers

Source code of the module is available at https://github.com/SimpleITK/SlicerSimpleFilters.

## Contributors

Bradley Lowekamp

Steve Pieper

Jean-Cristophe Fillion Robin

## Acknowledgements

This work is supported by NLM, and the Slicer Community.