Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: overlay plot background is masked #631

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

ncullen93
Copy link
Member

Currently, plotting an image with an overlay - particularly a mask-like overlay - will have a weird background due to the overlay. This fixes that issue by masking the overlay where it is equal to zero.

Example here - the background should be black:

import ants
img = ants.image_read(ants.get_data('mni'))
mask = img > 6000
img.plot(mask)

@coveralls
Copy link

Coverage Status

coverage: 80.836% (+0.3%) from 80.524%
when pulling f1a3515 on fix-plot-overlay
into 3dcfdeb on master.

@ncullen93 ncullen93 merged commit 9266f2f into master May 15, 2024
2 checks passed
@ncullen93 ncullen93 deleted the fix-plot-overlay branch May 15, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants