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

Arith_ComplexSeparated

arithmetic function

SYNOPSIS

dip_Error dip_Arith ( in1_real, in2_imag, in2_real, in2_imag, out_real, out_imag, op, dt )

DATA TYPES

binary, integer, float

FUNCTION

This function computes out = in1 op in2 on a pixel by pixel basis. The data types of the in1 and in2 image may be of different types. The two input images and the output images have the complex portion of the data as a separate image, that is, in1 = in1_real + iin1_imag. in1_imag and in2_imag may be 0. dt may be any of DIPlib's data types, or the constants DIP_DT_MINIMUM or DIP_DT_FLEX, and determines what the output data type will be. DIP_DT_MINIMUM selects a data type according to the default for dyadic operations, see Information about dyadic operations for more information. DIP_DT_FLEX will choose a floating point (real or complex) type, the precision depends on the input types.

ARGUMENTS

Data typeNameDescription
dip_Imagein1_realFirst input, real part
dip_Imagein1_imagFirst input, imaginary part (or NULL)
dip_Imagein2_realSecond input, real part
dip_Imagein2_imagSecond input, imaginary part (or NULL)
dip_Imageout_realOutput, real part
dip_Imageout_imagOutput, imaginary part
dipf_ArithOperationopDyadic arithmetic operation
dip_DataTypedtData type for output

The dipf_ArithOperation flag can be one of:

NameDescription
DIP_ARITHOP_ADDAddition (in1+in2)
DIP_ARITHOP_SUBSubtraction (in1-in2)
DIP_ARITHOP_MULMultiplication (in1*in2)
DIP_ARITHOP_DIVDivision (in1/in2)
DIP_ARITHOP_MUL_CONJUGATEConjugate multiplication (in1*conj(in2))

SEE ALSO

Arith, Add, Sub, Mul, MulConjugate, Div, AddInteger, AddFloat, AddComplex, SubInteger, SubFloat, SubComplex, MulInteger, MulFloat, MulComplex, MulConjugateComplex, DivInteger, DivFloat, DivComplex