Calculate the binary reference image using k-means clustering. K-Means is run on the first `npcs` principal components to speed up the calculations.
refImageBinaryKmeans(
dataset,
npcs = 10,
alignTo = "detected",
invertAligned = FALSE
)
ms.image-class object with binary intensities.
msi.dataset-class object. See msiDataset.
int (default = 10). Number of principal components to calculate.
string (default = "detected"). Sample reference image to align the estimate binary image. It is expected to correlate with the sample location.
boolean (default = FALSE). If TRUE, the binary image is
inverted after being aligned to the sample reference (alignTo
).