Skip to content

Commit

Permalink
Update deleteByClassification.groovy and notDeleteByName.groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeLeGoc committed Jan 15, 2025
1 parent 312d0d9 commit c13da04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/qupath-utils/tools/deleteByClassification.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* deleteByClassification.groovy
*
* Delete all objects whose class correspondond to the specified one.
* Delete all objects whose class correspond to the specified one.
* To delete objects whose class is empty, set an empty string.
*/

Expand Down
14 changes: 14 additions & 0 deletions scripts/qupath-utils/tools/notDeleteByName.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* notDeleteByName.groovy
*
* Delete all annotations whose Name DO NOT correspond to the specified one.
*/

// Define what Names to NOT delete
def nameToNotDelete = ["DH", "VH"]

// Find objects to delete
toRemove = getAnnotationObjects().findAll { !nameToNotDelete.contains(it.getName())}

// remove selected objects
removeObjects(toRemove, true)

0 comments on commit c13da04

Please sign in to comment.