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

Point graphic and line graphic should produce reasonable masks #623

Closed
cmeyer opened this issue Feb 25, 2021 · 1 comment
Closed

Point graphic and line graphic should produce reasonable masks #623

cmeyer opened this issue Feb 25, 2021 · 1 comment

Comments

@cmeyer
Copy link
Collaborator

cmeyer commented Feb 25, 2021

Right now they produce empty masks. A point graphic could produce a mask of the pixel on which it sits. A line graphic could produce a rough mask of the line - although the line profile would be preferred for analytical work.

@cmeyer
Copy link
Collaborator Author

cmeyer commented Jan 19, 2022

Implementation notes:

  • you will be implementing the method get_mask for the point graphic and the line graphic
  • here is the get_mask method for a rectangle
  • masks are currently binary, meaning they are either 1 or 0.
  • the get_mask function returns a numpy array with the same size as the input image
  • the code should include a separate test for both line and point
  • for now, the point should just cover a single pixel; the line should be 1-pixel and not have gaps (diagonally-connected pixels are ok)
  • the line algorithm should be implemented with numpy; it must run fast; it should not have explicit loops
  • future possibilities are that the point will have a radius and that the line will have a width (and circular or square caps)

@cmeyer cmeyer closed this as completed in 942c69a Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant