Deformable registration in D
Robert Jacques
sandford at jhu.edu
Tue Jul 31 12:08:58 PDT 2007
I recently presented at the 49th Annual Meeting of the American
Association of Physicists in Medicine an application of a deformable
registration algorithm during the general poster discussion session. Of
course, the reason I?m posting this here is that I wrote it in D. Or more
precisely, I refactored it to D from C++, with some surprising results.
First, the main algorithm dropped to half the lines of code and I was able
to completely remove some supporting routines. Second, the numerical
stability of the algorithm increased, helping reduce a major fundamental
issue/flaw in algorithm (Ah, the joys of a continuous algorithm working on
discrete data). And lastly, it ran three to four times slower. The culprit
turned out to be the exponential function, which is the crux of the
algorithm and also what I assume was responsible for the increased
stability. I switched to using an exponential with finite support and
regained the speed while keeping the stability. For reference, I was using
Microsoft Visual Studio 2003 and D1.x/Phobos on Intel/XP box.
The code is now open source and available at:
http://dailabs.duhs.duke.edu/imagequality.html
And the associated abstract is published in Medical Physics:
http://www.medphys.org/
P.S. Thank you Walter and the community for this great language.
More information about the Digitalmars-d-announce
mailing list