@tianyu - You are raising an interesting point - There is a difference between Displacement field != Transformation (zero displacement leads to an identity matrix)

Typically, the identity matrix is added when computing the Jacobian determinant

See also this thread (from the itk code): http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=7327&graph=dependency&orientation=vertical (code is now including additional comments, perhaps this would help others)

@tianyu - Indeed, this is the Log-domain Diffeomorphic version, the deformation field is defined as the exponential map of a velocity field via expfield() - (velocity field != deformation field - More details on the associated literature on the Diffeomorphic Log-Demons)

I'm running the 2D demons. I'm confused about findupdate.m. In findupdate.m, your code computes the gradient of the moving image or float image. As far as I have learnt from literature, gradient of fixed image are used in the expression for u. I'm not quite clear about this.

@tianyu - You are raising an interesting point - There is a difference between Displacement field != Transformation (zero displacement leads to an identity matrix)

Typically, the identity matrix is added when computing the Jacobian determinant

See also this thread (from the itk code): http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=7327&graph=dependency&orientation=vertical (code is now including additional comments, perhaps this would help others)

@Herve LomBaert: Thank you for your reply.I have read many papers about the diffeomorphic Log-Demons.As you know,if the registration is diffeomorphic,so the Jacobian determinant of deformation must be positive.But,running your code,I find the determinant sometimes is negative.

@tianyu - Indeed, this is the Log-domain Diffeomorphic version, the deformation field is defined as the exponential map of a velocity field via expfield() - (velocity field != deformation field - More details on the associated literature on the Diffeomorphic Log-Demons)

I'm running the 2D demons. I'm confused about findupdate.m. In findupdate.m, your code computes the gradient of the moving image or float image. As far as I have learnt from literature, gradient of fixed image are used in the expression for u. I'm not quite clear about this.

@tianyu - You are raising an interesting point - There is a difference between Displacement field != Transformation (zero displacement leads to an identity matrix)
Typically, the identity matrix is added when computing the Jacobian determinant
See also this thread (from the itk code): http://www.cmake.org/Bug/bug_relationship_graph.php?bug_id=7327&graph=dependency&orientation=vertical (code is now including additional comments, perhaps this would help others)

@Herve LomBaert: Thank you for your reply.I have read many papers about the diffeomorphic Log-Demons.As you know,if the registration is diffeomorphic,so the Jacobian determinant of deformation must be positive.But,running your code,I find the determinant sometimes is negative.

@tianyu - Indeed, this is the Log-domain Diffeomorphic version, the deformation field is defined as the exponential map of a velocity field via expfield() - (velocity field != deformation field - More details on the associated literature on the Diffeomorphic Log-Demons)

Comment only