R/templatebrain.R
as.templatebrain.Rd
Use image file or other object to initialise template brain
as.templatebrain(x, ...)
# S3 method for character
as.templatebrain(x, ...)
# S3 method for im3d
as.templatebrain(x, regName = NULL, name = regName, ...)
# S3 method for templatebrain
as.templatebrain(x, ...)
object used to construct the templatebrain, either a character
vector with the path to a file or an im3d
object.
additional named arguments passed to methods and then on to
templatebrain
that will be added as fields to the
templatebrain
object.
name and short name of the template brain. Will use the filename (minus final extension) by default for both fields.
A list with class templatebrain
as.templatebrain
can extract the key fields defining an
template space from an image file. This is generally a much more convenient
approach to defining a templatebrain
object than specifying all
fields by hand.
# Make templatebrain object using image info from the template brain NRRD file
nhdr=system.file('images','FCWB.nhdr', package='nat.templatebrains')
as.templatebrain(nhdr, name = "FlyCircuit Whole Brain")
#> === Template Brain ===
#> Name: FlyCircuit Whole Brain
#> Short Name: FCWB
#> Type:
#> Sex:
#> Dimensions:1769 x 1026 x 108 voxels
#> Voxel size:
#> x = 0.318967307692308 microns
#> y = 0.318427024390244 microns
#> z = 1 microns
#> Bounding box (microns):
#> x = 0, y = 0, z = 0,
#> x = 563.9342, y = 326.3877, z = 107.
#> Description:
#> DOI: