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 TRUE returns precomputed (memoised) results, otherwise rescans searching for all template brains.

remove.duplicates

Whether to remove duplicate template brains (as determined by md5 hash) from the result list

x

A im3d image object, array or matrix compatible with as.templatebrain OR a 2 or 3-vector defining the dimensions of an image or image stack.

rval

Whether to return the templatebrain object itself or just its name.

mustWork

Whether to insist that exactly one template brain is found

Value

For all_templatebrains, a data.frame containing the following columns:

guess_templatebrain returns a templatebrain object when rval='templatebrain' or a character vector when rval='name'.

See Also

templatebrain

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)

[Package nat.templatebrains version 1.1 Index]