Last data update: 2014.03.03

R: Find sequence of one or more bridging registrations
bridging_sequenceR Documentation

Find sequence of one or more bridging registrations

Description

This function is primarily intended for developer use (it is used inside xform_brain) but may be useful for end users.

Usage

bridging_sequence(sample, reference, via = NULL, imagedata = FALSE,
  checkboth = !imagedata, mustWork = FALSE)

Arguments

sample

Source template brain (e.g. IS2) that data is currently in.

reference

Target template brain (e.g. IS2) that data should be transformed into.

via

optional intermediate brain to use when there is no direct bridging registration.

imagedata

Whether x should be treated as image data (presently only supported as a file on disk or 3D object vertices - see details).

checkboth

whether to look for registrations in both directions. The default (checkboth=FALSE) will only return registrations in the forward direction (see details).

mustWork

whether to error out if appropriate registrations are not found.

Details

When checkboth=FALSE, only registrations that can be directly used to map image data from sample to reference are returned. When working with 3D points, use checkboth=TRUE. Note that all possible directories will first be scanned for registrations in the preferred direction and then rescanned for the opposite direction if nothing is found.

Registration direction

When mapping points from JFRC2 -> IS2 -> FCWB (i.e. sample=JFRC2, via=IS2, ref=FCWB) the command line passed to CMTK's streamxform should look like: streamxform -- JFRC2_IS2.list --inverse FCWB_IS2.list However when mapping image data the command line for CMTK's reformatx should look like: reformatx -o out.nrrd --floating JFRC2.nrrd FCWB.nrrd FCWB_IS2.list --inverse JFRC2_IS2.list bridging_sequence produces output like list(JFRC2 = structure( "/GD/dev/R/nat.flybrains/inst/extdata/bridgingregistrations/JFRC2_IS2.list", swapped = TRUE), IS2 = "/GD/dev/R/nat.flybrains/inst/extdata/bridgingregistrations/FCWB_IS2.list") in these circumstances, which xformpoints.cmtkreg turns into "– JFRC2_IS2.list –inverse FCWB_IS2.list".

Examples

## Not run: 
bridging_sequence(sample=JFRC2, ref=FCWB, checkboth = T)
bridging_sequence(sample=JFRC2, via=IS2, ref=FCWB, checkboth = T)

## End(Not run)

Results