nat.templatebrains (version 1.1)

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

Description

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

Usage

regtemplate(x)

regtemplate(x) <- value

Value

Either a templatebrain object or the newly tagged object

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)

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

Run this code
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')
}

Run the code above in your browser using DataLab