FloydSteinberg¶
- MLModule¶
genre
author
package
dll
definition
see also
keywords
Purpose¶
The FloydSteinberg reduces the range of image values to a range determined by the bit size of the target image. Supported input value ranges are [0, …, 65535], and the bit sizes of voxels in the output image are [1, …, 16].
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 determined by specific bit sizes. The error that occurs 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 error distribution calculation in this module is performed on floating-point data if the input image is of integer type; otherwise, it is calculated using the input data type.
The data type of the output image will be an 8-bit unsigned integer if fewer than 9 bits are used for the output image voxels; otherwise, a 16-bit unsigned integer type is used. The minimum and maximum values of the output image are automatically adjusted 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¶
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.