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

Add a mask to an image from ImageData item #4194

Open
payno opened this issue Nov 6, 2024 · 0 comments
Open

Add a mask to an image from ImageData item #4194

payno opened this issue Nov 6, 2024 · 0 comments

Comments

@payno
Copy link
Member

payno commented Nov 6, 2024

I would like to provide a mask to an image. So either displaying or hiding the pixels of the image.

But the following code seems not to take into account the mask:

import numpy
from silx import sx

w = sx.plot()
item = w.addImage(numpy.arange(1024**2).reshape(1024, 1024))

mask = numpy.ones((1024, 1024))
mask[400:800] = 0

item.setMaskData(mask)

image

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

No branches or pull requests

1 participant