renameImage.Rd
Renames an image.
renameImage(object, ...)
# S4 method for class 'SPATA2'
renameImage(object, img_name, new_img_name, ...)
# S4 method for class 'SpatialData'
renameImage(object, img_name, new_img_name, verbose = TRUE, ...)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Used to absorb deprecated arguments or functions.
Character value. The name of the image to be renamed.
Character value. The new name of the image.
Logical. If TRUE
, informative messages regarding
the computational progress will be printed.
(Warning messages will always be printed.)
The updated input object, containing the added, removed or computed results.
library(SPATA2)
object <- example_data$object_UKF275T_diet
getImageNames(object)
plotImage(object, img_name = "normres") # fails, does not exist
object <- renameImage(object, img_name = "image1", new_img_name = "normres")
plotImage(object, img_name = "normres")