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

# DataTypeAllowed

Check whether a data type is allowed

## SYNOPSIS

dip_Error dip_DataTypeAllowed( dataType, allow, allowedTypes, allowed )

## FUNCTION

This function checks whether the `dataType` is (or is not) in the set of data types specified by `allowedTypes`. If `allow` is `DIP_TRUE`, the data type should be in this set. If `allow` is `DIP_FALSE`, the data type should not be in this set. If the `allowed` parameter is zero, the routine returns `dip_errorDataTypeNotSupported` if the required condition is not satisfied. If nonzero, it should point to a boolean variable. This boolean variable will be set to `DIP_TRUE` if the condition is satisfied, or `DIP_FALSE` if not.

## ARGUMENTS

Data type | Name | Description
`dip_DataType` | `dataType` | The data type to check
`dip_Boolean` | `allow` | `DIP_TRUE`: check if the data type is included. `DIP_FALSE`: check if the data type is not included
`dip_DataTypeProperties` | `allowedTypes` | The set of data types to check against, see `DataTypeGetInfo`
`dip_Boolean *` | `allowed` | Pointer to a boolean to store the answer, or 0 to indicate that `dip_errorDataTypeNotSupported` should be returned if the condition is not satisfied

## SEE ALSO

DIPlib's data types

`DataTypeGetInfo`