Sets and extracts the active (default) image name.

activeImage(object, ...)

# S4 method for class 'SPATA2'
activeImage(object)

# S4 method for class 'SpatialData'
activeImage(object)

activateImage(object, ...)

# S4 method for class 'SPATA2'
activateImage(
  object,
  img_name,
  load = TRUE,
  unload = TRUE,
  verbose = TRUE,
  ...
)

# S4 method for class 'SpatialData'
activateImage(
  object,
  img_name,
  load = TRUE,
  unload = TRUE,
  verbose = TRUE,
  ...
)

activateImageInt(object, ...)

# S4 method for class 'SPATA2'
activateImageInt(object, img_name, load = FALSE)

# S4 method for class 'SpatialData'
activateImageInt(object, img_name, load = FALSE)

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 activate as the default image.

verbose

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

(Warning messages will always be printed.)

Value

  • activateImage(): Updated SPATA2 object.

  • activeImage(): Character value. Name of the currently active image.

Examples


library(SPATA2)

data("example_data")

object <- example_data$object_UKF275T_diet

getImageNames(object)

activeImage(object)
plotImage(object)

getCoordsDf(object) # with image1

object <- activateImage(object, img_name = "very_low_res")
activeImage(object)
plotImage(object)

# note how x_orig, y_orig remain the same, but x and y differ
getCoordsDf(object) # with very_low_res