Skip to content

🆕 Convert contrast_enhancer to rust - #1141

Closed
hannah275 wants to merge 13 commits into
TissueImageAnalytics:developfrom
hannah275:rcontrast
Closed

hannah275 wants to merge 13 commits into
TissueImageAnalytics:developfrom
hannah275:rcontrast

Conversation

@hannah275

Copy link
Copy Markdown
Collaborator

No description provided.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (c0bbb14) to head (dc9027e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1141   +/-   ##
========================================
  Coverage    99.91%   99.91%           
========================================
  Files          112      113    +1     
  Lines        13454    13506   +52     
  Branches      1610     1611    +1     
========================================
+ Hits         13443    13495   +52     
  Misses           5        5           
  Partials         6        6           
Flag Coverage Δ
rust 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@shaneahmed shaneahmed added this to the Release v2.2.0 milestone Sep 10, 2026
@shaneahmed shaneahmed added the enhancement New feature or request label Sep 10, 2026
@shaneahmed shaneahmed changed the title Converted contrast enhancer into rust 🆕 Convert contrast_enhancer to rust Sep 11, 2026
@shaneahmed
shaneahmed requested a review from abdol September 11, 2026 10:24

@abdol abdol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your work @hannah275. Please find my feedback below.

Comment thread tests/rust/test_misc.py
from tiatoolbox import utils


def test_contrast_enhancer() -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It seems like contents of this file are duplicated in the other PR #1142. Is that intentional?

Comment thread tests/test_utils.py
output_array = utils.misc.contrast_enhancer(input_array, low_p=2, high_p=98)
# The out_put array should be equal to expected result_array
assert np.all(result_array == output_array)
# Calculating the contrast enhanced version of input_array

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Similar to the comment above, lines 918-952 are duplicated in #1142.

@review-notebook-app

review-notebook-app Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

View / edit / reply to this conversation on ReviewNB

abdol commented on 2026-09-25T17:04:23Z
----------------------------------------------------------------

It seems like this is the same file in the other PR. If so, please refer to my feedback on the notebook there. Thank you


@abdol abdol self-assigned this Oct 6, 2026
@abdol

abdol commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Whilst working on this PR, I realised that a Rust compiler does not get installed with the toolbox when following the step in README. I will work on adding first.

@abdol
abdol marked this pull request as draft October 22, 2026 05:49
@abdol

abdol commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Hi @shaneahmed, hope you're well. I have started to make changes in a new branch as Hannah's branch is in a fork. I think we'd need to create a new PR with the new branch as I'm not aware of a way to repoint a PR to a different branch. Are you happy for me to close this PR and open a new one? (this will retain Hannah's commits to the repo) Thanks

@shaneahmed

Copy link
Copy Markdown
Member

@abdol Please go ahead and create a new branch unless @hannah275 can provide you write access.

@abdol

abdol commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Closing this PR and continuing in #1174.

@abdol abdol closed this Oct 23, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants