DIPlib Documentation - ©1995-2015 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 type | Name | Description
`dip_Image` | `in` | Input
`dip_Image` | `out` | Output
`dip_DataType` | `dataType` | Data type. See DIPlib's data types