nat.templatebrains-package {nat.templatebrains}R Documentation

NeuroAnatomy Toolbox add-on package for handling template brains

Description

This package provides a class templatebrain that stores key information about reference brains along with helper functions to simplify transformation of data between template brains (a.k.a bridging) and mirroring of data within a template brain.

Extends package 'nat' (NeuroAnatomy Toolbox) by providing objects and functions for handling template brains.

Helper functions

Easy-to-use functions for transforming data from one template brain to another, displaying slices alongside 3D data, etc. are provided.

For transforming between spaces, see especially xform_brain, mirror_brain. The regtemplate functions allow an R object containing neuroanatomical data to be tagged as in a particular template brain space.

plot3d.templatebrain provides a simple way to plot a surface object representing a given template brain.

Registrations

Functions such as xform_brain provided by nat.templatebrains are not very useful unless you tell the package about bridging/mirroring registrations that you have available. There are 4 supported ways to add registrations to the search list that will be considered:

Note that the package implements a cache to avoid rescanning the directories in the registration search list all the time. The functions mentioned above will automatically ensure that the cache is reset whenever a new set of registrations are added to the search list.

Package options

It is strongly recommended that you use the functions mentioned above rather than manipulating the registration search list directly.

Note that registration directories will be searched in the order that they are listed. It is therefore strongly recommended that individual registrations have globally unique names.

Author(s)

Maintainer: Gregory Jefferis jefferis@gmail.com (ORCID)

Authors:

See Also

nat

Useful links:

Examples

## Not run: 
# Plot all known registrations
plot(bridging_graph(), vertex.size=25)

## manually add a new directory containing registrations to the search list
# Don't do this unless essential!
options(nat.templatebrains.regdirs=union(
  getOption('nat.templatebrains.regdirs'), "/my/new/path"))
# NB after mucking around with paths manually you must also manually update
# the cache so that new registrations are actually used.
nat.templatebrains:::reset_cache()

## same, but override any built-in registration by putting the new path
# at the first position in the search list
options(nat.templatebrains.regdirs=union("/my/new/path"),
  getOption('nat.templatebrains.regdirs'))

## End(Not run)

[Package nat.templatebrains version 1.1 Index]