Hello,
thank you for the great scikit-image library. I have encountered an error
when using the function skimage.filters.threshold_local:
threshold = skimage.filters.threshold_local(data, 7, method='gaussian',
offset=0, mode='nearest')
File
"/mnt/depot64/NPsoftware/simnibs/charm_dev/charm_env/lib/python3.8/site-packages/skimage/filters/thresholding.py",
line 209, in threshold_local
check_nD(image, 2)
File
"/mnt/depot64/NPsoftware/simnibs/charm_dev/charm_env/lib/python3.8/site-packages/skimage/_shared/utils.py",
line 320, in check_nD
raise ValueError(msg_incorrect_dim % (arg_name, '-or-'.join([str(n) for
n in ndim])))
ValueError: The parameter `image` must be a 2-dimensional array
For my understanding, the 'image' can be N-dimensional, but why does it
give me the error? Do I misunderstand something? In my case, the 'data' is
a 3D image with dtype of 'float32', and the element values range from
'-2000' to '+2000'. Thank you in advance.
Kind regards,
Fang