Closed gdevenyi closed 1 year ago
For affine averaging
Confirm there's no special sauce in https://github.com/ANTsX/ANTs/blob/master/Utilities/itkAverageAffineTransformNoRigidFunction.hxx https://github.com/ANTsX/ANTs/blob/master/Utilities/itkAverageAffineTransformFunction.hxx
Extract matrix:
$ ConvertTransformFile 3 transform.mat test.txt --hm
$ cat test.txt
1.08344 0.0619986 0.144924 0.986581
-0.0181042 0.934848 -0.236614 1.2783
-0.205546 0.319618 1.00676 0.826693
0 0 0 1
Once we do this, we can also scale the transform with the gradient step like we do the deformation field.
For the deformation averaging we'll need to implement some code with SimpleITK. I think I have an implementation written somewhere...
This should handle 3D and 4D data so we can use it for #8 as well.
An implementation for interpolating transformations: https://discourse.itk.org/t/scaling-multiplying-by-a-scalar-value-an-affine-transformation/4310/8
Still want to implement robust averaging of warp fields.
Two possible failure modes here