FloydSteinberg¶
-
MLModule
¶ genre Diffusion
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLFilter2
definition mlFilter2.def see also Scale
,ImagePropertyConvert
,Resample3D
,Rank
keywords dithering
,diffusion
,error
,distribution
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.