xcp_d.utils.qcmetrics.overlap
- xcp_d.utils.qcmetrics.overlap(input1, input2)[source]
Calculate overlap coefficient between two images.
The metric is defined as
\[DC=\frac{|A \cap B||}{min(|A|,|B|)}\], where \(A\) is the first and \(B\) the second set of samples (here: binary objects).
The overlap coefficient is also known as the Szymkiewicz-Simpson coefficient [1].
- Parameters:
input1/input2 (
numpy.ndarray) – Numpy arrays to compare. Can be any type but will be converted into binary: False where 0, True everywhere else.- Returns:
coef – Coverage between two images.
- Return type:
References