plotClusterImage: plotClusterImage.

Description Usage Arguments Value

View source: R/plotPeakMatrix.R

Description

Plot a segmentation image with the user-given clusters.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plotClusterImage(
  peakMatrix,
  clusters,
  nrow = 2,
  ncol = 2,
  byrow = T,
  margin = 20,
  img_names = peakMatrix$names,
  labels = img_names,
  rotations = rep(0, length(img_names)),
  mirror_x = rep(F, length(img_names)),
  mirror_y = rep(F, length(img_names)),
  pixel_size_um = 100
)

Arguments

peakMatrix

the peak matrix in an rMSIproc object.

clusters

a vector with integer number according the cluster of each pixel.

nrow

number of rows of the plotted matrix layout (only used if byrow == F)

ncol

number of cols of the plotted matrix layout (only used if byrow == T)

byrow

a bool specifing if images must be arranged in rows.

margin

the separation between plotted images.

img_names

a character vector with img names in the desierd plotting order.

labels

an alternative character vector with the labels to be displayed for each image.

rotations

a vector with the rotation of each images specified in degrees.

mirror_x

a bool vector specifing if each image must be flipped or not in X direction prior to rotation.

mirror_y

a bool vector specifing if each image must be flipped or not in Y direction prior to rotation.

pixel_size_um

the pixel resolution in um.

Value

a vector with the used color for each cluster sorted according clustering numering in assending order.


prafols/rMSIproc documentation built on Dec. 12, 2021, 7:31 p.m.