R/CytoImageList-utils.R
CytoImageList-naming.Rd
Methods to get and set the names of individual channels or the names of individual images.
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
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
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)