How do I view measurements?#
What will I learn?
How to view a table of measurements in QuPath
How to visualize the distribution of a measurement across cells
How to visualize measurements on an image
How to generate smoothed versions of measurements
In this section, we’ll continue using OS-2.ndpi.
To recap, this shows a tissue sample with different cell types, stained for Ki67.
The analysis question we want to answer is:
What percentage of tumour cells are positive for Ki67?
However, images contain a lot of information. There might be some other questions we want to answer as well – perhaps at the level of individual cells.
As it happens, QuPath already generates measurements during cell detection. These include morphological measurements (those relating to cell shape) as well as intensity-based measurements (e.g., the intensity of a nuclear stain).
In this chapter, we’ll examine those measurements. Later, we’ll see how useful they can be to answer our original analysis question.
Define a specific annotation#
Fig. 62 Specify annotation#
What to do
Open
OS-2.ndpiRun
Run and set the parameters
Type:
RectangleX origin:
48000 pxY origin:
26000 pxWidth:
20000 pxHeight:
20000 px
Press Add annotation
In this chapter and the next we’ll want to create a large annotation containing a mixture of cell types. enables us to standardize things so that we should all have exactly the same annotation.
Then, before detecting cells, take some time to calibrate your estimations and discover how good you are at assessing Ki67 by eye.
Question
How many nuclei do you think are visible inside this annotation?
Question
What percentage of all nuclei inside the annotation do you think are Ki67 positive (i.e. brown)?
Detecting cells#
What to do
Run .
Select Optical density sum in the dropdown box for Detection image.
Set Requested pixel size to
1.0(to speed things up)Click Run.
This follows the process we used in “How do I count positive cells?” – but without being too fussy about annotating only tumour cells.
Fig. 63 An annotation containing positive and negative cells of different types#
QuPath’s measurements#
The easiest way to view measurements for cells in QuPath is to open the detection measurement table. This enables you to get an overview of the different measurements made on detections, to sort detections based on measurements, and to visualize the distribution of measurements across all cells.
What to do
Run .
Click Show plots.
The plot shown by default is a histogram. This shows a 1-dimensional overview of a single measurement across all cells in the image.
Fig. 64 QuPath’s detection measurements and a histogram#
As well as histograms, we can investigate the distribution of measurements using scatter plots.
What to do
Click Scatter plot.
Plot Nucleus: DAB OD mean against Nucleus/Cell area ratio
Fig. 65 QuPath’s detection measurements and a scatter plot#
Measurement maps#
What to do
Run .
Select Nucleus/Cell area ratio.
Choose a colour scheme and enable fill detections (F).
The measurement table allows you to view measurements in isolation. However, it’s also good to view measurements in the context of the image. This can help to reveal spatial patterns among the cells that can be key to understanding the tissue.
Fig. 66 A measurement map of nucleus/cell area ratio#
Smoothed measurements#
Fig. 67 Smoothed features window#
What to do
Run
Enter a radius of
50and click Run.Run , or click Update map if you left the window open.
Select the smoothed version of Nucleus/Cell area ratio you just created.
Choose a color scheme and enable fill detections (F).
While measurement maps are useful, they are often very granular, and it can be hard to identify more high-level patterns in the image. QuPath can smooth the features among neighbouring cells, which can help pick out where cells in certain regions share similar characteristics.
Fig. 68 A smoothed nucleus/cell area ratio heatmap#
Challenge: the little cells#
You’ve learned a lot about measurements and classifications in QuPath. But how good are you at crypto-microbiology?
Puzzle
Run (you’ll need your cells later!)
Open the image
noise.tif.Import new cells from the
little-cells.geojsonfile by dragging & dropping it onto QuPath, or by navigating to
You should see a dense collection of cells.
There is a subpopulation of cells with nucleus properties that are different from the others, and this subpopulation has a chilling message for you.
Use what you’ve learned in this chapter to find this cell subpopulation.