Skip to content

Improve project entry filtering#2071

Merged
petebankhead merged 4 commits intoqupath:mainfrom
petebankhead:project-predicate
Jan 19, 2026
Merged

Improve project entry filtering#2071
petebankhead merged 4 commits intoqupath:mainfrom
petebankhead:project-predicate

Conversation

@petebankhead
Copy link
Member

This PR aims to replace #2058 by adding metadata filtering support to the project tab, similar to how it works when using Run for project.

This makes it easier to filter the contents of the project tab to display only the images of interest.

A complication is that Run for project has a simple TextField, whereas the filter at the bottom of the project table uses a PredicateTextField with regex support. The use of regex isn't compatible with the simple filter syntax of image_name_contents|metadata=value.

The goal of this PR is to try to achieve the desired functionality while keeping changes and complexity low.

The main changes here:

  • Separate the Run for project predicate logic into ProjectEntryPredicate so it's easier to maintain and update
    • Fix the bug that required the search terms to all be in lower case
  • Update the project tab predicate to use ProjectEntryPredicate when regex is not selected and continue to use only the image name if the regex button is selected
  • Add an implicit metadata value so the (non-regex) filter can include |has_data=true or |has_data=false (which would help with this forum topic)

The fact that the regex toggle now servers two purposes - turning on regex support and turning off metadata search - is a bit unsatisfying, but I think it should at least provide the flexibility that is needed:

  • Simple image name filtering, no matter whether the regex button is selected
  • More advanced image name filtering if the button is selected
  • Metadata filtering with the same syntax as Run for project if the button is not selected

Since the use of metadata in projects is still a bit of a 'power user' feature, I expect that most users will be unaffected by the change.

Any thoughts? @zindy @alanocallaghan @Rylern

Made ProjectEntryPredicate package private because it isn't obviously useful anywhere else - and may need to be changed again.
This is active *only* if the regex button is turned off.
@petebankhead petebankhead added this to the v0.7.0 milestone Jan 19, 2026
@petebankhead petebankhead merged commit 837d984 into qupath:main Jan 19, 2026
3 checks passed
@petebankhead petebankhead deleted the project-predicate branch January 19, 2026 15:57
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

Successfully merging this pull request may close these issues.

2 participants