Class ProjectEntryPredicate

java.lang.Object
qupath.lib.gui.panes.ProjectEntryPredicate
All Implemented Interfaces:
Predicate<ProjectImageEntry<?>>

public class ProjectEntryPredicate extends Object implements Predicate<ProjectImageEntry<?>>
Class to create a predicate to filter ProjectImageEntry.

The most basic predicate checks only if the image name contains the specified text. However, if | is found in the filter text then metadata key-value pairs are checked, using the syntax key=value.

Therefore, to search for images ending with ".tif" and with a metadata entry "server" with value "bioformats, the filter text string would be "tif|server=bioformats".

  • Method Details

    • createCaseSensitive

      public static Predicate<ProjectImageEntry<?>> createCaseSensitive(String filterText)
      Create a case-sensitive filter for project entries.
      Parameters:
      filterText - the filter text; if empty, all entries will pass through the filter
      Returns:
      the predicate
    • createIgnoreCase

      public static Predicate<ProjectImageEntry<?>> createIgnoreCase(String filterText)
      Create a case-insensitive filter for project entries.
      Parameters:
      filterText - the filter text; if empty, all entries will pass through the filter
      Returns:
      the predicate
    • test

      public boolean test(ProjectImageEntry<?> entry)
      Specified by:
      test in interface Predicate<ProjectImageEntry<?>>