Open dbrennan44 opened 3 months ago
Thank you, is there a reason subtraction is suggested over combining warps? Just wondering.
And, if subtraction is valid, linear regression over the log Jacobians is also valid (for n > 2 scans for example)?
For clarity, (i think) the Jacobians are inverse of the warps ( s1 -> SST warp produces jacobian > 0 for expansion of SST-> s1 due to warping of points etc.)
so calculating log jacobians from inverse SyN warps:
if s1 < SST < s2 : s1logJacobian(+) - s2logJacobian(-) would produce (++ i.e. expansion) which is correct.
I will also check with 2d data but I'm frequently second guessing the calculations. Thank you!
use the SST as the fixed image and use the fixed warps
Thank you for the guidance.
is warping through the SST is necessary or optimal for only two timepoints?
optimal for only two timepoints?
I have discovered a truly marvelous proof of this, which this comment is too small to contain. I need to finish the draft so I can point people at an arXiv version.
Chiming in late here, but I have a pipeline to do all this automatically https://github.com/CoBrALab/optimized_antsMultivariateTemplateConstruction
@gdevenyi excellent, I look forward to it! I have come across your pipeline before but never implemented it myself, perhaps now is the time. Thank you
@gdevenyi please post your preprint when it's up, should be interesting. Many of the ideas you have encoded make sense.
@gdevenyi by the way, do you have an interpretation for the "absolute" Jacobians (affine + deformable)?
@gdevenyi by the way, do you have an interpretation for the "absolute" Jacobians (affine + deformable)?
Absolutely (no pun intended ;))
Each voxel represents the total volume change in this case.
This is easiest understood in a developmental context, consider two timepoints over a period of fairly rapid brain volume increase. The absolute jacobians will encode how much the total volume of each voxel changes, whereas the relative jacobians will be "normalized" (not by division or statistcally, but by removing any affine components) to represent local volumes within the brain.
The absolute jacobians will encode how much the total volume of each voxel changes, whereas the relative jacobians will be "normalized" (not by division or statistcally, but by removing any affine components) to represent local volumes within the brain.
I'm not sure I'm appreciating the difference here. If we see gross atrophy lets say in an entire WM structure such as corpus callosum, is the relative or absolute more appropriate? will the affine component "eat" the entirety of the volume change and thus the relative jacobians will miss the atrophy?
I'm not sure I'm appreciating the difference here. If we see gross atrophy lets say in an entire WM structure such as corpus callosum, is the relative or absolute more appropriate? will the affine component "eat" the entirety of the volume change and thus the relative jacobians will miss the atrophy?
You'd miss the atrophy in that case but you'd see apparent expansion elsewhere in the relative jacobians, as the nonlinear transform will tend to compensate for the erroneous global scaling.
To be clear, I'm saying in the (IMO unlikely) hypothetical case where the corpus callosum atrophy was so pronounced it was able to bias the affine transform to fit the atrophied CC exactly, then the relative jacobian would show zero change in the CC. The rest of the brain would also be scaled by the same affine transform, and the relative jacobians would show expansion.
it is my opinion that one should only use the "relative Jacobian" .... ie after whatever low-dimensional transform ( call it A
) is used. however, one should also keep track of the determinant of A. then you can flexibly build models testing hypotheses on det(A) alone or its use along with the Jacobian. note : you may want log( det(A) ) if you are using log J. there are good numerical reasons for this in addition to it being a more expressive and efficient representation.
Thanks @cookpa and @stnava for the assist, I agree on all those points.
@cookpa this is a helpful insight. In TBI we of course see global atrophy which both shows contraction in certain areas but expansion in areas just outside the gray matter. My concern is "missing" the (full magnitude of) contraction if we did something like apply a white matter mask or skeletonize, which would not see or consider the expansion of the CSF space.
A previous thread on this topic mentioned others use only a rigid transform and then nonlinear, which to me appears similar to including the affine scaling components in the Jacobian. Perhaps calculating a warp which masks for the area of interest is ideal?
Thanks everyone
Hi ANTs team, What is the suggested way to calculate a between-scan Jacobian through an intermediary template such as a single-subject template? Such that expansion is jacobian > 0 .
Between scan 1 and scan 2:
J1 = warp scan 1 to SST, calculate Jacobian s1->SST using SyN (inverse?) warp. J2 = warp scan 2 to SST, calculate Jacobian s2->SST using SyN (inverse?) warp.
subtract J2 from J1, warp resulting image to standard space.
Or:
Combine the SyN warps using antsApplyTransforms, with " -r ${single-subject-template} " and " -t s1_SST_1InverseWarp.nii.gz -t s2_SST_1Warp.nii.gz -o [ s2_s1_SyNwarp.nii.gz, 1 ] "
Calculating jacobian from s2_s1_SyNwarp, warping resulting image to standard space.
Thank you for clarifying, I feel that I am always second guessing my procedure.