#### Previous topic

medpy.metric.binary.obj_asd

#### Next topic

medpy.metric.binary.volume_correlation

# medpy.metric.binary.obj_assd¶

medpy.metric.binary.obj_assd(result, reference, voxelspacing=None, connectivity=1)[source]

Average symmetric surface distance.

Computes the average symmetric surface distance (ASSD) between the binary objects in two images.

Parameters: result : array_like Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else. reference : array_like Input data containing objects. Can be any type but will be converted into binary: background where 0, object everywhere else. voxelspacing : float or sequence of floats, optional The voxelspacing in a distance unit i.e. spacing of elements along each dimension. If a sequence, must be of length equal to the input rank; if a single number, this is used for all axes. If not specified, a grid spacing of unity is implied. connectivity : int The neighbourhood/connectivity considered when determining what accounts for a distinct binary object as well as when determining the surface of the binary objects. This value is passed to scipy.ndimage.morphology.generate_binary_structure and should usually be $$> 1$$. The decision on the connectivity is important, as it can influence the results strongly. If in doubt, leave it as it is. assd : float The average symmetric surface distance between all mutually existing distinct binary object(s) in result and reference. The distance unit is the same as for the spacing of elements along each dimension, which is usually given in mm.

Notes

This is a real metric, obtained by calling and averaging

>>> obj_asd(result, reference)


and

>>> obj_asd(reference, result)


The binary images can therefore be supplied in any order.