Define the problem
Brightfield analyses in QuPath
Define the problem - choose a final output measurement first.
For these images I have chosen to be interested in the percentage of heavily eosin stained (will call it fibrotic for this analysis, though I am not a pathologist and am not even sure what tissue type this is) out of the entire tissue slice, and the ratio of cells within the fibrotic and non-fibrotic regions, excluding the heavily hematoxylin stained areas.
The analysis will require several measurements, not all of which will be needed at the end:
Total area of the tissue slice
Area of Background (slide)
Area of heavy hematoxylin staining
Area of fibrosis
Area of other tissue
Cell count in Other tissue
Cell count in fibrotic area
Percentage of elongated tissue in each region with cells
Bonus: Excluded area due to folds or tissue damage?
Rough measurement-based steps could be as follows:
Create a Tissue thresholder to locate the tissue of interest, vs background.
Within the Tissue areas, use a pixel classifier to find fibrotic, “normal,” and hematoxylin heavy areas (*possibly damaged tissue)
Once the Tissue has been subdivided, select the fibrotic and normal tissue regions to run cell detection.
Run a cell classifier within each region. In this case I will choose elongated vs round nuclear shapes.
With these steps laid out, we should select a test set of images to perform steps like determining thresholds for positivity. I will use Tile 4.ome.tif and Tile 1.ome.tif as I already noticed that tile 4 has a tissue fold on it, which will be useful for the pixel classifier training. Tile 1 will help ensure a minimum size threshold is set so as not to include extra bits of tissue.
It is also important to figure out at this point how detailed of an analysis you want to perform, and what level of error you can accept. In order to make the analysis in this example workable across a variety of computers, I will use moderate resolutions for all of my classifiers. This choice decreases my accuracy, but increases the speed at which the scripts in the demo project will run. If your computer can handle it, I encourage you to go through all of the steps with a higher resolution to try to refine your results.
In the real world, tradeoffs might be slightly different. Turnaround speed might be important in some clinical settings, but the tradeoffs in analysis tend to be things more like losing broad features when zooming in to detect the small features. QuPath only supports up to 8x8 pixel filters based on the Pixel classifier base resolution, meaning you sometimes need to choose between large features and finder details. Alternatively, you might try sequentially higher resolution Pixel classifiers that can be run within lower resolution pixel classifiers, much like we will run a Pixel classifier within a Thresholder.
Rant on image analysis abuse