Skip to content

Commit

Permalink
fix issue with plotting z-scored images
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed Mar 12, 2024
1 parent b8e7118 commit fe3783b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ants/viz/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def reorient_slice(x, axis):
if not isinstance(image, iio.ANTsImage):
raise ValueError("image argument must be an ANTsImage")

if not image.sum() > 0:
if sum(sum(image != 0)) == 0:
warnings.warn("Image must be non-zero. will not plot.")
return

Expand Down

0 comments on commit fe3783b

Please sign in to comment.