The source code for all three algorithms and the test image can be downloaded from:
www.fmrib.ox.ac.uk/~ steve