concept_tissue_outline.Rd
The tissue outline provides information about the spatial boundaries of tissue
analyzed. It is represented by detailed polygons that outline the tissue edge. If
the tissue contained by the SPATA2
object is one single continuous section,
only one polygon is required. If the tissue contains multiple sections, multiple
polygons are required.
Every single polygon required to outline the tissue is represented by a data.frame in which each row corresponds to a vertex of this polygon. The columns provide the x- and y-coordinates of the vertices.
The tissue outline is computed by the function identifyTissueOutline()
.
There are two ways to outline the tissue indicated by the argument method
.
The concept behind either method is elaborated on in the two following
sections Tissue outline - Image for method = 'image'
and
Tissue outline - Observations for method = 'obs'
.
A SPATA2
object can contain both, a tissue outline based on the
it's observations and on the image (or multiple images for that matter). The
tissue outline based on the observations is stored in slot @outline of
the SpatialData
object. The tissue outline based on an image lives
in slot @outline of the HistoImage
container of the respective image (which
in turn lives in @slot images of the SpatialData
object next to the other
HistoImage
containers.)
The tissue outline based on the image requires the results of identifyPixelContent()
which assigns each pixel of an image to one of the following categories:
Tissue segment: A contiguous tissue section valid for downstream analyis.
Tissue fragment: A contiguous tissue section that might not be big enough to be included in downstream analysis.
Artifcat: Objects on the image that are likely to be artifacts.
Background:The background.
Pixels or pixel groups that are categorized as belonging to tissue segments are
included in the computation of the tissue outline. Therefore the resulting
tissue outline as obtained by getTissueOutlineDf()
with method = 'image'
corresponds to the spatial extent of what was identified as tissue by the image
processing of identifyPixelContent()
.
All SPATA2
objects contain molecular data mapped to observations,
e.g. barcoded spots, barcoded beads or cells. Several platforms, such as
MERFISH or XENIUM do not provide an image. In this scenario, the outline is computed
as the polygons required to appropriately outline the tissue based on the position
of these data points.