bridging_graph {nat.templatebrains} | R Documentation |
Make or query connected graph of bridging registrations
Description
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
.
Usage
bridging_graph(
regdirs = getOption("nat.templatebrains.regdirs"),
reciprocal = NA
)
shortest_bridging_seq(
sample,
reference,
via = NULL,
checkboth = TRUE,
imagedata = FALSE,
reciprocal = NA,
...
)
Arguments
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 |
Details
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')
See Also
Examples
## 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)