Purpose

The module FloydSteinberg reduces the used range of image values to a range given by a bit size of a target image. Supported are input value ranges [0, … , 65535] and bit sizes of voxels in the output image [0, …, 15].

Usage

Read this introduction on Floyd-Steinberg dithering.

The Floyd-Steinberg algorithm used in this module reduces the scalar range of input image voxels to an output range given by a certain bit sizes. The error occurring when scaling down a voxel is distributed to its neighbors:

right neighbor 7 / 16
bottom left neighbor 3 / 16
bottom neighbor 5 / 16
bottom right neighbor 1 / 16

The calculation of the error distributing in this module is done on float data if the input image is of type integer; otherwise it is calculated in the type of the input data.

The data type of the output image will be an 8 bit unsigned integer if the less than 9 bits are used as output image voxels; otherwise a 16 bit unsigned integer type is used. The minimum and maximum values of the output image are adopted automatically to the bit range of the output image.

For ranges of input image data outside [0, …, 65535] the output image will be invalidated.

Windows

Default Panel

../../../Modules/ML/MLFilter2/mhelp/Images/Screenshots/FloydSteinberg._default.png

Input Fields

input0

name: input0, type: Image

Original scalar input image.

Output Fields

output0

name: output0, type: Image

Downsampled and dithered output image.

Parameter Fields

Visible Fields

Num Out Bits

name: numOutBits, type: Integer, default: 8, minimum: 1, maximum: 16

Sets the number of output bits.