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

ImagesCompare

Compare properties of several images

SYNOPSIS

dip_Error dip_ImagesCompare( images, condition, result )

FUNCTION

This function compares some standard fields of a number of Images or performs a full comparison. Only if the comparison result is true between each of the Images, will the final comparison result be true. The condition parameter specifies which properties should be tested. If 0, a full comparison of the Images is performed. Otherwise it should be a logical OR of the dipf_ImagesCompare flags. DIP_CPIM_MATCH_ALL_STANDARD is equivalent to all the flags OR'ed together. The difference between DIP_CPIM_MATCH_ALL_STANDARD and the full comparison specified by 0, is that the first will compare all the standard fields ( type, data type, dimensions ), whereas the other compares all fields relevant to a particular DIPlib Image type. This may exclude some of the standard fields and include some fields particular to the type of DIPlib Image in question. There are two modes of operation. If the result parameter is set, it is used to store the result of the comparison, a set of OR'ed dipf_ImagesCompare flags. If the result parameter is 0, an error is returned if the condition parameter and the resulting set of flags are not the same.

ARGUMENTS

Data typeNameDescription
dip_ImageArrayimagesArray of Images
dipf_ImagesCompareconditionProperties to compare. 0 indicates full comparison
dipf_ImagesCompare *resultResult: flags to indicate if the properties were the same. 0 indicates that an error should be returned if the requested properties do not match

dipf_ImagesCompare

NameDescription
DIP_CPIM_DIMENSIONALITIES_MATCHDimensionalities match
DIP_CPIM_DIMENSIONS_MATCHDimensions match. The comparison is done up to the lower of the of the two dimensionalities
DIP_CPIM_SIZE_MATCHCombination of DIP_CPIM_DIMENSIONALITIES_MATCH and DIP_CPIM_DIMENSIONS_MATCH
DIP_CPIM_TYPES_MATCHTypes match
DIP_CPIM_DATA_TYPES_MATCHData types match
DIP_CPIM_MATCH_ALL_STANDARDAll flags above OR'ed together
DIP_CPIM_STRIDES_MATCHStrides match
DIP_CPIM_FULL_MATCHFull match. Returned in result. To test for a full match use 0. Note: This is NOT equivalent to the other flags OR'ed together, and it cannot be used as condition

SEE ALSO

ImagesCompareTwo, ImagesCheckTwo, ImagesCheck