all_templatebrains {nat.templatebrains} | R Documentation |
Find all template brains or those matching a given image volume
Description
all_templatebrains
returns a data.frame detailing all
templatebrain
objects on the search path (including those inside
packages).
Usage
all_templatebrains(cached = TRUE, remove.duplicates = FALSE)
guess_templatebrain(
x,
rval = c("templatebrain", "name"),
cached = TRUE,
mustWork = FALSE
)
Arguments
cached |
When |
remove.duplicates |
Whether to remove duplicate template brains (as determined by md5 hash) from the result list |
x |
A |
rval |
Whether to return the |
mustWork |
Whether to insist that exactly one template brain is found |
Value
For all_templatebrains
, a data.frame
containing the
following columns:
object The name of the
templatebrain
objectpos An integer specifying the environment
package Character vector naming the environment
md5 md5 hash of the
templatebrain
objectname
W,H,D Width, height and depth of image stack (pixels)
guess_templatebrain
returns a templatebrain
object when rval='templatebrain'
or a character vector when
rval='name'
.
See Also
Examples
## Not run:
all_templatebrains()
guess_templatebrain(im3d(dims=c(30,40,50)))
# or
guess_templatebrain(c(30,40,50))
guess_templatebrain('path/to/my/image.nrrd')
if(require('nat.flybrains')){
guess_templatebrain(im3d(dims=c(1024,512,218)), rval = 'name')
# get the matching template brain
tb=guess_templatebrain(im3d(dims=c(1024,512,218)))
# get its voxel dimensions
voxdims(tb)
tb=guess_templatebrain(c(1024,512))
tb
}
## End(Not run)