users > How to Calculate Jacobian only from the nonrigid component and slight discrepancy in the xform2scalar tool
Showing 1-4 of 4 posts
Display:
Results per page:
Nov 14, 2023  07:11 PM | Sandor Kovacs
How to Calculate Jacobian only from the nonrigid component and slight discrepancy in the xform2scalar tool

Hi,

Im looking for the right way to output a Jacobian determinant map while discadring the affine component in CMTK. The xform2scalar function should do that according to its description and the comments in the source code, but it only has switch for the magnitude which correctly outputs the root sum of x,y,z squares. So apparently no Jacobian there afterall unfortunaletly.

Also Im not sure if the reformatx with --jacobian switch giving me what I look for even with the --jacobian-correct-global option.

Nov 14, 2023  08:11 PM | Greg Jefferis
How Calculate Jacobian only from the nonrigid component and slight discrepancy in the xform2scalar tool


I’m pretty sure I always used reformatx —jacobian

Nov 15, 2023  02:11 AM | Torsten Rohlfing
RE: How Calculate Jacobian only from the nonrigid component and slight discrepancy in the xform2scalar tool

I just did some code digging, and indeed, reformatx --jacobian should do the trick. If you want the nonrigid component only, add the --jacobian-correct-global flag also. That should divide the Jacobian determinant by the global scaling factor of the affine transformation component. (But note that this is based only on the affine transformation that was used to seed the nonrigid registration. It does not, say, fit an affine transformation to the deformation field.)

Nov 15, 2023  10:11 AM | Sandor Kovacs
RE: How to Calculate Jacobian only from the nonrigid component and slight discrepancy in the xform2scalar tool

Thanks for the quick answers and clarification. I was confused a bit about this functionality. In the meantime tested the reformatx - - jacobian with scale adjustment on synthetic data and it seems like doing what I need.