Skip to content

Commit 78dad33

Browse files
committed
ENH: use masking in plot_ortho
1 parent 751b0d5 commit 78dad33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ants/viz/plot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,8 @@ def reorient_slice(x, axis):
18381838
overlayReturn = overlay.clone()
18391839
overlay = overlay.numpy()
18401840
if overlay.dtype not in ["uint8", "uint32"]:
1841-
overlay[np.abs(overlay) == 0] = np.nan
1841+
overlay = np.ma.masked_where( np.abs(overlay) <= 1e-16, overlay)
1842+
# overlay[np.abs(overlay) == 0] = np.nan
18421843

18431844
yz_slice = reorient_slice(image[xyz[0], :, :], 0)
18441845
ax = plt.subplot(gs[0, 0])

0 commit comments

Comments
 (0)