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.
I’m pretty sure I always used reformatx —jacobian
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.)
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.