nat.templatebrains v1.0


Monthly downloads



NeuroAnatomy Toolbox ('nat') Extension for Handling Template Brains

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



natverse Docs CRAN status Release Version Build Status Coverage Status Lifecycle: stable Downloads

Quick Start

For the impatient ...

# install

# use

# basic examples for templatebrain class

# run examples for mirroring
# ... and bridging
# NB you need to install nat.flybrains package to run some examples which are
# not run by default

# get overview help for package
# help for main functions
# if you want to construct your own templatebrains

# run tests

nat.templatebrains provides additional functions for use with the NeuroAnatomy Toolbox (nat). In particular, it defines the notion of a template brain, as used in image registration of 3D data, along with bridging registrations between template brains (see and mirroring registrations from one brain hemisphere to the other.

This is a generic package, usable with data from any species. For Drosophila specific functions and data, see our nat.flybrains package. Installing/loading nat.flybrains will automatically install/load nat.templatebrains.


This package has now been released to CRAN (since v0.4.1), but since there are regular updates between CRAN releases we generally recommend that you install the development version from GitHub.

CRAN release


Development version

If you want to install the development version of nat.templatebrains, you can do this using devtools. You will probably also wish to install the development version of the nat package if you do this.

if (!require("remotes")) install.packages("remotes")

Note: Windows users may need Rtools as well as remotes to install this way.

Functions in nat.templatebrains

Name Description
display_slice Display an image slice in 3D
FCWB.demo Sample template brain: FlyCircuit Whole Brain
all_templatebrains Find all template brains or those matching a given image volume
add_reglist Add reglist object describing a bridging/mirroring registration
as.templatebrain Use image file or other object to initialise template brain
allreg_dataframe Make data.frame with details of all registrations
bridging_sequence Find sequence of one or more bridging registrations
templatebrain-meths Template brain methods
update_reg_repos Update local copy of git repository containing registrations
bridging_graph Make or query connected graph of bridging registrations
templatebrain Construct templatebrain object for an image registration template
plot3d.templatebrain Plot 3D surface of a template brain
regtemplate Get or set the registration template space in which an object lives
xform_brain Transform 3D object between template brains
nat.templatebrains-package NeuroAnatomy Toolbox add-on package for handling template brains
mirror_brain Mirror 3D object around a given axis, optionally using a warping registration
add_reg_folders Set or list local folders containing registrations for nat.templatebrains
download_reg_repo Download and register git repository containing registrations
local_reg_dir_for_url Standard local checkout location for extra registration directories
No Results!

Last month downloads


Type Package
License GPL-3
Encoding UTF-8
RoxygenNote 7.1.1
Language en-GB
NeedsCompilation no
Packaged 2020-10-19 14:05:49 UTC; jefferis
Repository CRAN
Date/Publication 2020-10-19 14:20:02 UTC

Include our badge in your README