-
Dear ANTsXperts, antsMotionCorr -d 3 This creates a 5D displacement field nifti ($myfolder'outputWarp.nii.gz') with shape (nX, nY, nZ, nT, 4). The last dimension (of shape 4) seems to represent the displacement warp field across X, Y, Z, and T, where the displacement along T (the 4th entry) equals to zero. Then, I want to split this displacement warp nifti up in nT separate displacement warp nifti's. Easily, this leads to me having nT nifti's of shape (nX, nY, nZ, 3). Separate warps: for (( i=0; i<nf; i++ )); In one go: antsApplyTransforms -d 4 So, all this code runs smoothly (despite some backslashes not being visible here on the discuss page), but the output of the separate warp is different from the warp in one go. Different how? Well, after the separate warp, motion is corrected a little bit (i.e., less motion than the original input file), but more motion than the standard antsMotionCorr output or the 4d Warp applied in one go (these latter 2 lead to the same result). I don't understand why the separate warp leads to a different result. Am I overlooking something? Help is greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
What happens if you use |
Beta Was this translation helpful? Give feedback.
-
I think I found the cause: the split warps are 4D images, they should be 5D.
I think this is causing the warps to be misinterpreted, they should be 5D images with the vector components along the 5th dimension, like this:
Here's some code in antspy
|
Beta Was this translation helpful? Give feedback.
I think I found the cause: the split warps are 4D images, they should be 5D.