scikit-image/scikit-image — pull request #1257 by elubeck (2014-12-04 23:46:14+00:00)
Title: Blob detection supports for non-integer sigmas

Hello,
I noticed that in all the blob detectors peaks are found like this:

local_maxima = peak_local_max(image_cube, threshold_abs=threshold,
footprint=np.ones((3, 3, 3)),
threshold_rel=0.0,
exclude_border=False)

# Convert the last index to its corresponding scale value
local_maxima[:, 2] = sigma_list[local_maxima[:, 2]]

My sigma list contains floats in it that a re converted to int64 when the sigma list is copied back into local_maxima. I had to modify the code so local_maxima[:,2] still contained a list of integers but the results are now stored as a float32.

I've made a quick change to fix this issue:

# Convert array to float32
lm = local_maxima.astype('float32')
lm[:,2] = sigma_list[local_maxima[:,2]]
local_maxima = lm