Learn R Programming

SPUTNIK (version 1.4.2)

refImageBinaryKmeans: Calculate the binary reference image using k-means clustering. K-Means is run on the first `npcs` principal components to speed up the calculations.

Description

Calculate the binary reference image using k-means clustering. K-Means is run on the first `npcs` principal components to speed up the calculations.

Usage

refImageBinaryKmeans(
  dataset,
  npcs = 10,
  alignTo = "detected",
  invertAligned = FALSE
)

Value

ms.image-class object with binary intensities.

Arguments

dataset

msi.dataset-class object. See msiDataset.

npcs

int (default = 10). Number of principal components to calculate.

alignTo

string (default = "detected"). Sample reference image to align the estimate binary image. It is expected to correlate with the sample location.

invertAligned

boolean (default = FALSE). If TRUE, the binary image is inverted after being aligned to the sample reference (alignTo).