DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

ConvertDataType

Converts the data type of an image

SYNOPSIS

dip_Error dip_ConvertDataType ( in, out, dataType )

FUNCTION

Convert the data type of the input data to dataType and stores the result in out.

Conversion from a complex type to another (non-complex) type, is done by taking the real part.

Conversion to a binary type from another (non-binary) type, is done as follows; any non-zero number becomes 1, zero becomes zero.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput
dip_ImageoutOutput
dip_DataTypedataTypeData type. See DIPlib's data types