Created
September 20, 2018 13:02
-
-
Save petebankhead/a8113a5258191e79bae5fae017e0bc57 to your computer and use it in GitHub Desktop.
Remove very tiny annotation objects in QuPath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Remove really tiny objects (here, with areas <= 1 pixel.... and also lines) | |
| // They can be created when using the wand/brush & subtracting almost all of a region (for example) | |
| tinyAreas = getAnnotationObjects().findAll { | |
| return !it.isPoint() && it.getROI().getArea() <= 1 | |
| } | |
| print 'Number of objects to remove: ' + tinyAreas.size() | |
| removeObjects(tinyAreas, true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment