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

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

Examples

data("pancreasImages")

# Get channel and image names
channelNames(pancreasImages)
#> [1] "H3"   "CD99" "PIN"  "CD8a" "CDH" 
names(pancreasImages)
#> [1] "E34_imc" "G01_imc" "J02_imc"

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