Skip to content

Additional options for rolling ball background subtraction#143

Open
lguerard wants to merge 9 commits intoimcf:develfrom
lguerard:rollingball_options
Open

Additional options for rolling ball background subtraction#143
lguerard wants to merge 9 commits intoimcf:develfrom
lguerard:rollingball_options

Conversation

@lguerard
Copy link
Copy Markdown
Contributor

@lguerard lguerard commented Mar 31, 2026

feat: Enhance rolling ball background subtraction with additional opt…
…ions

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 33%. Comparing base (70bd38d) to head (9fe0a64).
⚠️ Report is 54 commits behind head on devel.

Files with missing lines Patch % Lines
src/imcflibs/imagej/processing.py 85% 4 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           devel   #143   +/-   ##
====================================
+ Coverage     30%    33%   +3%     
====================================
  Files         25     25           
  Lines       1763   1799   +36     
====================================
+ Hits         527    589   +62     
+ Misses      1236   1210   -26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lguerard lguerard force-pushed the rollingball_options branch from d33a0a6 to cd48fac Compare March 31, 2026 13:23
@ehrenfeu ehrenfeu changed the title feat: Enhance rolling ball background subtraction with additional opt… Additional options for rolling ball background subtraction Apr 7, 2026
@ehrenfeu ehrenfeu assigned ehrenfeu and lguerard and unassigned ehrenfeu Apr 7, 2026
@ehrenfeu ehrenfeu self-requested a review April 7, 2026 15:34
@ehrenfeu ehrenfeu added enhancement New feature or request unit testing A unit test should be created new-minor Change introduced in PR will require a new minor release. labels Apr 7, 2026
@ehrenfeu ehrenfeu added this to the 2.0.0 milestone Apr 7, 2026
@ehrenfeu
Copy link
Copy Markdown
Member

ehrenfeu commented Apr 7, 2026

Please add test 🧪 coverage 🕵🏼 - I've started a basic one in 373a05c but since this is just about generating strings and calling macro commands, we should be able to reach full 🚀 coverage.

@ehrenfeu ehrenfeu moved this to Ready in IMCF-Fiji Apr 7, 2026
Comment on lines +20 to +24
options = (
"sigma="
if filter_method == "Gaussian Blur"
else "radius=" + str(filter_radius) + " stack"
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much harder to read compared to this (which is 3 lines vs. 5 lines):

options = "sigma"
if filter_method != "Gaussian Blur":
    options = "radius=" + str(filter_radius) + " stack"

Comment on lines +12 to +14
def filter_options(filter_method, filter_radius, do_3d=False):
"""Build the ImageJ filter command and options strings."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring is missing parameters description (simply copy the relevant parts from the apply_filter() function).

Actually the ruff linter should complain about this but we need to wait until ruff-pr-21076 has been merged (cf. #148) ... ⏳

Comment on lines 164 to 169
imp : ij.ImagePlus
Input ImagePlus to filter and threshold
threshold_method : str
Name of the threshold method to use
do_3d : bool, optional
If set to True, the automatic threshold will be done on a 3D stack, by default True
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adhere to the docstring conventions (line length, full stop). 😳
(There's a bunch of those in this file).


def threshold_options(threshold_method, do_3d=True):
"""Build the ImageJ threshold option strings."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docstring is missing parameters description (simply copy the relevant parts from the apply_filter() function).

Actually the ruff linter should complain about this but we need to wait until ruff-pr-21076 has been merged (cf. #148) ... ⏳

@ehrenfeu ehrenfeu moved this from Ready to In progress in IMCF-Fiji Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new-minor Change introduced in PR will require a new minor release. unit testing A unit test should be created

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants