I've used the source code provided by Tom Vercauteren at the following link.
http://hdl.handle.net/1926/510
I changed some codes to migrate to Itk 4.0.
This is the configuration of command that I run.
..\DeformableRegistrationDiffeomorphicDemons.exe -f ..\fixedImage.mha -m ..\movingImage.mha -o deformImage.mha -O displacementImage.mha -i 40x40x32x32 -t 0 -s 0.3 -g 0.3 -l 0.2 -a 0 -e 0 -d 1
And here the result that I obtained.
Fixed image and moving image:


Deformable registration result with three methods of Demons : Diffeomorphic, Demons basic for Itk, Demons by Thirion.



And this is the squared difference images between the deformed image and fixed image.



Source code can be downloaded at the following address.
http://www.mediafire.com/?0dgt9bpun7dgjaq
Reference
Vercauteren, Tom, Xavier Pennec, Aymeric Perchant, and Nicholas Ayache. 2009. Diffeomorphic demons: efficient non-parametric image registration.NeuroImage 45, no. 1 Suppl: S61-S72.
Thanks for your code. ;)
ReplyDelete