getImageTransformations | R Documentation |
Extracts a list of instructions for required
image transformations to ensure alignment of the image with
the reference image
.
getImageTransformations(object, ...)
## S4 method for signature 'SPATA2'
getImageTransformations(object, img_name = activeImage(object), ...)
## S4 method for signature 'SpatialData'
getImageTransformations(object, img_name = activeImage(object), ...)
## S4 method for signature 'SpatialData'
getImageTransformations(object, img_name = activeImage(object), ...)
## S4 method for signature 'HistoImage'
getImageTransformations(object, ...)
object |
An object of class |
... |
Used to absorb deprecated arguments or functions. |
img_name |
Character value. The name of the image of interest.
If |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.