Area of positive cells in an annotation

Hello! Is there any way to obtain the area of the positive detected cells? My cells are very irregular so the counts are not reliable.

Thank you!

Hi @ic2396,

Do you mean the sum of all the areas of the positive cells in your image?
If so, something like this should work:

def sumArea = 0
getCellObjects().forEach {
    if (it.getPathClass() == getPathClass("Positive"))
        sumArea += it.getMeasurementList().getMeasurementValue("Cell: Area")
}

print "Total sum of all positive cells' area: " + sumArea + " (Don't forget the unit!)"
1 Like

Hi Melvin,
I would like to get the area of positive cells in a specific annotation. I tried running your script, but the result is 0.

Yes, my script checks if the class of the cell is Positive. If not, it will never add anything to sumArea .

If you give more details about your image it will help see how to create a proper script for you:

  1. What is the class of the cells you want to count?
  2. How many annotations do you have? And do all of them have cells inside?
    when you say

It sounds like there’s only one annotation. If so, what is the class of the annotation (or anything else to distinguish it from other ones)?

I run positive cell detection (Nucleus: Channel 2 mean) in one annotation, then applied an object classifier labeling as Positive or Negative. In the detection measurement table, the class says either “Positive: Positive” or “Negative: Negative.” Then click save.

Currently I have multiple annotations, but only one contains the cells. The class of the annotation is “None”

Thank you!

Screen Shot 2021-01-13 at 8.33.08 AM

Great thank you :slight_smile:

You could then do this (I took the name of the annotation as criteria to filter out annotations):

def sumArea = 0
getAnnotationObjects().forEach { ann ->
    if (ann.getName().equals("LacbSh 0.86 Left")) {
        ann.getChildObjects().forEach {
            if (it.getPathClass() == getPathClass("Positive: Positive"))
                sumArea += it.getMeasurementList().getMeasurementValue("Cell: Area")
        }
        print "Total sum of all positive cells' area: " + sumArea + " (Don't forget the unit!)"
        return
    }
}

Hi Melvin, I just ran the new script, but I keep getting zero.

Mmh ok…

What does it show when you run this:

getAnnotationObjects().forEach { ann ->
    print ann.getName()
    if (ann.getName().equals("LacbSh 0.86 Left")) {
        ann.getChildObjects().forEach { cell ->
            print cell.getPathClass()
        }
    }
}
  1. I think there is definitely something wrong with the object classifier I run for that Image. Bc I tried your script in a different image with only positive cell detection and it worked perfectly. Screen Shot 2021-01-13 at 8.51.43 AM

  2. When I run:


getAnnotationObjects().forEach { ann ->
    print ann.getName()
    if (ann.getName().equals("LacbSh 0.86 Left")) {
        ann.getChildObjects().forEach { cell ->
            print cell.getPathClass()
        }
    }
}

I get:

Click here to expand

INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: LacbSh 0.86 Left
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Negative: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: Positive: Negative
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null
INFO: null

Do you need the object classifier? ‘Positive cell detection’ already assigns cells as positive or negative. If you don’t want to use that, you can run ‘Cell detection’ instead (or use Classify → Object classification → Reset detection classification).

Either way, I think you shouldn’t have classifications duplicated, i.e. just Positive or Negative – rather than Positive: Positive and Negative: Negative.

3 Likes

Yes, from the output of the script I sent you, it looks like there are no cell with Positive: Positive as classification. You do have other ones though (Positive: Negative and Negative: Negative)

The screenshot in your last post shows an annotation with no Positive detections either, I don’t know if that’s normal?

Have you tried to resolve the hierarchy and rerun the script:

resolveHierarchy()
1 Like

Yep, I should have read this thread before responding to the other, but I think cleaning up the up-stream steps will be the most helpful. Or including a sample image and explaining what you want to accomplish, as requested in the initial posting :slight_smile:

Also edited the above post due to scrolling and code legibility.

2 Likes