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

napari-skimage-regionprops overwrites layers.properties #16

Open
jo-mueller opened this issue Jan 6, 2022 · 3 comments
Open

napari-skimage-regionprops overwrites layers.properties #16

jo-mueller opened this issue Jan 6, 2022 · 3 comments

Comments

@jo-mueller
Copy link
Contributor

Hi @haesleinhuepf ,

it seems that napari-skimage-regionprops overwrites whatever content has previously been stored in the layer.properties attribute. Would you consider a PR that would change the behaviour of, for instance, add_table() in such a way that it checks whether content has already been written to the respective layer?

In case values have been written already, add_table() would then have to replaced by table_widget.append_content() which would add the data to layer.properties in a "smart" way.

@haesleinhuepf
Copy link
Owner

Hi Johannes @jo-mueller ,

that sounds interesting! Do I assume right, you refer to this code line?

Could you implement the desired behaviour without breaking backwards compatibility of the API?

@jo-mueller
Copy link
Contributor Author

Could you implement the desired behaviour without breaking backwards compatibility of the API?

I'll try 👍

@haesleinhuepf
Copy link
Owner

btw, add_table() adds a table to the viewer. It doesn't add or change any content of layer.properties.
https://github.com/haesleinhuepf/napari-skimage-regionprops/blob/master/napari_skimage_regionprops/_table.py#L139

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

2 participants