Rename apply_background_subtraction() to rollingball_background_subtraction or apply_rollingball_bg_subtraction to be more informative.
Originally posted by @lguerard in #49 (comment)
|
def apply_background_subtraction(imp, rolling_ball_radius, do_3d=False): |
|
"""Perform background subtraction using a rolling ball method. |
|
|
|
Parameters |
|
---------- |
|
imp : ij.ImagePlus |
|
Input ImagePlus to filter and threshold |
|
rolling_ball_radius : int |
|
Radius of the rolling ball filter to use |
|
do_3d : bool, optional |
|
If set to True, will do a 3D filtering, by default False |
|
|
|
Returns |
|
------- |
|
ij.ImagePlus |
|
Filtered ImagePlus |
|
""" |
|
log.info("Applying rolling ball with radius %d" % rolling_ball_radius) |
|
|
|
options = "rolling=" + str(rolling_ball_radius) + " stack" if do_3d else "" |
|
|
|
log.debug("Background subtraction options: %s" % options) |
|
|
|
imageplus = imp.duplicate() |
|
IJ.run(imageplus, "Substract Background...", options) |
|
|
|
return imageplus |
Rename
apply_background_subtraction()torollingball_background_subtractionorapply_rollingball_bg_subtractionto be more informative.Originally posted by @lguerard in #49 (comment)
python-imcflibs/src/imcflibs/imagej/processing.py
Lines 69 to 95 in f0a1c9c