- hold_peaks(im, axis=-1, ascending=True)#
Replaces each voxel with the highest value along the given axis.
im (ndarray) – A greyscale image whose peaks are to be found.
axis (int) – The axis along which the operation is to be applied.
ascending (bool) – If
True(default) the given
axisis scanned from 0 to end. If
False, it is scanned in reverse order from end to 0.
result – A copy of
imwith each voxel is replaced with the highest value along the given axis.
- Return type:
“im” must be a greyscale image. In case a Boolean image is fed into this method, it will be converted to float values [0.0,1.0] before proceeding.
Click here to view online example.