hold_peaks

hold_peaks(im, axis=- 1)[source]

Replaces each voxel with the highest value along the given axis.

Parameters
  • im (ND-array) – A greyscale image whose peaks are to be found.

  • axis (int) – The axis along which the operation is to be applied.

Returns

result – A copy of im with each voxel is replaced with the highest value along the given axis.

Return type

ND-array

Notes

“im” must be a greyscale image. In case a Boolean image is fed into this method, it will be first converted to float values [0.0,1.0] before proceeding.

Examples

Click here to view online example.