mirror_dyak() mirrors neurons, surfaces and other point data
in yakuba space to the opposite side of the VNC.
symmetric_dyak() transforms objects onto a symmetrised version of the
yakuba template, optionally mirroring across the midline.
Arguments
- x
An object compatible with
nat::xform()(neuron, neuronlist, dotprops, surface, coordinate matrix etc).- units
Coordinate units of
xand the returned object. Defaults to nm, matchingread_dyak_neurons().- subset
Optional subset passed to
nat::xform(), e.g. when transforming selected elements of a neuronlist.- ...
Additional arguments passed to
nat::xform().- mirror
Whether to mirror across the midline of the symmetric space.
Details
Mirroring maps x into the symmetric yakubasym space with a
bundled thin-plate spline registration (yakuba_yakubaSym_1000pts_tps.rds,
computed by Sebastian Cachero), flips across the X axis and then maps back
with the inverse registration. As for the default method of
xform_dyak2manc(), points are first shifted by (-6.5, -7.1, -8.0) µm to
match the frame in which the registration was computed. The registration is defined in microns;
nm inputs are scaled before and after transformation. Requires the
suggested Morpho package.
Denser versions of the registration (10000 points) were also computed but gave < 1 µm change in mirrored positions at ~500x the compute cost.
symmetric_dyak() returns objects in yakubasym space, using
units for both input and output.
Examples
if (FALSE) { # \dontrun{
dna02 <- read_dyak_neurons("DNa02")
dna02.m <- mirror_dyak(dna02)
plot3d(dna02, col = "black")
plot3d(dna02.m, col = "red")
} # }
if (FALSE) { # \dontrun{
# DNa02 neurons and their mirror images in symmetric space
dna02.sym <- symmetric_dyak(dna02)
dna02.sym.m <- symmetric_dyak(dna02, mirror = TRUE)
} # }