reglist is read as a set of transformations to be
applied sequentially starting with the first element, then applying the
second transformation to the result of the first and so on. Each individual
transformation is considered to map data from the sample (floating/moving)
space to the reference (fixed/template) space.
Each transformation may have an attribute
"swap" indicating that the
natural direction of the transformation should be swapped (i.e. inverted).
This can be done trivially in the case of affine transformations,
expensively for others such as CMTK registrations (see
cmtkreg) and not at all for others. Note that the term 'swap'
is used to avoid a direct equivalence with inversion - many registration
tools use the term inverse for directions that one might naively
think of as as the natural direction of the transformation (see
xformpoints.cmtkreg for discussion).
invert_reglist inverts a reglist object
c.reglist combines multiple
reglists into a single
1 2 3 4 5 6
One or more transformations/reglists to combine
A vector of the same length as
A reglist object to invert
The swap argument is provided as a convenience, but an attribute
'swap' can also be set directly on each registration.
invert_reglist takes a minimal approach to
inversion. It reverses the order of the individual elements of the
registration and tags each of them with a swap attribute (or changes the
value of the attribute if it already exists)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
I=diag(4) S=I diag(S)=c(1, 2, 3, 1) rl=reglist(S, I) rli=invert_reglist(rl) ## We can check the inversion by simplifying m=simplify_reglist(rl)[] mi=simplify_reglist(rli)[] # NB solve will invert a homogeneous affine matrix all.equal(m, solve(mi)) I=diag(4) S=I diag(S)=c(1, 2, 3, 1) rl=reglist(S, I) rl2=c(rl, 'path/to/my/reg.list') rl3=c(reglist('path/to/my/reg.list'), rl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.