is.templatebrain tests if object is of class templatebrain

as.character.templatebrain converts template brain to character vector representation (normally used to extract the short name i.e. regName).

print.templatebrain prints templatebrain information in human-readable form

as.im3d converts a template brain to a nat::im3d object; this is probably useful for developers.

origin extracts the space origin of a templatebrain object.

dim extracts the dimensions (in number of pixels) of the image associated with a templatebrain object.

voxdims extracts the dimensions (in calibrated spatial units, e.g. microns) of voxels in the image associated with a templatebrain object.

boundingbox extracts the boundingbox (in calibrated spatial units, e.g. microns) of the image associated with a templatebrain object. See boundingbox for details.

is.templatebrain(x)

# S3 method for templatebrain
as.character(x, field = c("regName", "name"), ...)

# S3 method for templatebrain
print(x, ...)

# S3 method for templatebrain
as.im3d(x, ...)

# S3 method for templatebrain
origin(x, ...)

# S3 method for templatebrain
dim(x, ...)

# S3 method for templatebrain
voxdims(x, ...)

# S3 method for templatebrain
boundingbox(x, ...)

Arguments

x

an object (usually a templatebrain).

field

which field to use (defaults to 'regName').

...

additional arguments for methods.

Value

Return values are documented in the generic methods.

is.templatebrain returns a logical indicating whether or not the object is a templatebrain.

as.character.templatebrain returns a character vector with the name of the template brain.

dim.templatebrain returns a 3-value integer vector.

Examples

data(FCWB.demo)
is.templatebrain(FCWB.demo)
#> [1] TRUE
origin(FCWB.demo)
#> [1] 0 0 0
dim(FCWB.demo)
#> [1] 1769 1026  108
voxdims(FCWB.demo)
#> [1] 0.3189673 0.3184270 1.0000000
boundingbox(FCWB.demo)
#>          [,1]     [,2] [,3]
#> [1,]   0.0000   0.0000    0
#> [2,] 563.9342 326.3877  107
#> attr(,"class")
#> [1] "boundingbox"
# print method
FCWB.demo
#> === Template Brain === 
#> Name: FlyCircuit Whole Brain (demonstration purposes) 
#> Short Name: FCWB 
#> Type: Average 
#> Sex:  Intersex 
#> 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: An intersex averaged brain formed from 17 female and 9 male brains from the FlyCircuit dataset. 
#> DOI: