Hi micros, thank you so much, I have it working! Here is an adapted version of the script for fluorescent channel intensity. Will switch to the new forum. Thanks again!
import qupath.lib.objects.PathCellObject
hierarchy = getCurrentHierarchy()
for (annotation in getAnnotationObjects()){
def allCells = hierarchy.getDescendantObjects(annotation,null, PathCellObject)
double totalintensity = 0
for (def cell in allCells){
totalintensity += cell.getMeasurementList().getMeasurementValue("Cell: Channel 1 mean")
}
//Comment the following in or out depending on whether you want to see the output
println("Mean intensity for allCells is: " + totalintensity/allCells.size)
println("Total intensity is: " + totalintensity)
//Add to annotation measurements
annotation.getMeasurementList().putMeasurement("Ch1 Mean Intensity", totalintensity/allCells.size)
annotation.getMeasurementList().putMeasurement("Ch1 Total Intensity", totalintensity)
}