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

All annotated points are exported as "Interphase" #47

Open
bramthijssen opened this issue Jul 3, 2023 · 0 comments
Open

All annotated points are exported as "Interphase" #47

bramthijssen opened this issue Jul 3, 2023 · 0 comments

Comments

@bramthijssen
Copy link

When I tried running the code in the A_CNN_Annotation_with_Napari.ipynb" notebook, I could add points and change their state; but when exporting the data, all cells received the "Interphase" state regardless of their color/state.

It looks like the "current_properties" of the napari points layer is not actually updated. I think this line should do that:
points_layer.current_properties['State'] = np.array([current_state.value])
But that line doesn't actually change the current_properties, at least not with the current napari version. I believe it is not working because it's retrieving the current_properties dict, and then modifying the local value, rather than the member of the points_layer. Changing that line to this:
points_layer.current_properties = {'State': np.array([current_state.value])}
seems to make everything work again. I guess this will use the current_properties setter function instead of the getter function. Perhaps these things changed in a recent napari version?

I'm not confident enough to submit this as pull request though

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