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

30 napari draw mask #32

Merged
merged 22 commits into from
Sep 13, 2024
Merged

30 napari draw mask #32

merged 22 commits into from
Sep 13, 2024

Conversation

maliagehan
Copy link
Member

@maliagehan maliagehan commented Aug 19, 2024

Describe your changes
Altered the napari label points function so that only squares are accepted as a shape. This is because other shapes (circles are not drawn well with CV2) and the point of the function added in this pull request is to generate a mask of points so that data can be extracted from masks (for naive bayes for example)

Type of update
Is this a:

  • New feature or feature enhancement
  • Update to documentation

Associated issues
#30

Additional context
Add any other context about the problem here.

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

napari points mask function.
added tests and napari_points_mask. Also fixed viewer.close() in napari open test.
realized that cv.circle drew pretty rough circles, so I changed it so that only squares are allowed as a shape option (thus removing the option) from all the functions
Added napari points mask docs
Copy link

deepsource-io bot commented Aug 19, 2024

Here's the code health analysis summary for commits 888e3db..12b1a34. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%100%

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@maliagehan maliagehan added ready to review Ready for code review merge in order Set of PRs that need to be merged sequentially and removed ready to review Ready for code review labels Aug 19, 2024
missed a whitespace, deepsource is complaining about a protected class, I don't think there is a way around that since we're not going to change the napari code base.
fixing deepsource issue and adding class to get around protected class issue.
two minor deepsource fixes that I missed.
fixed docstring
reverting back to the other method of calling viewer
@maliagehan
Copy link
Member Author

Tried to resolve the protected class issue by creating a subclass as Noah suggested, but the protect class deepsource issue just moved to the class, so we changed it back to the original method for simplicity, it doesn't seem like we can get around this without directly changing Napari.

@maliagehan maliagehan added the ready to review Ready for code review label Aug 20, 2024
Base automatically changed from 18-napari-import-coor to main September 12, 2024 20:23
@maliagehan maliagehan linked an issue Sep 12, 2024 that may be closed by this pull request
@HaleySchuhl HaleySchuhl self-requested a review September 13, 2024 14:49
Copy link
Contributor

@HaleySchuhl HaleySchuhl left a comment

Choose a reason for hiding this comment

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

Removed the shape parameter in napari_label_classess from other files.

@HaleySchuhl HaleySchuhl merged commit e40c11b into main Sep 13, 2024
5 checks passed
@HaleySchuhl HaleySchuhl deleted the 30-napari-draw-mask branch September 13, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge in order Set of PRs that need to be merged sequentially ready to review Ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Napari: draw points as mask
2 participants