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

Information about dyadic operations

There are two types of dyadic operations. First there are operations such as Add, Sub, etc... which take two input images. The second category consists of functions such as AddFloat, AddComplex etc... The data type of the output image given the data types of the input images is given by the following table:

dcomplexscomplexdfloatsfloatsint32sint16
dcomplexdcomplexdcomplexdcomplexdcomplexdcomplexdcomplex
scomplexdcomplexscomplexdcomplexscomplexscomplexscomplex
dfloat dcomplexdcomplexdfloat dfloat dfloat dfloat
sfloat dcomplexscomplexdfloat sfloat sfloat sfloat
sint32 dcomplexscomplexdfloat sfloat sint32 sint32
sint16 dcomplexscomplexdfloat sfloat sint32 sint16
sint8 dcomplexscomplexdfloat sfloat sint32 sint16
uint32 dcomplexscomplexdfloat sfloat sint32 sint32
uint16 dcomplexscomplexdfloat sfloat sint32 sint16
uint8 dcomplexscomplexdfloat sfloat sint32 sint16
binary dcomplexscomplexdfloat sfloat sint32 sint16
sint8uint32uint16uint8binary
dcomplexdcomplexdcomplexdcomplexdcomplexdcomplex
scomplexscomplexscomplexscomplexscomplexscomplex
dfloat dfloat dfloat dfloat dfloat dfloat
sfloat sfloat sfloat sfloat sfloat sfloat
sint32 sint32 sint32 sint32 sint32 sint32
sint16 sint16 sint32 sint16 sint16 sint16
sint8 sint8 sint32 sint16 sint8 sint8
uint32 sint32 uint32 uint32 uint32 uint32
uint16 sint16 uint32 uint16 uint16 uint16
uint8 sint8 uint32 uint16 uint8 uint8
binary sint8 uint32 uint16 uint8 sint8

The output data type of an operation involving an image and a constant of one of the types: dip_complex, dip_float, dip_int, is given by the following table:

dip_complexdip_floatdip_int
dcomplexdcomplexdcomplexdcomplex
scomplexscomplexscomplexscomplex
dfloat dcomplexdfloat dfloat
sfloat scomplexsfloat sfloat
sint32 scomplexsint32 sint32
sint16 scomplexsint16 sint16
sint8 scomplexsint8 sint8
uint32 scomplexuint32 uint32
uint16 scomplexuint16 uint16
uint8 scomplexuint8 uint8
binary scomplexsint8 sint8