Removing parts of simple tissue detection

Hi,

After a course in ImageJ and doing a lot of tutorials available for QuPath… I am on to the next steps of my mission to be able to analyse images.

In this case, I am having images that are H-DAB. But on some of them, there is some parts outside the tissue that get detected as tissue when I perform " Simple tissue detection ". This area then also contains negative cells after the positive cell detection.

I tried to select the annotation created by the tissue detection and use the brush + ALT to remove those parts of the tissue I do not like, but for some reason, it does not seem to work.

I know I can also adjust the threshold and the min and max area to detect to get this done, but sometimes its impossible to find this for all pictures in the experiment and it is easier and faster to do it with the brush tool.

Do I do something wrong or is this just simply not possible?

Thanks a lot for your answer.

Susan

There is some additional information on simple tissue detection here:


but the mouseover popups should also be useful there. You probably want to split you annotation into separate pieces and delete the ones you don’t want.
As you said, it is cleaner from a scientific perspective if you can set a threshold on the size and not have to manually edit the samples, but sometimes this isn’t possible.

The reason you can’t edit the annotation is because it is locked. You could also unlock it and edit it before running the cell detection.


See the section on locking objects.

@Research_Associate Thank you, this has been very helpfull. I am now struggling with ways to get all my positive cells detected. I wish I had somebody that could look with me through the actual data and help me on what happens when I change what. Your references are very helpfull but so far not succesfull yet on all parts… :wink:

1 Like

There are quite a few posts on cell detection across the forum, and plenty of resources from Pete in both video and written format.



But, if you want specific help, you would need to post an image indicating what is going wrong.

Hi @Research_Associate,

For example this is going wrong:

You can see a tissue of a tumor stained with H-DAB and as a marker CD3, where I did a simple tissue detection over the whole image with the settings as you can see them in the popup window. However, due to the fact we deliver our samples to diagnostics and they are not super carefully processed, folded tissue is present on the slide or tissue with multiple layers of cells. I now used the wand tool to erase one of the parts from the annotation by hand, but I would actually prefer it if the software can do this. But as you can see, background of this area is equally intense as the positive CD3 cells. Any ideas on how to solve this? (And then I simply ignore the fact that there are some true positive cells on those parts of the tissue as well, just because I do not think there is a way to separate this)

Thanks :slight_smile:

Another problem to solve for me is this:

I am stuck with finding out why it is not including those cells in the top middle, which are actually quite a lot and of course (as always…) positive. I tried changing different parameters like the treshold 1 and background radius, sigma, median filter radius, but I can not get it better then this.

We already decided that positive area will work better for us for the comparison between samples, so I am less worried about fragmented cells etc, I just want it to be detected as cells and as positive. It is included in the tissue detection already.

If you only have one or two slides, it might be fastest to do it by hand. A few other options include…

  1. During cell detection, make use of “Background radius” and a much smaller “Max background intensity” to try to ignore cells in those regions automatically. The choose your own adventure linked above covers this a bit.
  2. Replace your simple tissue detection with a pixel classifier that is trained to ignore those types of areas. I think the best example of using pixels classifiers is currently the LJI workshop video. https://forum.image.sc/t/qupath-workshop-from-samples-to-knowledge-is-available-online/35929?u=research_associate
1 Like

If you want positive area, you also may want to look into the pixel classifier. In the future, hopefully the Simple Thresholder will be available for brightfield images, but at the moment, solid brightfield thresholding is somewhat limited in M9. You may have better luck using version 0.1.2 and testing out the Analyze menu’s Positive pixel detection
https://forum.image.sc/t/qupath-intro-choose-your-own-analysis-adventure/27906/16?u=research_associate

I suspect that, based on some of your other cells being merged groups of cells, that you could either reduce your “Pixel size” and “Sigma,” or increase the “Maxiumum area” of those cells if you wanted “some kind of detection.” Increasing the area will result in large blobs of cells though.

@Research_Associate thanks! I am planning on watching the workshop soon. Also your advise on which parameters to change was very helpfull :slight_smile:

2 Likes