download_saalfeldlab_registrations | R Documentation |
Download Saalfeld Lab registrations
download_saalfeldlab_registrations(
fileformat = c(".h5", ".nii"),
activate = TRUE,
download_urls = NULL
)
fileformat |
whether to download h5 (Saalfeld) or nii (ANTs) format registrations (defaults to h5). |
activate |
whether to activate any new bridging registrations
immediately for use by |
download_urls |
Named character vector specifying the URLs to download. When missing downloads a default set of registrations. |
Registrations will be downloaded from
https://www.janelia.org/open-science/jrc-2018-brain-templates. They
will be downloaded to a folder defined by the package option
nat.templatebrains.regdirs
(see examples).
The h5 registration format typically provides a multi-resolution forward and inverse transformations in an efficiently compressed format. See https://github.com/saalfeldlab/template-building/wiki/Hdf5-Deformation-fields for further details.
The nii (NIfTI) files are the raw output format of the ANTs registration package. Their disadvantages are that they are 1) large files and the whole >500 Mb registration file must be loaded completely into memory before any transformations are possible, 2) that they depend on a more complex set of packages that can be hard to install, 3) is not simple to downsample to make smaller files. They do have the advantage of support for transforming image data as well as 3D points.
A character vector naming any new registrations downloaded, invisibly.
register_saalfeldlab_registrations
regroot=getOption('nat.templatebrains.regdirs')
dir(regroot)
## Not run:
# example of specifying an URL for download
download_saalfeldlab_registrations(download_urls=
c("JRC2018F_FCWB.h5"=paste0("https://ndownloader.figshare.com/files/",
"14369093?private_link=d5965dad295e46241ae1")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.