[mmUbyte] [Up] [mmInt32] Data Type Conversion

mmUshort
Converts a UBYTE, USHORT or DOUBLE image into an USHORT image.

Synopsis

Image mmUshort ( const Image& X , const String& METHOD = "CAST", const Double& MIN = 0, const Double& MAX = 65535 );

Input

X Image [ Gray-scale (uint8 or uint16) or binary image ]

UBYTE, USHORT or DOUBLE image.

METHOD String

String: 'SCALE', ' CAST' or ' NORM'.

Default: "CAST"

MIN Double

minimum Gray-Level in output image.

Default: 0

MAX Double

Maximum gray-level in output image.

Default: 65535

Output

Y Image

USHORT image

Description

mmUshort converts a UBYTE, USHORT or DOUBLE image X into an USHORT image following one of three conversion methods: METHOD = 'SCALE': scale the pixels values proportional to the scale of each data type. METHOD = 'CAST': copy and truncate the pixel values. METHOD = 'NORM': normalize the result such that the minimum value of the image is assigned the value MIN and the maximum pixel value of the image is assigned the value MAX. This operator is not applied to binary images.

See also

mmUbyte Converts a BIT, UBYTE, USHORT or DOUBLE image into an UBYTE image.
[mmUbyte] [Up] [mmInt32]