Plugin type: 2dimage/filter
Prev | Chapter 3. Plugin Reference | Next

## Plugin type: 2dimage/filter

These plug-ins provide 2D image filters. Unless otherwise noted, they take a gray scale image of abitrary pixel type as input, process it and return the result as newly created image. Filters can be chained by specifying more then one filter description concated with the '+' sign. for example bandpass:min=10,max=20+median:w=3+convert:repn=ushort:map=copy' will create a filter chain that first runs a bandpass, then a median filter and a conversion to unsigned short values by a plain copy.

#### Plugins:

adaptmed admean aniso bandpass binarize close combiner convert crop dilate distance downscale erode gauss gradnorm invert kmeans label labelmap labelscale load mask maxflow mean meanvar median medianmad mlv ngfnorm noise open pruning regiongrow sandp scale selectbig sepconv shmean sobel sort-label sws tee thinning thresh tmean transform ws

##### adaptmed

2D image adaptive median filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [1, inf) | 2 | half filter width

##### admean

An adaptive mean filter that works like a normal mean filter, if the intensity variation within the filter mask is lower then the intensity variation in the whole image, that the uses a special formula if the local variation is higher then the image intensity variation.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [1, inf) | 1 | half filter width

##### aniso

2D Anisotropic image filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
epsilon | float in (0, inf) | 1 | iteration change threshold
iter | int in [1, 10000] | 100 | number of iterations
k | float in [0, 100] | -1 | k the noise threshold (<=0 -> adaptive)
n | set | 8 | neighbourhood Supported values are:(4, 8, )

psi

dict

tuckey

edge stopping function
tuckey: | tukey stopping function
pm1: | stopping function 1
guess: | test stopping function
pm2: | stopping function 2

##### bandpass

intensity bandpass filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
max | float | 3.40282e+38 | maximum of the band
min | float | 0 | minimum of the band

##### binarize

image binarize filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
max | float | 3.40282e+38 | maximum of accepted range
min | float | 0 | minimum of accepted range

##### close

morphological close. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
hint | set | black | a hint at the main image content Supported values are:(black, white, )
shape | factory | [sphere:r=2] | structuring element. For supported plug-ins see Plugin type: 2dimage/shape

##### combiner

Combine two images with the given combiner operator. if 'reverse' is set to false, the first operator is the image passed through the filter pipeline, and the second image is loaded from the file given with the 'image' parameter the moment the filter is run.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
image | io | (input,required) | second image that is needed in the combiner. For supported file types see Plugin type: 2dimage/io
op | factory | (required) | Image combiner to be applied to the images. For supported plug-ins see Plugin type: 2dimage/combiner
reverse | bool | 0 | reverse the order in which the images passed to the combiner

##### convert

image pixel format conversion filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
a | float | 1 | linear conversion parameter a
b | float | 0 | linear conversion parameter b

map

dict

opt

conversion mapping
copy: | copy data when converting
linear: | apply linear transformation x -> a*x+b
range: | apply linear transformation that maps the input data type range to the output data type range
opt: | apply a linear transformation that maps the real input range to the full output range
optstat: | apply a linear transform that maps based on input mean and variation to the full output range

repn

dict

ubyte

output pixel type
bit: | binary data
sbyte: | signed 8 bit
ubyte: | unsigned 8 bit
sshort: | signed 16 bit
ushort: | unsigned 16 bit
sint: | signed 32 bit
uint: | unsigned 32 bit
slong: | signed 64 bit
ulong: | unsigned 64 bit
float: | floating point 32 bit
double: | floating point 64 bit
none: | no pixel type defined

##### crop

Crop a region of an image, the region is always clamped to the original image size.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
end | streamable | [[-1,-1]] | end of crop region
start | streamable | [[0,0]] | start of crop region

##### dilate

2d image stack dilate filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
hint | set | black | a hint at the main image content Supported values are:(black, white, )
shape | factory | [sphere:r=2] | structuring element. For supported plug-ins see Plugin type: 2dimage/shape

##### distance

2D image distance filter, evaluates the distance map for a binary mask.. (This plug-in doesn't take parameters)

##### downscale

Downscale the input image by using a given block size to define the downscale factor. Prior to scaling the image is filtered by a smoothing filter to eliminate high frequency data and avoid aliasing artifacts.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
b | 2dbounds | [[1,1]] | blocksize
bx | uint in [1, inf) | 1 | blocksize in x direction
by | uint in [1, inf) | 1 | blocksize in y direction
kernel | factory | gauss | smoothing filter kernel to be applied, the size of the filter is estimated based on the blocksize.. For supported plug-ins see Plugin type: 1d/spacialkernel

##### erode

2d image stack erode filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
hint | set | black | a hint at the main image content Supported values are:(black, white, )
shape | factory | [sphere:r=2] | structuring element. For supported plug-ins see Plugin type: 2dimage/shape

##### gauss

isotropic 2D gauss filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [0, inf) | 1 | filter width parameter

##### gradnorm

2D image to gradient norm filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
normalize | bool | 0 | Normalize the gradient norms to range [0,1].

##### invert

intensity invert filter. (This plug-in doesn't take parameters)

##### kmeans

2D image k-means filter. In the output image the pixel value represents the class membership and the class centers are stored as attribute in the image.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
c | int in [2, inf) | 3 | number of classes

##### label

Label connected components in a binary 2D image.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
n | factory | 4n | Neighborhood mask to describe connectivity.. For supported plug-ins see Plugin type: 2dimage/shape

##### labelmap

Image filter to remap label id's. Only applicable to images with integer valued intensities/labels.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
map | string | (input,required) | Label mapping file

##### labelscale

A filter that only creates output voxels that are already created in the input image. Scaling is done by using a voting algorithms that selects the target pixel value based on the highest pixel count of a certain label in the corresponding source region. If the region comprises two labels with the same count, the one with the lower number wins.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
out-size | 2dbounds | (required) | target size given as two coma separated values

##### load

Load the input image from a file and use it to replace the current image in the pipeline.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
file | io | (input,required) | name of the input file to load from.. For supported file types see Plugin type: 2dimage/io

##### mask

2D masking, one of the two input images must by of type bit.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---

fill

dict

min

fill style for pixels outside of the mask
min: | set values outside the mask to the minimum value found in the image.
zero: | set the values outside the mask to zero.
max: | set values outside the mask to the maximum value found in the image..

input | io | (input,required) | second input image file name. For supported file types see Plugin type: 2dimage/io
inverse | bool | 0 | set to true to use the inverse of the mask for masking

##### maxflow

This filter implements the uses the max-flow min-cut algorithmfor image segmentation. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
sink-flow | io | (input,required) | Image of float type to define the per-pixel flow to the sink. For supported file types see Plugin type: 2dimage/io
source-flow | io | (input,required) | Image of float type to define the per-pixel flow to the source. For supported file types see Plugin type: 2dimage/io

##### mean

2D image mean filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [1, inf) | 1 | half filter width

##### meanvar

Filter that evaluates simultaniously the pixel wise mean and the variance of an image in a given window. Pixel intensities below the given threshold will be ignored and at their loctions the output mean and variation are set to zero. The mean intensity image is directly passed as float image to the pipeline, the variation image is saved to a file given with the varfile parameter.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
thresh | double in [0, inf) | 0 | Intensity thresholding parameter: Pixels with intensities below this threshold will be set to zero, and also not used when evaluating mean and variation
varfile | io | (output,required) | name of the output file to save the variation image too.. For supported file types see Plugin type: 2dimage/io
w | uint in [1, inf) | 1 | filter width parameter

##### median

2D image median filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [1, inf) | 1 | half filter width

##### medianmad

Filter that evaluates simultaniously the pixel wise median and the median absolute deviation (MAD) of an image in a given window. Pixel intensities below the given threshold will be ignored and at their loctions the output median and MAD are set to zero. The median intensity image is directly passed to the pipeline, the variation image is saved to a file given with the varfile parameter. Both output images have the same pixel type like the input image.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
madfile | io | (output,required) | name of the output file to save the median absolute deviation image too.. For supported file types see Plugin type: 2dimage/io
thresh | double in [0, inf) | 0 | Intensity thresholding parameter: Pixels with intensities below this threshold will be set to zero, and also not used when evaluating mean and variation
w | uint in [1, inf) | 1 | filter width parameter

##### mlv

Mean of Least Variance 2D image filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
w | int in [1, inf) | 1 | filter width parameter

##### ngfnorm

2D image to normalized-gradiend-field-norm filter. (This plug-in doesn't take parameters)

##### noise

2D image noise filter: add additive or modulated noise to an image. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
g | factory | [gauss:mu=0,sigma=10] | noise generator. For supported plug-ins see Plugin type: generator/noise
mod | bool | 0 | additive or modulated noise

##### open

morphological open. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
hint | set | black | a hint at the main image content Supported values are:(black, white, )
shape | factory | [sphere:r=2] | structuring element. For supported plug-ins see Plugin type: 2dimage/shape

##### pruning

Morphological pruning. Pruning until convergence will erase all pixels but closed loops.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
iter | int in [1, 1000000] | 0 | Number of iterations to run, 0=until convergence

##### regiongrow

Region growing startin from a seed until only along increasing gradients. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
n | factory | 8n | Neighborhood shape. For supported plug-ins see Plugin type: 2dimage/shape
seed | io | (input,required) | seed image (bit valued). For supported file types see Plugin type: 2dimage/io

##### sandp

salt and pepper 3d filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
thresh | float in (0, inf) | 100 | thresh value
w | int in [1, inf) | 1 | filter width parameter

##### scale

2D image downscale filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
interp | factory | [bspline:d=3] | interpolation method to be used . For supported plug-ins see Plugin type: 1d/splinekernel
s | 2dbounds | [[0,0]] | target size as 2D vector
sx | uint in [0, inf) | 0 | target size in x direction, 0: use input size
sy | uint in [0, inf) | 0 | target size in y direction, 0: use input size

##### selectbig

2D label select biggest component filter. (This plug-in doesn't take parameters)

##### sepconv

2D image intensity separaple convolution filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
kx | factory | [gauss:w=1] | filter kernel in x-direction. For supported plug-ins see Plugin type: 1d/spacialkernel
ky | factory | [gauss:w=1] | filter kernel in y-direction. For supported plug-ins see Plugin type: 1d/spacialkernel

##### shmean

2D image filter that evaluates the mean over a given neighborhood shape. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
shape | factory | 8n | neighborhood shape to evaluate the mean. For supported plug-ins see Plugin type: 2dimage/shape

##### sobel

The 2D Sobel filter for gradient evaluation. Note that the output pixel type of the filtered image is the same as the input pixel type, so converting the input beforehand to a floating point valued image is recommendable.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---

dir

dict

x

Gradient direction
x: | gradient in x-direction
y: | gradient in y-direction

##### sort-label

This plug-in sorts the labels of a gray-scale image so that the lowest label value corresponts to the label with themost pixels. The background (0) is not touched. (This plug-in doesn't take parameters)

##### sws

seeded watershead. The algorithm extracts exactly so many reagions as initial labels are given in the seed image.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
grad | bool | 0 | Interpret the input image as gradient.
mark | bool | 0 | Mark the segmented watersheds with a special gray scale value
n | factory | [sphere:r=1] | Neighborhood for watershead region growing. For supported plug-ins see Plugin type: 2dimage/shape
seed | string | (input,required) | seed input image containing the labels for the initial regions

##### tee

Save the input image to a file and also pass it through to the next filter. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
file | io | (output,required) | name of the output file to save the image too.. For supported file types see Plugin type: 2dimage/io

##### thinning

Morphological thinning. Thinning until convergence will result in a 8-connected skeleton. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
iter | int in [1, 1000000] | 0 | Number of iterations to run, 0=until convergence

##### thresh

This filter sets all pixels of an image to zero that fall below a certain threshold and whose neighbours in a given neighborhood shape also fall below a this threshold. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
shape | factory | 4n | neighborhood shape to take into account. For supported plug-ins see Plugin type: 2dimage/shape
thresh | double | 5 | The threshold value

##### tmean

2D image thresholded tmean filter: The output pixel value is zero if the input pixel value is below the given threshold, otherwise the pixels in the evaluation windows are only considered if the input pixel intensity is above the threshold.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
t | float | 0 | Threshold for pixels not to take into account
w | int in [1, inf) | 1 | half filter width

##### transform

Transform the input image with the given transformation.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
file | io | (input,required) | Name of the file containing the transformation.. For supported file types see Plugin type: 2dtransform/io

##### ws

basic watershead segmentation.. Supported parameters are:

Name | Type | Default | Description
--- | --- | --- | ---
evalgrad | bool | 0 | Set to 1 if the input image does not represent a gradient norm image
mark | bool | 0 | Mark the segmented watersheds with a special gray scale value
n | factory | [sphere:r=1] | Neighborhood for watershead region growing. For supported plug-ins see Plugin type: 2dimage/shape
thresh | float in [0, 1) | 0 | Relative gradient norm threshold. The actual value threshold value is thresh * (max_grad - min_grad) + min_grad. Bassins separated by gradients with a lower norm will be joined

#### Plugin consumers:

mia-2dimagefilter mia-2dimagefilterstack mia-2dsegment-fuzzyw mia-2dseries2dordermedian mia-2dseriesgradMAD mia-2dseriessmoothgradMAD mia-2dstackfilter byslice:2dstack/filter

Prev | Up | Next
Plugin type: 2dimage/creator | Home | Plugin type: 2dimage/fullcost