Skip to content

DEPR/DOC: Deprecate or document top_hat vs rolling_ball #80

@derb12

Description

@derb12

Description of the problem/new feature

top_hat was added back when rolling_ball took an array of half-window values such that it made sense to differentiate the two; however, now that rolling_ball only takes a single half-window value, top_hat is just rolling_ball with smooth_half_window=0. It might make sense to deprecate top_hat and just add a note in rolling_ball's docstring about how to get just a top-hat operation; alternatively, I can just document it so that it's not a major change since there's so many other deprecations for v1.3..

Within the docstring of rolling_ball, it should also be noted that it is a rolling ball as specifically used in baseline correction literature (eg. a smoothed morphological opening as defined by Kneen), rather than the more common rolling ball filter used in image background subtraction which uses convolution with a structure element approximating a sphere, as implemented in scikit-image (https://scikit-image.org/docs/stable/api/skimage.restoration.html#skimage.restoration.rolling_ball) and ImageJ (https://imagej.net/ij/docs/guide/146-29.html). The convolutional rolling ball might be nice to add as an alternative method for rolling_ball since it doesn't do peak-clipping like the top-hat + smoothing does, although the appropriate half_window values for the two methods seems to be quite different from cursory testing.

Finally, just a passing observation, but ImageJ also implements an alternative to the convolutional rolling ball, called a "sliding paraboloid", which from its description sounds kinda like a 2D version of Kajfosz and Kwiatek's algorithm (https://www.sciencedirect.com/science/article/abs/pii/0168583X87902989). Might give some insights into how to extend Kajfosz-Kwiatek to 2D when/if I get to that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions