nat: NeuroAnatomy Toolbox for Analysis of 3D Image Data

NeuroAnatomy Toolbox (nat) enables analysis and visualisation of 3D biological image data, especially traced neurons. Reads and writes 3D images in NRRD and 'Amira' AmiraMesh formats and reads surfaces in 'Amira' hxsurf format. Traced neurons can be imported from and written to SWC and 'Amira' LineSet and SkeletonGraph formats. These data can then be visualised in 3D via 'rgl', manipulated including applying calculated registrations, e.g. using the 'CMTK' registration suite, and analysed. There is also a simple representation for neurons that have been subjected to 3D skeletonisation but not formally traced; this allows morphological comparison between neurons including searches and clustering (via the 'nat.nblast' extension package).

Install the latest version of this package by entering the following in R:
AuthorGregory Jefferis [aut, cre], James Manton [aut]
Date of publication2016-11-10 08:18:57
MaintainerGregory Jefferis <>

View on CRAN

Man pages

affmat2cmtkparams: Decompose homogeneous affine matrix to CMTK registration...

all.equal.dotprops: all.equal method tailored to dotprops objects

all.equal.im3d: Check equality on data and key attributes of im3d objects

all.equal.neuron: Check equality on key fields of neuron object

amiramesh-io: Read AmiraMesh data in binary or ascii format

amiratype: Return the type of an amiramesh file on disk or a parsed...

as.im3d: Convert a suitable object to an im3d object.

as.mesh3d: Convert an object to an rgl mesh3d

as.neuronlist: Make a list of neurons that can be used for coordinate...

as.neuronlist.neuronlistfh: convert neuronlistfh to a regular (in memory) neuronlist

boundingbox: Get the bounding box of an im3d volume or other compatible...

Cell07PNs: Cell07PNs: 40 Sample Projection Neurons from Jefferis, Potter...

clampmax: Return function that finds maximum of its inputs within a...

cmtk.bindir: Return path to directory containing CMTK binaries Utility function to create and run calls to CMTK commandline...

cmtk.dof2mat: Convert CMTK registration to homogeneous affine matrix with...

cmtk.extract_affine: Extract affine registration from CMTK registration file or...

cmtk.mat2dof: Use CMTK mat2dof to convert homogeneous affine matrix into...

cmtkparams2affmat: Compose homogeneous affine matrix from CMTK registration...

cmtk.reformatx: Reformat an image with a CMTK registration using the...

cmtkreg: Create and test cmtkreg objects that specify path to a CMTK...

cmtkreglist: Make in-memory CMTK registration list from affine matrix or...

cmtk.statistics: Calculate image statistics for a nrrd or other CMTK...

cmtk.targetvolume: Defines a target volume for a CMTK reformatx operation

cmtk.version: Return cmtk version or test for presence of at least a...

c.neuronlist: Combine multiple neuronlists into a single list

coord2ind: Find 1D indices into a 3D image given spatial coordinates

dotprops: dotprops: Neurons as point clouds with tangent vectors (but...

dotprops-arithmetic: Arithmetic for dotprops objects

fileformats: Set or return list of registered file formats that we can...

find.neuron: Find neurons within a 3D selection box (usually drawn in rgl...

find.soma: Find neurons with soma inside 3D selection box (usually drawn...

flip: Flip an array, matrix or vector about an axis

get-set-neuronlist-data.frame: Get or set the attached data.frame of a neuronlist

graph.nodes: Return root, end, or branchpoints of an igraph object

im3d: Construct an im3d object representing 3D image data,...

im3d-coords: Interconvert pixel and physical coordinates

im3d-io: Read/Write calibrated 3D blocks of image data

image.im3d: Method to plot spatially calibrated image arrays

imexpand.grid: Convert locations of im3d voxel grid into XYZ coordinates

imscalebar: Make a scalebar to accompany an image.im3d plot

imslice: Slice out a 3D subarray (or 2d matrix) from a 3D image array

ind2coord: Find XYZ coords corresponding to 1D indices into a 3D image

intersect: Find the intersection of two collections of objects

is.amiramesh: Check if file is amiramesh format

is.fijitraces: Check whether a file is in Fiji's simple neurite tracer...

is.im3d: Test if an object is of class im3d

is.neuroml: Check whether a file is in NeuroML format

is.neuronlist: Test objects of neuronlist class to store multiple neurons

is.nrrd: Check if a file is a NRRD file

is.swc: Test if a file is an SWC format neuron

is.vaa3draw: Check if a file is in the raw image format used by Hanchuan...

kcs20: List of 20 Kenyon Cells from Chiang et al 2011 converted to...

mask: Mask an object, typically to produce a copy with some values...

materials: Extract or set the materials for an object Surface object (hxsurf) for the left mushroom body in FCWB...

mirror: Mirror 3D object about a given axis, optionally using a...

nat-package: Analyse 3D biological image data especially neurons

ndigest: Calculated normalised digest value for an object

neuron: neuron: class to represent traced neurons

neuron-arithmetic: Arithmetic for neuron coordinates

neuronlist: Create a neuronlist from zero or more neurons

neuronlist-arithmetic: Arithmetic for neuron coordinates applied to neuronlists

neuronlist-dataframe-methods: Methods for working with the dataframe attached to a...

neuronlistfh: neuronlistfh - List of neurons loaded on demand from disk or...

ngraph: ngraph: a graph to encode a neuron's connectivity

nlapply: lapply and mapply for neuronlists (with optional...

nlscan: Scan through a set of neurons, individually plotting each one...

nopen3d: Open customised rgl window

normalise_swc: Normalise an SWC format block of neuron morphology data

npop3d: Remove plotted neurons or other 3D objects

nrrd.voxdims: Return voxel dimensions (by default absolute voxel...

origin: Return the space origin of a 3D image object

pan3d: Some useful extensions / changes to rgl defaults

plot3d: plot3d methods for different nat objects

plot3d.boundingbox: Plot a bounding box in 3D

plot3d.dotprops: 3D plots of dotprops objects using rgl package

plot3d.hxsurf: Plot amira surface objects in 3D using rgl

plot3d.neuron: Plot neurons in 3D using rgl library

plot3d.neuronlist: 3D plots of the elements in a neuronlist, optionally using a...

plot.neuron: Plot a 2D projection of a neuron

plot.neuronlist: 2D plots of the elements in a neuronlist, optionally using a...

pointsinside: Find which points of an object are inside a surface

potential_synapses: Calculate number of potential synapses between two neurons

projection: Make 2D (orthogonal) projection of 3D image data

prune: prune an object by removing points near (or far) from a...

prune_strahler: Prune a neuron by removing segments with a given Strahler...

prune_vertices: Prune selected vertices or edges from a neuron

read.cmtk: Read CMTK TypedStream file to a list in memory

read.cmtkreg: Read a CMTK format registration

read.hxsurf: Read Amira surface (aka HxSurface or HyperSurface) files into...

read.landmarks: Generic functions to read/write landmarks in any supported...

read.morphml: Return parsed XML or R list versions of a NeuroML file

read.neuron: Read a single neuron from a file

read.neuron.fiji: Read a neuron saved by Fiji's Simple Neurite Tracer Plugin

read.neuronlistfh: Read a local, or remote, neuronlistfh object saved to a file.

read.neuron.neuroml: Read one or more neurons from a NeuroML v1 file

read.neurons: Read one or more neurons from file to a neuronlist in memory

read.neuron.swc: Read a neuron in swc file format

read.nrrd: Read nrrd file into an array in memory

read.vaa3draw: Read Vaa3d format image data

reglist: A simple wrapper class for multiple transformations

remotesync: Synchronise a remote object

resample: Resample an object with a new spacing

rootpoints: Return the root or branch points of a neuron or graph

scale.neuron: Scale and centre neuron 3D coordinates

seglengths: Calculate length of all segments in neuron

seglist: Make/convert neuron connectivity information into a seglist...

seglist2swc: Recalculate Neurons's SWCData using SegList and point...

segmentgraph: Return a simplified segment graph for a neuron

setdiff: Find the (asymmetric) difference between two collections of...

simplify_reglist: Simplify a registration list

smooth_neuron: Smooth the 3D coordinates of a neuron skeleton

spine: Compute the longest path (aka spine or backbone) of a neuron

strahler_order: Find the Strahler order of each point in a neuron

sub2ind: Find 1D index given n-dimensional indices

sub-.neuronlistfh: Extract from neuronlistfh object or its attached data.frame

subset: Subset methods for different nat objects

subset.dotprops: Subset points in dotprops object that match given conditions

subset.hxsurf: Subset hxsurf object to specified regions

subset.neuron: Subset neuron by keeping only vertices that match given...

subset.neuronlist: Subset neuronlist returning either new neuronlist or names of...

summary.neuron: Summary statistics for neurons (e.g. cable length, number of...

threshold: Threshold an object, typically to produce a mask

union: Find the union of two collections of objects

unmask: Make im3d image array containing values at locations defined...

voxdims: Return voxel dimensions of an object

write.amiramesh: Write a 3D data object to an amiramesh format file

write.cmtk: Write a suitable list to a CMTK TypedStream file on disk

write.cmtkreg: Write out CMTK registration list to folder

write.hxsurf: Write Amira surface (aka HxSurface or HyperSurface) into...

write.neuron: Write out a neuron in any of the file formats we know about

write.neuronlistfh: Write out a neuronlistfh object to an RDS file

write.neurons: Write neurons from a neuronlist object to individual files,...

write.nrrd: Write data and metadata to NRRD file or create a detached...

write.vtk: Write object to VTK file

xform: Transform the 3D location of objects such as neurons

xformimage: Transform image files using a registration or affine matrix

xformpoints: Transform 3D points using a registration, affine matrix or...

xyzmatrix: Get and assign coordinates for classes containing 3D vertex...


affmat2cmtkparams Man page
all.equal.dotprops Man page
all.equal.im3d Man page
all.equal.neuron Man page
amiratype Man page
as.cmtkreg Man page
as.cmtkreg.default Man page
as.cmtkreg.matrix Man page
as.cmtkreg.reglist Man page Man page
as.dotprops Man page
as.im3d Man page
as.im3d.im3d Man page
as.im3d.matrix Man page
as.mesh3d Man page
as.mesh3d.hxsurf Man page
as.neuron Man page Man page
as.neuron.default Man page
as.neuronlist Man page
as.neuronlist.default Man page
as.neuronlistfh Man page
as.neuronlistfh.neuronlist Man page
as.neuronlist.neuronlistfh Man page
as.neuron.ngraph Man page
as.ngraph Man page Man page
as.ngraph.neuron Man page
as.seglist Man page
as.seglist.igraph Man page
as.seglist.neuron Man page
boundingbox Man page
boundingbox<- Man page
boundingbox.character Man page
boundingbox.default Man page
boundingbox.im3d Man page
boundingbox.list Man page
boundingbox.neuron Man page
boundingbox.shape3d Man page
branchpoints Man page
branchpoints.default Man page
branchpoints.igraph Man page
branchpoints.neuron Man page
Cell07PNs Man page
clampmax Man page
cmtk Man page
cmtk.bindir Man page Man page
cmtk.dof2mat Man page
cmtk.extract_affine Man page
cmtk.mat2dof Man page
cmtkparams2affmat Man page
cmtk.reformatx Man page
cmtkreg Man page
cmtkreglist Man page
cmtk.statistics Man page
cmtk.system2 Man page
cmtk.targetvolume Man page
cmtk.targetvolume.default Man page
cmtk.targetvolume.im3d Man page
cmtk.targetvolume.list Man page
cmtk.version Man page
c.neuronlist Man page
coord2ind Man page
coord2ind.default Man page
c.reglist Man page
data.frame<- Man page
data.frame<-.neuronlist Man page
dotprops Man page
-.dotprops Man page
/.dotprops Man page
*.dotprops Man page
+.dotprops Man page
dotprops.character Man page
dotprops.default Man page
dotprops.dotprops Man page
dotprops.im3d Man page
dotprops.neuron Man page
dotprops.neuronlist Man page
droplevels Man page
droplevels.neuronlist Man page
endpoints Man page
endpoints.default Man page
endpoints.igraph Man page
endpoints.neuron Man page
fileformats Man page
find.neuron Man page
find.soma Man page
flip Man page
flip.array Man page
getformatreader Man page
getformatwriter Man page
graph.nodes Man page
head Man page
head.neuronlist Man page
hxsurf Man page
ijkpos Man page
im3d Man page
im3d-coords Man page
im3d-io Man page
image.im3d Man page
imexpand.grid Man page
imscalebar Man page
imslice Man page
ind2coord Man page
ind2coord.array Man page
ind2coord.default Man page
ind2coord.im3d Man page
intersect Man page
intersect.default Man page
intersect.neuronlist Man page
invert_reglist Man page
is.amiramesh Man page
is.cmtkreg Man page
is.dotprops Man page
is.fijitraces Man page
is.im3d Man page
is.neuroml Man page
is.neuron Man page
is.neuronlist Man page
is.neuronlistfh Man page
is.nrrd Man page
is.swc Man page
is.vaa3draw Man page
kcs20 Man page
mask Man page
mask.im3d Man page
materials Man page
materials.character Man page
materials.default Man page
materials.hxsurf Man page Man page
mirror Man page
mirror.character Man page
mirror.default Man page
mirror.neuronlist Man page
nat Man page
nat-package Man page
ndigest Man page
ndigest.dotprops Man page
ndigest.neuron Man page
ndigest.neuronlistfh Man page
neuron Man page
-.neuron Man page
/.neuron Man page
*.neuron Man page
+.neuron Man page
neuronlist Man page
-.neuronlist Man page
/.neuronlist Man page
[<-.neuronlist Man page
[.neuronlist Man page
*.neuronlist Man page
+.neuronlist Man page
neuronlist-dataframe-methods Man page
neuronlistfh Man page
[.neuronlistfh Man page
ngraph Man page
nlapply Man page
nlscan Man page
nmapply Man page
nopen3d Man page
normalise_swc Man page
npop3d Man page
nrrd.voxdims Man page
origin Man page
pan3d Man page
plot3d Man page
plot3d.boundingbox Man page
plot3d.character Man page
plot3d.dotprops Man page
plot3d.hxsurf Man page
plot3d.neuron Man page
plot3d.neuronlist Man page
plot.neuron Man page
plot.neuronlist Man page
pointsinside Man page
pointsinside.default Man page
potential_synapses Man page
potential_synapses.dotprops Man page
potential_synapses.neuron Man page
potential_synapses.neuronlist Man page
projection Man page
prune Man page
prune.default Man page
prune.dotprops Man page
prune_edges Man page
prune.neuron Man page
prune.neuronlist Man page
prune_strahler Man page
prune_vertices Man page
read.amiramesh Man page
read.amiramesh.header Man page
read.cmtk Man page
read.cmtkreg Man page
read.hxsurf Man page
read.im3d Man page
read.landmarks Man page
read.morphml Man page
read.neuron Man page
read.neuron.fiji Man page
read.neuronlistfh Man page
read.neuron.neuroml Man page
read.neurons Man page
read.neuron.swc Man page
read.ngraph.swc Man page
read.nrrd Man page
read.nrrd.header Man page
read.vaa3draw Man page
registerformat Man page
reglist Man page
remotesync Man page
remotesync.neuronlistfh Man page
resample Man page
resample.neuron Man page
rootpoints Man page
rootpoints.default Man page
rootpoints.igraph Man page
rootpoints.neuron Man page
scale Man page
scale.dotprops Man page
scale.neuron Man page
seglengths Man page
seglist Man page
seglist2swc Man page
segmentgraph Man page
setdiff Man page
setdiff.default Man page
setdiff.neuronlist Man page
simplify_reglist Man page
smooth_neuron Man page
smooth_segment_gauss Man page
spine Man page
strahler_order Man page
sub2ind Man page
subset Man page
subset.dotprops Man page
subset.hxsurf Man page
subset.neuron Man page
subset.neuronlist Man page
summary Man page
summary.dotprops Man page
summary.neuron Man page
summary.neuronlist Man page
tail Man page
tail.neuronlist Man page
threshold Man page
threshold.im3d Man page
union Man page
union.default Man page
union.neuronlist Man page
unmask Man page
voxdims Man page
voxdims.character Man page
voxdims.default Man page
voxdims.im3d Man page
with Man page
with.neuronlist Man page
write.amiramesh Man page
write.cmtk Man page
write.cmtkreg Man page
write.hxsurf Man page
write.im3d Man page
write.landmarks Man page
write.neuron Man page
write.neuronlistfh Man page
write.neurons Man page
write.nrrd Man page
write.nrrd.header Man page
write.nrrd.header.for.file Man page
write.vtk Man page
write.vtk.neuron Man page
xform Man page
xform.character Man page Man page
xform.default Man page
xform.dotprops Man page
xformimage Man page
xformimage.character Man page
xformimage.cmtkreg Man page
xformimage.default Man page
xformimage.reglist Man page
xform.list Man page
xform.neuron Man page
xform.neuronlist Man page
xformpoints Man page
xformpoints.character Man page
xformpoints.cmtkreg Man page
xformpoints.default Man page
xformpoints.reglist Man page
xform.shape3d Man page
xyzmatrix Man page
xyzmatrix<- Man page
xyzmatrix.default Man page
xyzmatrix<-.dotprops Man page
xyzmatrix.dotprops Man page
xyzmatrix<-.hxsurf Man page
xyzmatrix.hxsurf Man page
xyzmatrix<-.igraph Man page
xyzmatrix.igraph Man page
xyzmatrix.mesh3d Man page
xyzmatrix<-.neuron Man page
xyzmatrix.neuron Man page
xyzmatrix.neuronlist Man page
xyzmatrix<-.shape3d Man page
xyzpos Man page


tests/testthat/test-ndigest.R tests/testthat/test-cmtk_geometry.R tests/testthat/test-cmtk.R tests/testthat/test-nrrd-io.R tests/testthat/test-amiramesh-io.R tests/testthat/test-cmtk-reformat.R tests/testthat/test-cmtk_io.R tests/testthat/test-potential_synapses.R tests/testthat/test-neuronlist.R tests/testthat/test-summary.R tests/testthat/test-landmarks-io.R tests/testthat/test-neuron-io.R tests/testthat/test-.neuronlistfh-remote-nocran.R tests/testthat/test-dotprops.R tests/testthat/test-reglist.R tests/testthat/test-ngraph.R tests/testthat/test-neuron.R tests/testthat/test-.neuron-io-remote-nocran.R tests/testthat/test-seglist.R tests/testthat/test-hxsurf.R tests/testthat/test-cmtkreg.R tests/testthat/test-coordinates.R tests/testthat/test-pop3d.R tests/testthat/test-xformimage.R tests/testthat/test-neuronlistfh.R tests/testthat/test-xformpoints.R tests/testthat/test-graph-nodes.R tests/testthat/test-xform.R
tests/testthat/test-neuroml-io.R tests/testthat/test-neuron-fiji-io.R tests/testthat/test-im3d.R tests/test-all.R
R/cmtk_geometry.R R/cmtk-reformat.R R/cmtk_io.R R/dotprops.R R/nat-package.R R/ndigest.R R/im3d.R R/vtk-io.R R/cmtkreg.R R/neuron-plot.R R/neuronlistfh.R R/xformpoints.R R/nrrd-io.R R/neuron-io-neuroml.R R/neuronlist_interactive_3d.R R/neuronlist.R R/graph-nodes.R R/xformimage.R R/neuron-io-amira.R R/neuron.R R/potential_synapses.R R/dist3D_Segment_to_Segment.R R/neuronlist_sets.R R/pop3d.R R/coordinates.R R/amiralandmarks-io.R R/nat-data.R R/vaa3draw-io.R R/ngraph.R R/hxsurf.R R/amiramesh-io.R R/xform.R R/summary.R R/neuron-io-fiji.R R/seglist.R R/cmtk.R R/neuron-io.R R/reglist.R R/zzz.R
man/prune_strahler.Rd man/fileformats.Rd man/read.neuron.fiji.Rd man/read.vaa3draw.Rd man/threshold.Rd man/cmtk.statistics.Rd man/plot3d.Rd man/seglist2swc.Rd man/c.neuronlist.Rd man/potential_synapses.Rd man/seglengths.Rd man/setdiff.Rd man/origin.Rd man/neuronlist-dataframe-methods.Rd man/im3d-io.Rd man/cmtk.targetvolume.Rd man/remotesync.Rd man/subset.neuron.Rd man/is.vaa3draw.Rd man/imscalebar.Rd man/write.amiramesh.Rd man/read.neuron.Rd man/kcs20.Rd man/union.Rd man/plot3d.dotprops.Rd man/ man/boundingbox.Rd man/as.neuronlist.Rd man/ndigest.Rd man/ man/seglist.Rd man/read.neurons.Rd man/cmtk.extract_affine.Rd man/all.equal.dotprops.Rd man/nopen3d.Rd man/write.nrrd.Rd man/xformpoints.Rd man/projection.Rd man/reglist.Rd man/voxdims.Rd man/smooth_neuron.Rd man/amiratype.Rd man/strahler_order.Rd man/write.cmtkreg.Rd man/read.landmarks.Rd man/is.neuroml.Rd man/materials.Rd man/write.neurons.Rd man/is.neuronlist.Rd man/neuron.Rd man/plot3d.neuron.Rd man/read.cmtk.Rd man/as.mesh3d.Rd man/im3d.Rd man/nlscan.Rd man/cmtkreg.Rd man/scale.neuron.Rd man/mirror.Rd man/clampmax.Rd man/is.im3d.Rd man/amiramesh-io.Rd man/is.fijitraces.Rd man/get-set-neuronlist-data.frame.Rd man/summary.neuron.Rd man/cmtkparams2affmat.Rd man/imslice.Rd man/write.neuron.Rd man/resample.Rd man/write.hxsurf.Rd man/plot3d.hxsurf.Rd man/normalise_swc.Rd man/all.equal.neuron.Rd man/xyzmatrix.Rd man/prune.Rd man/graph.nodes.Rd man/cmtk.reformatx.Rd man/cmtk.bindir.Rd man/find.neuron.Rd man/simplify_reglist.Rd man/read.nrrd.Rd man/cmtk.mat2dof.Rd man/write.vtk.Rd man/subset.hxsurf.Rd man/as.im3d.Rd man/xform.Rd man/dotprops.Rd man/plot.neuron.Rd man/affmat2cmtkparams.Rd man/cmtk.version.Rd man/is.nrrd.Rd man/coord2ind.Rd man/imexpand.grid.Rd man/plot.neuronlist.Rd man/ngraph.Rd man/neuronlist.Rd man/nlapply.Rd man/pan3d.Rd man/sub2ind.Rd man/Cell07PNs.Rd man/ind2coord.Rd man/is.swc.Rd man/read.morphml.Rd man/subset.dotprops.Rd man/mask.Rd man/neuronlistfh.Rd man/intersect.Rd man/pointsinside.Rd man/cmtkreglist.Rd man/cmtk.dof2mat.Rd man/rootpoints.Rd man/unmask.Rd man/spine.Rd man/all.equal.im3d.Rd man/is.amiramesh.Rd man/prune_vertices.Rd man/read.neuron.neuroml.Rd man/plot3d.neuronlist.Rd man/image.im3d.Rd man/read.neuronlistfh.Rd man/npop3d.Rd man/segmentgraph.Rd man/flip.Rd man/sub-.neuronlistfh.Rd man/nat-package.Rd man/read.hxsurf.Rd man/nrrd.voxdims.Rd man/plot3d.boundingbox.Rd man/neuronlist-arithmetic.Rd man/subset.Rd man/xformimage.Rd man/read.cmtkreg.Rd man/write.cmtk.Rd man/find.soma.Rd man/write.neuronlistfh.Rd man/neuron-arithmetic.Rd man/read.neuron.swc.Rd man/subset.neuronlist.Rd man/as.neuronlist.neuronlistfh.Rd man/dotprops-arithmetic.Rd man/im3d-coords.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.