Get or set the registration template space in which an object lives

regtemplate(x)

regtemplate(x) <- value

Arguments

x

The 3D object whose registration space will be set/returned

value

The registration template brain (either a character vector naming the space or a templatebrain object)

Value

Either a templatebrain object or the newly tagged object

Details

In order to facilitate transformations between objects in defined anatomical spaces these functions allow the registration template for an object to be specified. Most of the time you will not need to use these functions manually since the appropriate space will be set by the function xform_brain and friends.

Examples

if (FALSE) {
library(nat.flybrains)
kcs3=kcs20[1:3]
regtemplate(kcs3)=FCWB
regtemplate(kcs3)

kcs3m=mirror_brain(kcs3, brain=regtemplate(kcs20))
plot3d(kcs3, col='red')
plot3d(kcs3m, col='green')
}