| HistoImage-class | R Documentation |
HistoImage - ClassS4 class that contains an histology image and information and data
about it. Usually live in slot @images of SpatialData objects.
activelogical. If TRUE, it is the image used by default. Only one HistoImage
in the SpatialData object can be the active at a time.
alignedlogical. If TRUE, indicates that the image was aligned to
the reference image.
bg_colorcharacter. The color of the background.
dircharacter. The directory from where to load the image if slot @image is empty.
imageImage. The image stored as class Image from the package EBImage.
image_infolist. A list of miscellaneous slots that carrie information regarding the image. Protected slots are:
dims: Numeric vector of length three. Output of base::dim() on the read image.
namecharacter. The name of the image.
outlinelist. List of two data.frames in which each row corresponds to a vertice of the polygon required to outline the whole tissue identified on the image or single contiguous tissue sections.
tissue_whole: Data.frame of two variables x_orig and y_orig.
tissue_sections: Data.frame of two variables x_orig, y_orig and section to outline the tissue section outlined.
See the vignette about tissue outline for more information.
overlapnumeric. Numeric vector of length two. Quantifies the overlap
of the tissue outline of this image with the tissue outline of the reference image
with a value between 0-1 before and after alignment via alignImage().
pixel_contentfactor. Named factor where names correspond to the
pixels following the naming convention 'px_w1_h1' encoding the width and height value
of the pixel from the original not transformed image. Values correspond to
the content the pixel displays. See identifyPixelContent() for more information.
referencelogical. TRUE if it is the HistoImage used as the reference
with which other histology images are aligned.
samplecharacter. The name of the tissue portion to which this image belongs.
scale_factorslist. List of single numeric values serving as scale factors for multiple purposes Reserved slot names:
image: Image scale factor with which the original x and y variables (x_orig, y_orig) are multiplied with upon extraction of the coordinates data.frame (resulting in the x and y variables) ensuring alignment with the image.
pixel: Pixel scale factor used to convert pixel values into SI units. It must have an attribute called "unit" conforming to the format "SI-unit/px".
See scale factors for more information.
transformationslist. List of transformations to apply upon extracting the image to ensure alignment with additional images and spatial aspects. In case of default values no transformation is applied.
The following transformations are applied when the image is loaded:
resize_fct: Numeric value between 0-1. Used to resize the resolution of the image.
The following transformations are applied when the image is extracted:
angle: Numeric value that ranges from 0-359. Indicates the angle in degrees by which the image needs to be rotated in clockwise direction. Defaults to 0.
flip: List of two logical values named horizontal and vertical. Indicate
if the image is supposed to be flipped around either axis. Both default to FALSE
stretch: List of two numerical values named horizontal and vertical serving as scale factors with which to stretch the respective axis. Both default to 1.
translate: List of two numeric values named horizontal and vertical. Indicate the number of pixels the image needs to be translated. Positive values shift the image downwards or to the right, respectively. Negative values shift the image upwards or to the left, respectively. Both default to 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.