Can the pixel classifier or other QuPath feature be used to create a new annotation of interest (stroma) and apply DAB positive cell detection?

Hi everyone, I am performing cell-positive screening assays on DAB-stained whole IHC tissue sheets (CD8 +).
I hope you can help me with the step by step to use the tissue classifier, specifically how to train the software to differentiate stroma from the rest of the tissue and thus identify the stroma in a new annotation to be able to apply the positive cell detection with DAB.
Thank you!

You can use the pixel classifier to identify different regions of interest, in which you could then apply positive cell detection.
To do so:

  1. Go to Classify > Pixel classification > Train pixel classifier.
  2. Play around with the parameters to find a classification that suits you (don’t forget to annotate at least one annotation of 2 different classes!), you can also use the *Ignore class.
  3. Save your classifier.
  4. Click on Create objects, Full image and choose Annotations as New object type.
  5. You now have annotations for all your different classes, you might want to clean it up a bit by getting rid of annotations that are not necessary (this is up to you).

You can run your Positive cell detection with your annotations as ‘parent annotation’.
More info on the Pixel classifier here.

Note: to select only annotations with a specific classification, you can do this in your script editor:

def myClass = "Tumor"

EDIT: More convenient method in the script sample, as pointed out to me.