Skip to content

Object oriented analysis

Pete edited this page Dec 7, 2016 · 2 revisions

This section is still in note form... it may not be entirely comprehensible, and may duplicate other sections.

Digital images are composed of pixels. Pixels are essentially numeric values, often derived from 'amounts of detected light', which can be visualized as colors on a computer monitor. When we look at these colors on the monitor, we don't see the numeric values of the individual pixels, but rather we see the shapes and structures that the colors suggest: the nuclei, glands, blood vessels, muscle, overall tissue, for example.

These shapes and structures are what QuPath represents as objects. For a human, it's easy to see the objects in an image, since humans are rather good at pattern recognition. For QuPath, it is not so easy. However, if QuPath is able to find the objects then it is able to count, compare and quantify them with a speed and objectivity that is vastly better than that which a human could manage.

Consequently, the primary challenge of image processing and analysis using QuPath is to turn raw image data (pixel values) into objects.

The objective of creating objects

The purpose in turning images into objects is that objects are easier to summarize, quantify and interpret. This is what is needed for deeper understanding and new insights.

QuPath objects are quite simple in themselves. Nevertheless, they form the building blocks of a complex representation of the contents of the image. There is a lot to be known about objects and their relationships to one another.

Anatomy of an object

At the most basic level, each object in QuPath has:

  • A name
  • A classification (e.g. tumor, stroma, artefact)
  • A region of interest (ROI)
  • A list of measurements

The ROI is what makes an object 'visible'... it is what is drawn on top of the image to show what part of the image refers to.

The classification is also often very important. Taking the example where each object is a cell, the classification is what distinguishes between cells of different types, e.g. tumor and immune cells. Knowing the classification makes it possible to do more interesting things, e.g. to count the numbers of each class of cell, or measure the distance from each cell to the closest cell of a different class. This second example also needs to use the ROI, since this gives the positional information needed to determine distances.

The list of measurements can not only be interesting in itself, but it can also be useful in terms of automatically figuring out what the classification of the object should be.

These are described in more detail in the Object measurements and Object classifications sections.

Relationships between objects

In addition to the above, each object also has two other important properties:

  • A parent object
  • A list of 'child' objects

These store the relationships between different objects, in a hierarchical (or 'family-tree-like') way.

This makes it possible to use simple objects as the building blocks for more complex structures within QuPath. For example, an entire tissue section could be considered as one (large) object, and inside it there might be tens of smaller child objects representing different structures (e.g. glands, stromal regions), and inside each of these there may be hundreds of further child objects that are smaller still - the individual cells. There might even be additional, subcellular structures.

Not every analysis application needs this hierarchy information, but QuPath provides the tools to represent it - just in case.

To summarize the story so far, the first goal of using QuPath is to turn images into objects. Classifications for objects, and relationships between objects, then also need to figured out. Once that has been done, working with QuPath becomes a matter of exploring these relationships and answering whatever questions the analysis was originally intended to address.

Seeing objects in action

Images might only be a means to an end for QuPath, but looking at pictures is still immensely important for us to be able to tell what QuPath is up to. For this reason, QuPath contains extensive tools to display image data in different ways - including methods to convert objects into images that can help us to visualize them in new ways.

  • GIVE EXAMPLE DATASET TO OPEN & VIEW

The ROI for each object is drawn on top of the image.

  • Show measurement maps
  • Show measurement tables, and click
  • Sort by columns
Clone this wiki locally