DIPimage 2.1 released
I’m pleased to announce we’ve released a new version of DIPimage and DIPlib, with several relevant changes. For a full list of changes, please see the DIPlib website, here I’ll review the most salient changes.
First of all, and most important from a computational point of view, is the replacement of the pseudo-random number generator in DIPlib. We now use the well-known Mersenne Twister pseudo-random number generator (we adapted some of the code in the mtwist-0.8 package by Geoff Kuenning). The new code is only slightly slower than the old code, but produces a pseudo-random sequence with much better properties. The old pseudo-random number generator introduced a very small amount of correlation, meaning that white noise was not really white. The following bit of code illustrates the problem, and also measures execution time:
tic; a = noise(newim(4000,4000)); toc b = abs(ft(a)); dipshow(b(1800:2200,1800:2200),[0,5])
Elapsed time is 1.610197 seconds.
The Fourier transform of Gaussian noise is supposed to be Gaussian noise as well. The output above shows some low-frequency correlation that shouldn’t be there. The same piece of code now yields:
Elapsed time is 1.693894 seconds.
A second important change is the addition of a Windows installer. Furthermore, on MATLAB version 7.2 and newer under
Windows it is no longer necessary to put the 3 dynamic libraries
libdml*.dll on the
Windows search path (either by changing the path or moving them to a central directory). Under these versions of MATLAB
we can use the
setenv command to change the Windows search path while MATLAB is running. This command is new to MATLAB
7.2. Sadly, this trick does not work on other platforms.
Other visible changes are in the figure windows that display images: the “Step through slices” mode is a lot smoother
now; the “Save display…” option remembers the last directory used; the display no longer reverts to the
map every time the display range is changed; and the
'zerobased' color map has changed as I discussed
in an earlier post.