File Exchange

## Diffeomorphic Log Demons Image Registration

version 1.7.0.0 (195 KB) by Herve Lombaert

### Herve Lombaert (view profile)

Simple matlab code for 2D and 3D image registration using the diffeomorphic log-demons algorithm

Updated 19 Aug 2014

Simple matlab code for 2D and 3D image registration using the diffeomorphic log-demons algorithm
Code is provided in order to help the understanding of the Demons algorithm - Any comment or improvement is welcome

alphin j

### alphin j (view profile)

For a regular grid (image) we can use this exponential map but for irregular grid(point cloud/mesh) how we can proceed? Can we proceed with simple addition?

S

### S (view profile)

you DO know that it doesn't work for the basic circle to C case? it works only so much as it does _something_ - but it's nowhere near any sensible registration for any pair of images even simple ones that should be easy. thanks for the effort in any case.

jakeoung koo

### jakeoung koo (view profile)

Can I know about expfield function exponentiating vector field?

I have read some literature but I don't know how to calculate exponential field. So I don't understand the function.

zhang le

### zhang le (view profile)

I am confused that I can not get the same result showing in Fig. 6 ( Classical Circle to C registration example)

Nikita

### Nikita (view profile)

Please let me know what changes should be incorporated to work on RGB images.

Nicolas Yu

### Nicolas Yu (view profile)

Some details should be changed for my purpose, and thanks.

Xun Zhang

### Xun Zhang (view profile)

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.

Herve Lombaert

### Herve Lombaert (view profile)

@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

tianyu fu

### tianyu fu (view profile)

@Herve LomBaert: And I don't think the code is wrong.But I can't get the same result showing in the paper.This makes me very upset.

tianyu fu

### tianyu fu (view profile)

@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.

Herve Lombaert

### Herve Lombaert (view profile)

@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)

tianyu fu

### tianyu fu (view profile)

Is it Diffeomorphic Image Registration?I do not think the Jacobi determinant of the transformation field is positive.

Ernst Schwartz

### Ernst Schwartz (view profile)

@Hg: in image registration, you have to know how to deal with the boundaries of the images. A common choice is to have them fixed. So, in order not to over-regularize nor violate the diffeomorphism, a band of zeros is added during optimization.

Hg

### Hg (view profile)

May I know the purpose of the piggyback function? Where can I find the explanation for the algorithm used in the code other than the paper included in the package?

 16 Aug 2014 1.7.0.0 comment updates 18 Apr 2014 1.6.0.0 Fix in 2D (adding comments regarding Jacobian computation) 28 Jan 2013 1.5.0.0 Log domain 26 Dec 2012 1.2.0.0 cleanup in sample files
##### MATLAB Release Compatibility
Created with R2010a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux