Select_Slides without annotations

Hello all.

It might be known, but I miss this info.
Is there a way in a qupath open project, to find the slides (names and total number) to which no annotations were drawn?

Thank you.

If there are no data files at all, then these are the ones shown in italics in the Project pane.

But sometimes you can have a data file without any annotations inside it. Assuming you are using a recent milestone release of QuPath (e.g. v0.2.0-m9) you could use the following script to help:

for (entry in getProject().getImageList()) {
    def hierarchy = entry.readHierarchy()
    String nAnnotations = hierarchy.getAnnotationObjects().size()
    entry.putMetadataValue('Num annotations', nAnnotations)

After running this script, you can right-click on the Project list and choose Sort by… → Num annotations. The list will reorganize itself so that you can immediately see how many annotations are present for each image.

(Note: These values will not update automatically - you’ll need to run the script again any time you want to refresh them)


It is about the second case.

Thank you for your answer.