S4 class that represents manually annotated structures in histology images.

Slots

area

list. A named list of data.frames with the numeric variables x and y. Observations correspond to the vertices of the polygons that are needed to represent the image annotation. Must contain a slot named outer which sets the outer border of the image annotation. Can contain multiple slots named inner (suffixed) with numbers that correspond to inner polygons - holes within the annotation.

id

character. String to identify the object in a list of multiple objects of the same class.

image

image. Cropped version of the annotated parent image that only contains the area where the annotated structure is located (plus expand). This slot should be empty as long as the ImageAnnotation object is located in an object of class HistologyImaging. Extracting it with getImageAnnotation() or getImageAnnotations() can add a cropped image to the slot. The parameters with which the image was cropped should be in the list of slot @image_info.

image_info

list. List of information around the image that is currently stored in slot @image after being cropped and set within getImageAnnotation() or getImageAnnotations().

info

list. Stores meta data and miscellaneous information regarding the image annotation. Slots that should always exist:

  • parent_origin: Character string. Content from slot @info$origin of the HistologyImaging object the annotation belongs to. Identifies the exact image on which the annotation was drawn in.

  • parent_id: Character string. Content from slot @id of the HistologyImaging object the annotation belongs to. Identifies the HistologyImaging object (the tissue) the annotation belongs to.

  • current_dim: Numeric vector of length two. Width and height of the image the @area data.frame is currently scaled to. Used to scale the @area data.frame if the image annotation is extracted and added to a SPATA2 object with different image resolution.

  • current_just: List of two slots that track justification changes. Is used to readjust the @area data.frame if the image annotation is extracted and added to a SPATA2 object with different justifications.

    • angle: Numeric value that ranges from 0-359.

    • flipped: List of two logical values named horizontal and vertical.

misc

list. A flexible list for miscellaneous input.

tags

character. Vector of arbitrary length. Contains tags that can be used to group and select image annotations in different manners.

Image annotation tags

Slot @tags contains a character vector of arbitrary length that allows to filter image annotations using a combination of arguments tags and test in functions that refer to one or more image annotations like getImageAnnotations() or plotImageAnnotations().

Input for argument tags specifies the tags of interest. Argument test decides about how the specified tags are used to select the image annotations of interest. There are multiple options:

  1. Argument test set to 'any' or 1: To be included, an image annotation must be tagged with at least one of the input tags.

  2. Argument test set to 'all' or 2: To be included, an image annotation must be tagged with all of the input tags. Can contain tags that are not specified.

  3. Argument test set to 'identical' or 3: To be included, an image annotation must be tagged with all of the input tags. Can not be tagged with anything else.

  4. Argument test set to not_identical or 4: To be included, an image annotation must not be tagged with the combination of input tags.

  5. Argument test set to 'none' or 5: To be included, an image annotation must not contain any of the input tags.

Note that the filtering process happens in addition to / after the filtering by input for argument ids.