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, ...)

Arguments

object

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.

img_name

Character value. The name of the image to be renamed.

new_img_name

Character value. The new name of the image.

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

The updated input object, containing the added, removed or computed results.

Examples


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")