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

Need to use Enum in a better way #325

Open
qin-yu opened this issue Sep 19, 2024 · 0 comments
Open

Need to use Enum in a better way #325

qin-yu opened this issue Sep 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@qin-yu
Copy link
Collaborator

qin-yu commented Sep 19, 2024

I needed to fix "MutexWS" name/val correspondence because in aggl. task "gasp", "mutex_ws", "multicut" are matched as strings, while in another module for GUI "mutexws" was used.

We better make a Enum instead of matching strings in many cases in PlantSeg. But some refactored Enums in PlantSeg are really hard to use. Need to refactor and make a generic class with to_choice(). The challenge has been that in Napari GUI the choice should have a human readable string as the name and a constant code as its value, this is the reverse of Enum.

Or we find an alternative.

@qin-yu qin-yu added the enhancement New feature or request label Sep 19, 2024
qin-yu added a commit that referenced this issue Sep 19, 2024
Better make `Enum`s. But some refactored `Enum`s in PlantSeg are really hard to use. Need to refactor and make a generic class with `to_choice()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant