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

Binning nuclear labels #222

Merged
merged 3 commits into from
Sep 15, 2020
Merged

Binning nuclear labels #222

merged 3 commits into from
Sep 15, 2020

Conversation

ngreenwald
Copy link
Member

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR?
Currently, when we match nuclei to cells, we don't require that the nucleus be smaller than the cell. If the nuclear segmentation has errors, this can result in non-biological readouts.

This PR adds the option to separate out nuclei that are larger than a cell, and relabel the portion that falls within a cell, to remove this issue

How did you implement your changes
Added a function that takes a nuclear mask and a cell mask, and relabels any nuclei that have pixels outside of the boundaries of the corresponding cell they map to.

Remaining issues

Still need to integrate this into the overall segmentation pipeline

Copy link
Contributor

@ackagel ackagel left a comment

Choose a reason for hiding this comment

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

Looks good; mostly just a clarification question.

ark/utils/segmentation_utils.py Outdated Show resolved Hide resolved
ark/utils/segmentation_utils.py Outdated Show resolved Hide resolved
ark/utils/segmentation_utils.py Show resolved Hide resolved
ark/utils/segmentation_utils_test.py Show resolved Hide resolved
alex-l-kong
alex-l-kong previously approved these changes Sep 15, 2020
Copy link
Contributor

@alex-l-kong alex-l-kong left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@alex-l-kong alex-l-kong left a comment

Choose a reason for hiding this comment

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

Looks mighty fine.

Copy link
Contributor

@ackagel ackagel left a comment

Choose a reason for hiding this comment

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

cool cool cool

@ngreenwald ngreenwald merged commit f1bafdb into master Sep 15, 2020
@ngreenwald ngreenwald deleted the modify_nuc_labels branch September 15, 2020 21:46
alex-l-kong pushed a commit that referenced this pull request Jan 14, 2021
* first pass

* fix formatting
y2kbugger pushed a commit that referenced this pull request Jul 29, 2021
* first pass

* fix formatting
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