Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable adaptive image display adjustments and "bring your own image processor" capabilities #45

Merged
merged 14 commits into from
Dec 9, 2024

Conversation

d33bs
Copy link
Member

@d33bs d33bs commented Dec 8, 2024

Description

This PR overhauls the image rendering after discovering challenges with display of images across various test datasets. We move to use a default of Contrast Limited Adaptive Histogram Equalization (CLAHE) through skimage and also provide the flexibility for a user to bring their own function to help render images, understanding there may be scenarios where automated adjustments are not sufficient. While working through this I noticed that 16-bit images were downgraded and resulted in poor quality display and as a result, refactored to remove reliance on 8-bit image conversions. This included the outline and mask overlay functions, which also were moved to the image module (they are better treated in isolation outside the CytoDataFrame class).

Closes #39
Closes #30 (and possibly related issues)

What kind of change(s) are included?

  • Documentation (changes docs or other related content)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • These changes pass all pre-commit checks.
  • I have added comments to my code to help provide understanding
  • I have added a test which covers the code changes found within this PR
  • I have deleted all non-relevant text in this pull request template.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@d33bs d33bs changed the title Add adaptive image display adjustments and "bring your own image renderer" capabilities Add adaptive image display adjustments and "bring your own image processor" capabilities Dec 8, 2024
@d33bs d33bs changed the title Add adaptive image display adjustments and "bring your own image processor" capabilities Enable adaptive image display adjustments and "bring your own image processor" capabilities Dec 8, 2024
@d33bs d33bs marked this pull request as ready for review December 8, 2024 05:37
@d33bs d33bs requested a review from jenna-tomkinson December 9, 2024 14:44
Copy link
Member

@jenna-tomkinson jenna-tomkinson left a comment

Choose a reason for hiding this comment

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

LGTM! I have a few comments/questions. Thanks for your hard work on testing this and improving it! 🎉

src/cytodataframe/frame.py Show resolved Hide resolved
src/cytodataframe/frame.py Show resolved Hide resolved
src/cytodataframe/image.py Outdated Show resolved Hide resolved
src/cytodataframe/image.py Show resolved Hide resolved
tests/test_frame.py Outdated Show resolved Hide resolved
tests/test_image.py Show resolved Hide resolved
docs/src/examples/cytodataframe_at_a_glance.ipynb Outdated Show resolved Hide resolved
Co-Authored-By: Jenna Tomkinson <107513215+jenna-tomkinson@users.noreply.github.com>
@d33bs
Copy link
Member Author

d33bs commented Dec 9, 2024

Thanks @jenna-tomkinson ! After making changes and responding to your comments I'll now merge this in.

@d33bs d33bs merged commit d0fccdf into WayScience:main Dec 9, 2024
9 checks passed
@d33bs d33bs deleted the adaptive-image-adjustments branch December 9, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a "bring your own image processor" capability JUMP image displays issues
2 participants