Skip to content

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Jul 1, 2025

Reorient vectors like we do for tensors.

This composes the local jacobians from the composite transform into one, then does a polar decomposition to get a rotation. Thus it should preserve vector magnitude.

It's up to the user to ensure that the vectors are sensibly interpolated. For axial data, it probably makes sense to use nearest neighbor interpolation. At the least, data should be projected into one hemisphere so that we don't interpolate x and -x.

I've also added an extra option for displacement vector data in antsApplyTransforms. Displacement fields from ITK / ANTs registration are based in physical space. Generic vectors (-e 1) are assumed to be in index space, and are rebased accordingly.

For displacement fields, the vectors are signed and should have some spatial regularity, so linear interpolation might work better.

@cookpa
Copy link
Member Author

cookpa commented Jul 1, 2025

Related to #1881

I've tested this vs DT orientation - if I pull V1 before applying the warp, I can get similar results to the tensor after PPD.

Need to test on template building. The idea is if the mean affine is not close to zero, reorienting the warps will produce better shape updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant