| binKmeans2,msi.dataset-method | R Documentation | 
Return a binary mask generated applying k-means clustering on peaks intensities. A finer segmentation is obtained by using a larger number of clusters than 2. The off-sample clusters are merged looking at the most frequent labels in the image corners. The lookup areas are defined by the kernel size.
## S4 method for signature 'msi.dataset'
binKmeans2(
  object,
  mzQuery = numeric(),
  useFullMZ = TRUE,
  mzTolerance = Inf,
  numClusters = 4,
  kernelSize = c(3, 3, 3, 3),
  numCores = 1,
  verbose = TRUE
)
object | 
 msi.dataset-class object  | 
mzQuery | 
 numeric. Values of m/z used to calculate the reference image.
2 values are interpreted as interval, multiple or single values are searched
in the m/z vector. It should be left unset when using   | 
useFullMZ | 
 logical (default = 'TRUE“). Whether all the peaks should be used to calculate the reference image.  | 
mzTolerance | 
 numeric (default = Inf). Tolerance in PPM to match the
  | 
numClusters | 
 numeric (default = 4). Number of k-means clusters.  | 
kernelSize | 
 4D array (default = c(3, 3, 3, 3)). Array of sizes in pixels of the corner kernels used to identify the off-sample clusters. The elements represent the size of the top-left, top-right, bottom-right and bottom-left corners. A negative value can be used to skip the corresponding corner.  | 
numCores | 
 (default = 1). Multi-core parallel computation of k-means.
Each core corresponds to a repetition of k-means. If   | 
verbose | 
 logical (default = 'TRUE“). Show additional output.  | 
ms.image-class object representing the binary mask image.
Paolo Inglese p.inglese14@imperial.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.