DIPlib Documentation - ©1995-2017 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 typeNameDescription
dip_DataTypedataTypeThe data type to check
dip_BooleanallowDIP_TRUE: check if the data type is included. DIP_FALSE: check if the data type is not included
dip_DataTypePropertiesallowedTypesThe set of data types to check against, see DataTypeGetInfo
dip_Boolean *allowedPointer 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