CytoImageList-naming: Getting and setting the channel and image names

Description Setting and getting the channel names Setting and getting the image names Author(s) Examples

Description

Methods to get and set the names of individual channels or the names of individual images.

Setting and getting the channel names

In the following code, x is a CytoImageList object containing one or multiple channels. The channel names can be replaced by value, which contains a character vector of the same length as the number of channels in the images.

channelNames(x)

Returns the names of all channels stored in x

channelNames(x) <- value

Replaces the channel names of x with values. For this, value needs to have the same length as the number of channels in x

Setting and getting the image names

Here, x is a CytoImageList object. The element names can be replaced by value, which contains a character vector of the same length as the number of images. In case of the CytoImageList object, elements are always images.

names(x)

Returns the names of all images stored in x

names(x) <- value

Replaces the image names of x with value. For this, value needs to have the same length as x

Author(s)

Nils Eling (nils.eling@dqbm.uzh.ch)

Examples

1
2
3
4
5
6
7
8
9
data("pancreasImages")

# Get channel and image names
channelNames(pancreasImages)
names(pancreasImages)

# Set channel and image names
channelNames(pancreasImages) <- paste0("marker", 1:5)
names(pancreasImages) <- paste0("image", 1:3)

cytomapper documentation built on Jan. 30, 2021, 2:01 a.m.