Use registerImage() to add a new image in form of a HistoImage to the object.

Use removeImage() to savely discard images and their HistoImage container that are no longer needed.

Do not confuse with loadImage() and unloadImage().

registerImage(object, ...)

# S4 method for class 'SPATA2'
registerImage(
  object,
  img_name,
  img = NULL,
  dir = NULL,
  unload = TRUE,
  process = FALSE,
  overwrite = FALSE,
  verbose = TRUE
)

# S4 method for class 'SpatialData'
registerImage(
  object,
  img_name,
  img = NULL,
  dir = NULL,
  unload = FALSE,
  process = FALSE,
  overwrite = FALSE,
  verbose = TRUE
)

removeImage(object, ...)

# S4 method for class 'SPATA2'
removeImage(object, img_name)

# S4 method for class 'SpatialData'
removeImage(object, img_name)

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 image to remove. Must neither be the active nor the reference image.

img

An image. Must be usable with EBImage::as.Image().

dir

Character value. The directory from where to retrieve the image.

overwrite

Logical value. Must be TRUE to allow overwriting.

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.

Tutorials

Extensive tutorials for how to use this function can be found on our website https://themilolab.github.io/SPATA2/ .