Open bcdarwin opened 6 years ago
My experience has definitely been descaling an lsq12 registration gives a much more reliable lsq6 than directly computing one
My descale-xfm command, takes in an lsq{7,9,12} and generates an lsq6 from it:
#!/bin/bash
set -euo pipefail
input=$1
output=$2
tmpdir=$(mktemp -d)
param2xfm $(xfm2param ${input} | grep -E 'scale|shear') ${tmpdir}/scaleshear.xfm
xfminvert ${tmpdir}/scaleshear.xfm ${tmpdir}/unscaleshear.xfm
xfmconcat ${input} ${tmpdir}/unscaleshear.xfm ${output}
rm -rf ${tmpdir}
Since the initial LSQ6 registration which we use for segmentation is often not very good, potentially related to overall brain size, we might want to wait for LSQ12 (or an added lsq7 or lsq9) or even nonlinear registration and then extract the best approximating LSQ6 transform, resample the native space image using this, and then continue with MAGeT. I guess the hope here is that the groupwise affine registration procedures might be more robust than separate subject-to-average transformations.