Skip to content

Additional options for rolling ball background subtraction#143

Open
lguerard wants to merge 13 commits into
imcf:develfrom
lguerard:rollingball_options
Open

Additional options for rolling ball background subtraction#143
lguerard wants to merge 13 commits into
imcf:develfrom
lguerard:rollingball_options

Conversation

@lguerard

@lguerard lguerard commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
src/imcflibs/imagej/processing.py 86% 4 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           devel   #143   +/-   ##
====================================
+ Coverage     30%    33%   +3%     
====================================
  Files         25     25           
  Lines       1763   1806   +43     
====================================
+ Hits         527    591   +64     
+ Misses      1236   1215   -21     

☔ View full report in Codecov by Harness.
📢 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

ehrenfeu commented Apr 7, 2026

Copy link
Copy Markdown
Member

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 thread src/imcflibs/imagej/processing.py Outdated
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) ... ⏳

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.

Yep, almost. Now just finish the sentences with a full stop ".".

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.

One more . in the Returns section missing.

Comment thread src/imcflibs/imagej/processing.py Outdated

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) ... ⏳

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.

.

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.

Two things in one:

  • One more . in the Returns section missing.
  • While at this, please also remove the empty line between the Returns section and the closing """ of the docstring.

@ehrenfeu ehrenfeu moved this from Ready to In progress in IMCF-Fiji Apr 17, 2026
@lguerard lguerard requested a review from ehrenfeu June 15, 2026 11:40
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.

Yep, almost. Now just finish the sentences with a full stop ".".


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.

.

Comment thread src/imcflibs/imagej/processing.py Outdated
Comment on lines +184 to +198
rolling_ball_radius : int
Radius of the rolling ball filter to use
light_background : bool, optional
If set to True, will treat the background as light, by default False
sliding : bool, optional
If set to True, will do a sliding window approach, by default False
disable_smoothing : bool, optional
If set to True, will disable the smoothing, by default False
do_3d : bool, optional
If set to True, will do a 3D filtering, by default False

Returns
-------
str
The options string for the "Subtract Background..." macro command

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.

.

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.

. @ Returns

Comment thread src/imcflibs/imagej/processing.py Outdated
@lguerard lguerard requested a review from ehrenfeu June 24, 2026 12:32

@ehrenfeu ehrenfeu left a comment

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.

🕵🏼

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.

One more . in the Returns section missing.


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.

Two things in one:

  • One more . in the Returns section missing.
  • While at this, please also remove the empty line between the Returns section and the closing """ of the docstring.

Comment on lines +184 to +198
rolling_ball_radius : int
Radius of the rolling ball filter to use
light_background : bool, optional
If set to True, will treat the background as light, by default False
sliding : bool, optional
If set to True, will do a sliding window approach, by default False
disable_smoothing : bool, optional
If set to True, will disable the smoothing, by default False
do_3d : bool, optional
If set to True, will do a 3D filtering, by default False

Returns
-------
str
The options string for the "Subtract Background..." macro command

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.

. @ Returns

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