Kitware / UPennContrast

UPenn ?
https://upenn-contrast.netlify.com/
Apache License 2.0
8 stars 6 forks source link

Tag cloud picker filter #749

Closed arjunrajlab closed 3 weeks ago

arjunrajlab commented 1 month ago

Makes a clickable tag cloud for showing and hiding various annotations, a much requested feature.

bruyeret commented 1 month ago

Also I completely removed the shape filter from the code base, as you removed the UI to use it.

arjunrajlab commented 1 month ago

@bruyeret There is another problem I'm not sure what to do about. Let's say you create a new tool with a new tag. The tag will now show up in the tag cloud, but by default is not selected, so the new annotations you make do not display. I suppose we could have an "active tags" variable that contains what is selected in the tag cloud, and when a new tool is created, it makes that new tag active by default. How do you think we could implement that? I was thinking of having an activeTags variable in the annotationStore, and am happy to implement that, just let me know!

Maybe we could have it that any time the tag list is updated, like by adding a new tag, then the new additions to the tag list are automatically active.

Oh wait, I'm just realizing: this is already in the filterStore, right? So then perhaps upon load, we can call setTagFilter to all available tags (so that the tag cloud correctly displays all the tags as active). Then, if a new tool is created, we call addTagToTagFilter to add the tags so that they are active. Would that work? Just making a note of it here for discussion.

bruyeret commented 1 month ago

Note: Add the component at the end of the right panel, below the layers

arjunrajlab commented 1 month ago

^ left panel, I think.

arjunrajlab commented 1 month ago

Another minor request: for the tag cloud, can we implement a filter like the one we have for annotation IDs?

image

Some use cases might have a LOT of tags, and being able to search for the one you want to toggle on and off would be very helpful.

arjunrajlab commented 1 month ago

I think it is still missing the ability to pull from the filters. Like, it should show all as active when there is no tag filter, and when you select all, it should clear the filter. Then, if we add a new annotation with a new tag, then it should show that tag as active because there is no filter.

arjunrajlab commented 1 month ago

It is looking very good! One minor last point: https://github.com/Kitware/UPennContrast/pull/749#issuecomment-2233497985

bruyeret commented 3 weeks ago

I just pushed the search zone @arjunrajlab 👍

arjunrajlab commented 3 weeks ago

Looks great!