SFE-transform | R Documentation |
These functions perform affine transformations on SFE objects, including all
geometries and images. The transformation is performed on each sample as a
whole. This differs from functions such as mirrorImg
in that
mirrorImg
and rotateImg
transform the image with the center at
the center of the image itself. In contrast, the center of transformation
here is the center of the bounding box of the entire sample, including
images.
transpose(sfe, sample_id = "all", maxcell = NULL, filename = "")
mirror(
sfe,
sample_id = "all",
direction = c("vertical", "horizontal"),
maxcell = NULL,
filename = ""
)
rotate(sfe, sample_id = "all", degrees, maxcell = 1e+07)
translate(sfe, sample_id = "all", v)
scale(sfe, sample_id = "all", factor)
affine(sfe, sample_id = "all", M, v, maxcell = 1e+07)
sfe |
An SFE object. |
sample_id |
Sample(s) to transform. |
maxcell |
Rotating |
filename |
character. Output filename |
direction |
character. Should (partially) match "vertical" to flip by rows, or "horizontal" to flip by columns |
degrees |
How many degrees to rotate. Positive number means clockwise and negative number means counterclockwise. |
v |
Vector to spatially translate the SFE object. |
factor |
Numeric, scaling factor. |
M |
A 2x2 numeric matrix for the linear transformation in the xy plane. |
For images that are not loaded into memory, rotateImg
will load
SpatRasterImage
into memory and all image operations except translate
will load BioFormatsImage
into memory.
An SFE object with the sample(s) transformed.
library(SFEData)
sfe <- McKellarMuscleData("small")
sfe2 <- transpose(sfe)
sfe3 <- mirror(sfe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.