computeCaptureArea: Compute capture area

computeCaptureAreaR Documentation

Compute capture area

Description

Computes and updates the capture area (field of view).

Computes and updates the capture area (field of view).

Usage

computeCaptureArea(object, ...)

## S4 method for signature 'SPATA2'
computeCaptureArea(object, ...)

## S4 method for signature 'SpatialData'
computeCaptureArea(object, ...)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

...

Used to absorb deprecated arguments or functions.

Details

The computeCaptureArea function calculates the capture area for the spatial data based on the specific method used. The process differs slightly depending on whether the spatial method is a Visium platform or another type:

  • For Visium platforms:

    • The coordinates data frame is first ensured to be complete using complete_visium_coords_df.

    • A buffer is added around the capture area to account for the physical spacing between capture areas, calculated using the center-to-center distance (CCD).

    • The capture area is defined by the four corners (vertices) of the bounding box around the coordinates, adjusted by the buffer.

  • For non-Visium platforms:

    • The capture area is calculated as the range of the x and y coordinates, defining a simple bounding box.

After computing the capture area, it is stored in the ⁠@capture_area⁠ slot of the SpatialData.

The computeCaptureArea function calculates the capture area for the spatial data based on the specific method used. The process differs slightly depending on whether the spatial method is a Visium platform or another type:

  • For Visium platforms:

    • The coordinates data frame is first ensured to be complete using complete_visium_coords_df.

    • A buffer is added around the capture area to account for the physical spacing between capture areas, calculated using the center-to-center distance (CCD).

    • The capture area is defined by the four corners (vertices) of the bounding box around the coordinates, adjusted by the buffer.

  • For non-Visium platforms:

    • The capture area is calculated as the range of the x and y coordinates, defining a simple bounding box.

After computing the capture area, it is stored in the ⁠@capture_area⁠ slot of the SpatialData.

Value

The updated input object, containing the added, removed or computed results.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.