Configurable selection function
dip_Error dip_Select ( in1, in2, in3, in4, out, selector )
binary, integer, float
This function can perform various pixel-by-pixel comparisons (smaller, smaller- equal, equal, not equal, greater-equal, greater) between in1 ans in2. If the result of the comparison is true, the corresponding pixel value of in3 is copied to out, otherwise it is copied from in4. In short the following operation is performed for each pixel in the five images:
out = in1 selector in2 ? in3 : in4
The images in2, in3 and in4 can be 0-D images acting as constants.
Data type | Name | Description |
dip_Image | in1 | First input |
dip_Image | in2 | Second input |
dip_Image | in3 | Third input |
dip_Image | in4 | Fourth input |
dip_Image | out | Output |
dipf_Select | selector | Select flag |
The dipf_Select flag can be one of:
Name | Description |
DIP_SELECT_LESSER | <, Lesser than |
DIP_SELECT_LESSER_EQUAL | <=, Lesser or equal |
DIP_SELECT_NOT_EQUAL | !=, Unequal |
DIP_SELECT_EQUAL | ==, Equal |
DIP_SELECT_GREATER_EQUAL | >=, Greater or equal |
DIP_SELECT_GREATER | >, Greater |