AddNoise

MLModule

genre

Generators

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

MLBasicModules

definition

mlBasicModules.def

keywords

uniform, gaussian, white, random, disturbance, inhomogeneity, testing, segmentation, gray, gaussian, speckle, salt, pepper, checkerboard

Purpose

The AddNoise module produces noise from various distributions.

Usage

Connect an image, choose a distribution, and set the parameters. Note that only scalar input images are currently supported, i.e., adding noise to vector or tensor images is not supported.

Details

Random numbers are generated using the boost library and the lagged_fibonacci607 random number generator. The following noise distributions are available:

Uniform

Adds uniformly distributed noise to the image: I = I + noise

Gaussian

Adds Gaussian noise of mean m and variance v to the image: I = I + noise

Gaussian DTI

Adds complex Gaussian noise of variance v to the MR signal

Salt & Pepper

Adds salt and pepper noise to the image (intensity=amplitude or amplitude2 for density*100% of the voxels): I = I + noise

Speckle

Adds multiplicative noise (Gaussian white noise of variance v) to the image: I = I + I*noise

Tips

If just a noise image is desired, produce a constant image with the ConstantImage module and attach it to the AddNoise module.

Windows

Default Panel

../../../Modules/ML/MLBasicModules/mhelp/Images/Screenshots/AddNoise._default.png

Input Fields

A scalar image volume. Vector and tensor images are not yet supported.

input0

name: input0, type: Image

Output Fields

A noisy image.

output0

name: output0, type: Image

Parameter Fields

Field Index

Add Input: Bool

sigma (input image): Float

Density: Float

sigma (output image): Float

Gray Value 1 (Salt): Float

Gray Value 2 (Pepper): Float

Mean Value: Float

Noise Type: Enum

RandSeed (negative: unused): Integer

sigma (additive): Float

Visible Fields

Gray Value 1 (Salt)

name: amplitude, type: Float, default: 100

Add Input

name: addInput, type: Bool, default: TRUE

If checked, the voxel values of the input image are being added to the output (noise) voxel values.

RandSeed (negative: unused)

name: randSeed, type: Integer, default: -1

Sets the seed for the random number generator.

If a negative number is selected, a seed is chosen based on the current time.

Noise Type

name: noiseType, type: Enum, default: Uniform

Defines the type of noise that is being generated.

Values:

Title

Name

Description

Gaussian

Gaussian

Mean Value

mean of Gaussian.

Sigma

sigma of Gaussian (sqrt of variance).

Gaussian Dti

GaussianDti

sigma (additive)

sigma (σ) of Gaussian (sqrt of variance) used for adding complex Gaussian noise to the input image. When changing sigma (input image) or sigma (output image), the sigma (additive) is updated automatically.

σadditive = √ (σoutput2- σinput2)

sigma (input image)

noise of the input image

sigma (output image)

(desired) noise of the output image image. If it is smaller than sigma of the input image, the additive sigma is set to 0.

Salt Pepper

SaltPepper

Gray Value 1 (Salt)

salt value

Gray Value 2 (Pepper)

pepper value

Density

noise density; approximately density*100% of the voxels are affected

Speckle

Speckle

sigma

sigma of Gaussian (sqrt of variance)

Checkerboard

Checkerboard

Mean Value

name: mean, type: Float, default: 0

sigma (additive)

name: sigma, type: Float, default: 1

sigma (input image)

name: sigmaIn, type: Float, default: 0

sigma (output image)

name: sigmaOut, type: Float, default: 0

Gray Value 2 (Pepper)

name: amplitude2, type: Float, default: 100

Density

name: density, type: Float, default: 0.050000001