getImageTransformations.Rd
Extracts a list of instructions for required
image transformations to ensure alignment of the image with
the reference image
.
getImageTransformations(object, ...)
# S4 method for class 'SPATA2'
getImageTransformations(object, img_name = activeImage(object), ...)
# S4 method for class 'SpatialData'
getImageTransformations(object, img_name = activeImage(object), ...)
# S4 method for class 'SpatialData'
getImageTransformations(object, img_name = activeImage(object), ...)
# S4 method for class 'HistoImage'
getImageTransformations(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.
Character value. The name of the image of interest.
If NULL
, the active image is chosen by default. Either way, must
be one of getImageNames()
.
A list with the following structure:
angle: Numeric value that ranges from 0-359. Indicates the angle in degrees b y which the image needs to be rotated in clockwise direction.
flip: List of two logical values named horizontal and vertical indicating whether the image is to be flipped along the respective axis.
stretch: List of two numeric values named horizontal and vertical indicating whether (or how much) the image is to be stretched along the respective axis.
translate: Vector of two numeric values named horizontal and vertical. Indicate the number of pixels the image needs to be translated. Positive values shift the image downwards or to the right, respectively. Negative values shift the image upwards or to the left, respectively.
library(SPATA2)
data("example_data")
object <- example_data$object_UKF313T_diet
plotImage(object)
object <- alignImage(object, img_name = "lowres", angle = 90)
# note that $angle contains instructions to rotate the image to 90°
getImageTransformations(object, img_name = "lowres")
plotImage(object)
object <- resetImageTransformations(object, img_name = "lowres")
getImageTransformations(object, img_name = "lowres")
plotImage(object)