diff --git a/ants/label/label_overlap_measures.py b/ants/label/label_overlap_measures.py index 815c4fc0..4b7e7280 100644 --- a/ants/label/label_overlap_measures.py +++ b/ants/label/label_overlap_measures.py @@ -40,5 +40,7 @@ def label_overlap_measures(source_image, target_image): libfn = get_lib_fn("labelOverlapMeasures%iD" % source_image_int.dimension) df = libfn(source_image_int.pointer, target_image_int.pointer) df = pd.DataFrame(df) + # Set Label column to object type as it can contain strings + df['Label'] = df['Label'].astype(object) df.loc[0, 'Label'] = 'All' return df