I have a question related to affine transformations (between the <affine>
tags). I am extracting the following two affine transformations from an xml file (full xml file here) created with the BigDataViewer Fiji plugin created with Java, using the AffineTransform3D function:
<ViewRegistrations>
<ViewRegistration timepoint="0" setup="0">
<ViewTransform type="affine">
<Name>Fast 3d geometric hashing (rotation invariant), AffineModel3D on [beads (c=0)]</Name>
<affine>1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0</affine>
</ViewTransform>
<ViewTransform type="affine">
<Name>calibration</Name>
<affine>1.9998662296836334 0.0 0.0 0.0 0.0 1.9998662296836334 0.0 0.0 0.0 0.0 1.9998662296836334 0.0</affine>
</ViewTransform>
</ViewRegistration>
I would like to import the two affine transformation in R, using the buildAffine()
function from the R package {RNiftyReg}, then compute their composition using composeTransforms()
from {RNiftyReg}.
buildAffine(translation = c(0, 0, 0), scales = c(1, 1, 1), skews = c(0, 0,0),
angles = c(0, 0, 0), source = NULL, target = NULL,
anchor = c("none", "origin", "centre", "center"))
My question:
The affine transformations above are stored in a vector of 12 indices. buildAffine()
requires as input parameters the values for the translations, scales, skews and angles.
I would like to know which value correspond to what.