View source: R/transformation.R
bridging_sequence | R Documentation |
This function is primarily intended for developer use (it is
used inside xform_brain
) but may be useful for end users.
bridging_sequence(
sample,
reference,
via = NULL,
imagedata = FALSE,
checkboth = !imagedata,
mustWork = FALSE
)
sample |
Source template brain (e.g. IS2) that data is currently in.
Specified either as character vector or a |
reference |
Target template brain (e.g. IS2) that data should be transformed into. |
via |
(optional) intermediate template brain that the registration sequence must pass through. |
imagedata |
Whether |
checkboth |
whether to look for registrations in both
directions. The default ( |
mustWork |
whether to error out if appropriate registrations are not found. |
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.
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",
swap = 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".
## Not run:
bridging_sequence(sample=JFRC2, ref=FCWB, checkboth = TRUE)
bridging_sequence(sample=JFRC2, via=IS2, ref=FCWB, checkboth = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.