View source: R/transformation.R
bridging_graph | R Documentation |
These functions are designed for expert use. In general it is
recommended to use xform_brain
.
bridging_graph
creates an igraph::graph representing all known
template brains (vertices) and the bridging registrations connecting them
(edges).
shortest_bridging_seq
finds the shortest bridging
sequence on a graph of all available bridging registrations, subject to
constraints defined by graph connectivity and the reciprocal
parameter
.
bridging_graph(
regdirs = getOption("nat.templatebrains.regdirs"),
reciprocal = NA
)
shortest_bridging_seq(
sample,
reference,
via = NULL,
checkboth = TRUE,
imagedata = FALSE,
reciprocal = NA,
...
)
regdirs |
Character vector of directories to search for registrations (see details) |
reciprocal |
Sets the weight of reciprocal edges in the graph (and thereby whether inverse registrations will be considered). |
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. |
checkboth |
When |
imagedata |
Whether |
... |
additional arguments passed on to |
When reciprocal != NA
we create a graph where each forward
transformation is matched by a corresponding inverse transformation with
the specified edge weight. The edge weight for forward transforms will
always be 1.0.
By default regdirs
is set to getOption('nat.templatebrains.regdirs')
allreg_dataframe
, xform_brain
## Not run:
plot(bridging_graph(), vertex.size=25, edge.arrow.size=0.5)
# with reciprocal edges
plot(bridging_graph(reciprocal=3), vertex.size=25)
## End(Not run)
## Not run:
shortest_bridging_seq(FCWB, IS2)
# or
shortest_bridging_seq('FCWB', 'IS2')
shortest_bridging_seq(sample='FCWB', reference='IS2', via="JFRC2")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.