Hi
So turning them into detections does automatically give me a count within the parental annotation, so next I am trying to a attempt to remove objects greater that 10 from a specific class with the following code, to no avail
def ANNOTATION_AREA_MICRONS = 10
def server = getCurrentImageData().getServer()
double pixelHeight = server.getPixelCalibration().getPixelHeightMicrons()
double pixelWidth = server.getPixelCalibration().getPixelWidthMicrons()
def LargeObjects
LargeObjects = getDetectionObjects().findAll {
it.getPathClass().toString().contains("aggregates") {
it.getROI().getScaledArea(pixelWidth, pixelHeight) > ANNOTATION_AREA_MICRONS
}
}
removeObjects(LargeObjects, true)
fireHierarchyUpdate()
println("done")
It seems it runs with no errors however object are not removed,
I 'm not sure if this is the correct way its an adaptation from Removing small annotation bits.groovy