Skip to content

Commit

Permalink
Merge pull request #748 from ANTsX/label_stats_dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpa authored Dec 2, 2024
2 parents 00ae867 + 44823cb commit 696cec7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ants/label/label_overlap_measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 696cec7

Please sign in to comment.