Missing core location for cells in detection measurements results

When I show the detection measurements so that I can export the information I notice that not all my cells have the core name that the cell came from in my TMA slide.

Below is a picture of my detection measurements. Under the name column the section that is outlined in green tells me which core (i.e. core A-3) of my TMA those cells came from. Yet, the section that is outlined in orange does not provide that information. I notice that the cells that correspond to the orange box or the cells that were used to train for the cell type annotation. However, I still need to know what core these cells came from and have it included with in the name as it is in the green section. Is there a way for the detection measurements results to contain the core ID that each cell came from (as shown in the green box) regardless if it was used to for the annotation classifier?

I would generally recommend having two projects when generating classifiers. One contains just the classifier objects, which you can go back to if you need to update the classifier.

The second project is where you access that classifier and run it across your project, without any worry of overwriting your training areas or objects.

That said, would need to know more about your project, which version of QuPath you are using, what kinds of objects you have used in order to provide a specific solution. Script would help.

You should always be able to use a script to overwrite the Name with the core, if that is what you want. Not the best script as you have to adjust it based on the level of the detections (number of parents). I should really fix it at some point.

New version of script here.

As a note, if the cell is a direct child of a TMA object, it gets the core name tacked on to the front of it. So this will result in most of your cells having the core name twice, in order for the cells in the annotations (which have an annotation as a direct parent) to have the core name once.

A specific adjustment for your case could be to only apply the name change to objects that are two levels deep and add a dash.

hierarchy = getCurrentHierarchy()

    coreName = it.getName()
    hierarchy.getDescendantObjects(it, null, qupath.lib.objects.PathCellObject).each{ c->
        if (c.getLevel() == 3){
            cellName = c.getPathClass().toString()
            print cellName
            c.setName(coreName+" - "+cellName)

But still, the best solution is still to not store your training data in the same project.