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

CytoImageList-namingR Documentation

Getting and setting the channel and image names

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

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)


BodenmillerGroup/SingleCellMapper documentation built on July 2, 2024, 4:31 p.m.