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

Fix stain generation in watershed #1670

Merged
merged 1 commit into from
Dec 3, 2019
Merged

Conversation

ttung
Copy link
Collaborator

@ttung ttung commented Nov 22, 2019

#1652 replaced a block of code that scales the intensity of the image by the max, with a reduce operation that does Clip.SCALE_BY_IMAGE. As I discovered later, Clip.SCALE_BY_IMAGE does not do what the documentation says it does, and in fact, it only scales by the max intensity if the max intensity is > 1.0. That means it's not a refactor and actually affected the output.

Levels.SCALE_BY_IMAGE, however, does what we want here and can do what we originally had here.

Depends on #1669
Test plan: pretty much none.

@ttung ttung requested a review from shanaxel42 November 22, 2019 18:53
@codecov-io
Copy link

codecov-io commented Nov 22, 2019

Codecov Report

Merging #1670 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1670      +/-   ##
==========================================
- Coverage    90.1%   90.09%   -0.02%     
==========================================
  Files         231      231              
  Lines        8835     8835              
==========================================
- Hits         7961     7960       -1     
- Misses        874      875       +1
Impacted Files Coverage Δ
starfish/core/image/Segment/watershed.py 96.49% <100%> (ø) ⬆️
starfish/core/image/Filter/reduce.py 93.54% <0%> (-3.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e61ae0...1cf1b5c. Read the comment docs.

@ttung ttung force-pushed the tonytung-fix-watershed-levels branch from dd3f8b1 to f73d082 Compare December 3, 2019 19:38
@ttung ttung changed the base branch from tonytung-use-levels-alltest to master December 3, 2019 20:38
#1652 replaced a block of code that scales the intensity of the image by the max, with a reduce operation that does Clip.SCALE_BY_IMAGE.  As I discovered later, Clip.SCALE_BY_IMAGE does not do what the documentation says it does, and in fact, it only scales by the max intensity if the max intensity is > 1.0.  That means it's not a refactor and actually affected the output.

Levels.SCALE_BY_IMAGE, however, does what we want here and can do what we originally had here.

Depends on #1669
Test plan: pretty much none.
@ttung ttung force-pushed the tonytung-fix-watershed-levels branch from f73d082 to 1cf1b5c Compare December 3, 2019 20:39
@ttung ttung merged commit 37d3571 into master Dec 3, 2019
@ttung ttung deleted the tonytung-fix-watershed-levels branch December 3, 2019 22:03
ttung pushed a commit that referenced this pull request Dec 6, 2019
…e. (#1671)

Refactor the existing watershed code to use the new binarizer and mask filtering (for binary opening).

Depends on #1670, #1651
Test plan: still see 69 cells in the iss notebook.
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.

3 participants